@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1331 → 0.0.2-alpha.1333
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/constants/buildSchemes.js +3 -3
- package/dist/src/constants/index.js +3 -10
- package/dist/src/constants/platforms.js +3 -3
- package/dist/src/index.js +29 -31
- package/dist/src/resolvers/index.js +10 -17
- package/dist/src/resolvers/resolveBaseUrl.js +14 -15
- package/dist/src/resolvers/resolveBuildVersion.js +16 -17
- package/dist/src/resolvers/resolveBuildVersionOffset.js +12 -12
- package/dist/src/resolvers/resolveDeployLocations.js +44 -56
- package/dist/src/resolvers/resolveGenericRnvConfig.js +18 -30
- package/dist/src/resolvers/resolveHbbtvDeployConfig.js +4 -4
- package/dist/src/resolvers/resolveHbbtvDeployUrl.js +7 -7
- package/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +12 -12
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +11 -11
- package/dist/src/scripts/buildAllWithScheme.js +14 -14
- package/dist/src/scripts/gitReleaser/afterVersionBump.js +10 -10
- package/dist/src/scripts/gitReleaser/beforeVersionBump.js +7 -7
- package/dist/src/scripts/gitReleaser/checkReleaseNotes.js +9 -9
- package/dist/src/scripts/gitReleaser/pushRelease.js +17 -17
- package/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +4 -4
- package/dist/src/scripts/gitReleaser/pushReleaseNotes.js +16 -16
- package/dist/src/scripts/release/deleteSourceMaps.js +6 -6
- package/dist/src/scripts/release/deployToAppCenter.js +37 -38
- package/dist/src/scripts/release/githubRelease.js +60 -64
- package/dist/src/scripts/release/notifySlack/makePayload.js +44 -48
- package/dist/src/scripts/release/notifySlack/notifySlack.js +10 -10
- package/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +25 -28
- package/dist/src/scripts/release/sentryRelease.js +34 -34
- package/dist/src/scripts/release/urlsMarkdown.js +23 -25
- package/dist/src/scripts/releaseAllWithScheme.js +26 -26
- package/dist/src/scripts/utils/cmdUtils.js +9 -9
- package/dist/src/scripts/utils/fsUtils.js +7 -7
- package/dist/src/scripts/utils/gitUtils.js +50 -50
- package/dist/src/scripts/utils/index.js +8 -8
- package/dist/src/scripts/utils/stringUtils.js +2 -5
- package/dist/src/sdks/index.js +15 -54
- package/dist/src/sdks/sdk-tizen/index.js +154 -254
- package/dist/src/sdks/sdk-webos/index.js +136 -231
- package/dist/src/sdks/sdk-webpack/index.js +20 -69
- package/dist/src/sdks/sdkUtils.js +14 -59
- package/dist/src/tasks/deploy/aswS3/aws.js +9 -9
- package/dist/src/tasks/deploy/aswS3/deployS3.js +44 -83
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +70 -139
- package/dist/src/tasks/engineTasks.js +10 -10
- package/dist/src/tasks/task.rnv.build.js +75 -132
- package/dist/src/tasks/task.rnv.configure.js +39 -88
- package/dist/src/tasks/task.rnv.configureSoft.js +22 -75
- package/dist/src/tasks/task.rnv.deploy.js +28 -78
- package/dist/src/tasks/task.rnv.hooks.run.js +42 -92
- package/dist/src/tasks/task.rnv.package.js +18 -61
- package/dist/src/tasks/task.rnv.project.configure.js +80 -183
- package/dist/src/tasks/task.rnv.start.js +42 -87
- package/dist/src/types/c.js +1 -1
- package/dist/src/types/index.js +1 -1
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +12 -12
- package/dist/src/utils/replaceRelevantStringsInConfig/index.js +2 -9
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +10 -11
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +23 -29
- package/dist/src/utils/zipBuildsByPlatforms.js +25 -25
- package/dist/templates/platforms/_shared/template.js +56 -41
- package/dist/templates/platforms/_shared/webpack.base.js +119 -139
- package/dist/templates/platforms/entone/webpack.config.dev.js +27 -22
- package/dist/templates/platforms/entone/webpack.config.prod.js +21 -20
- package/dist/templates/platforms/hbbtv/webpack.config.dev.js +42 -24
- package/dist/templates/platforms/hbbtv/webpack.config.prod.js +36 -22
- package/dist/templates/platforms/tizen/webpack.config.dev.js +28 -22
- package/dist/templates/platforms/tizen/webpack.config.prod.js +21 -20
- package/dist/templates/platforms/webos/webpack.config.dev.js +31 -24
- package/dist/templates/platforms/webos/webpack.config.prod.js +23 -22
- package/dist/templates/platforms/webtv/webpack.config.dev.js +27 -22
- package/dist/templates/platforms/webtv/webpack.config.prod.js +21 -20
- package/dist/types/src/scripts/release/notifySlack/makePayload.d.ts +9 -3
- package/package.json +3 -3
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const { ok } = require('assert').strict;
|
|
3
|
+
const { cmdSyncTrimOut, cmdSyncInheritOut, cmdSyncPipeOut } = require('./cmdUtils');
|
|
4
|
+
const { splitByNewLine } = require('./stringUtils');
|
|
5
|
+
const statusList = () => {
|
|
6
|
+
const gitCmd = 'git status --porcelain';
|
|
7
|
+
const outputString = cmdSyncTrimOut(gitCmd);
|
|
8
8
|
if (!outputString)
|
|
9
9
|
return [];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const handleMultipleWhitespaces = (rowString) => {
|
|
11
|
+
const spaceChar = ' ';
|
|
12
|
+
const parts = rowString.split(spaceChar);
|
|
13
13
|
return parts.filter(Boolean).join(spaceChar);
|
|
14
14
|
};
|
|
15
15
|
return splitByNewLine(outputString).map(handleMultipleWhitespaces);
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const getCurrentBranchName = () => cmdSyncTrimOut('git branch --show-current');
|
|
18
|
+
const pullRequest = (fromBranch, toBranch, prTitle) => {
|
|
19
|
+
const cmdTool = 'hub';
|
|
20
|
+
const installDocUrl = 'https://github.com/github/hub#installation';
|
|
21
|
+
const errorMsg = `${cmdTool} is not installed! See ${installDocUrl}\n`;
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
const toolPath = cmdSyncTrimOut(`${cmdTool} --version`);
|
|
24
24
|
ok(toolPath, errorMsg);
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
27
27
|
throw new Error(errorMsg);
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
const cmd = `${cmdTool} pull-request -m "${prTitle}" --head ${fromBranch} --base ${toBranch}`;
|
|
30
30
|
cmdSyncInheritOut(cmd);
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const remoteBranchExists = (expectedBranchName) => {
|
|
33
|
+
const gitCmd = `git ls-remote --heads origin ${expectedBranchName}`;
|
|
34
|
+
const output = cmdSyncTrimOut(gitCmd);
|
|
35
35
|
return Boolean(output);
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return cmdSyncPipeOut(
|
|
37
|
+
const pull = () => cmdSyncPipeOut('git remote update -p && git merge --ff-only @{u}');
|
|
38
|
+
const addAll = () => cmdSyncPipeOut('git add --all');
|
|
39
|
+
const add = (fileList) => cmdSyncPipeOut(`git add ${fileList.join(' ')}`);
|
|
40
|
+
const checkout = (branchName) => cmdSyncPipeOut(`git checkout ${branchName}`);
|
|
41
|
+
const createBranch = (branchName) => cmdSyncPipeOut(`git branch ${branchName}`);
|
|
42
|
+
const commit = (commitMessage, noVerify) => {
|
|
43
|
+
const maybeNoVerifyParam = noVerify ? '--no-verify' : '';
|
|
44
|
+
return cmdSyncPipeOut(`git commit -m "${commitMessage}" ${maybeNoVerifyParam}`.trimEnd());
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const push = (branchName, noVerify) => {
|
|
47
|
+
const maybeNoVerifyParam = noVerify ? '--no-verify' : '';
|
|
48
|
+
const cmd = `git push --set-upstream origin ${branchName} ${maybeNoVerifyParam}`.trimEnd();
|
|
49
49
|
return cmdSyncPipeOut(cmd);
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
const assertEmptyStatusList = () => {
|
|
52
52
|
ok(statusList().length === 0, 'An empty GIT stage is expected!');
|
|
53
53
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const assertCurrentBranch = (expectedBranchName) => {
|
|
55
|
+
const currentGitBranchName = getCurrentBranchName();
|
|
56
|
+
const errorMsg = `The ${expectedBranchName} branch is expected to be active, not "${currentGitBranchName}"`;
|
|
57
57
|
ok(currentGitBranchName === expectedBranchName, errorMsg);
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const assertRemoteBranch = (expectedBranchName) => {
|
|
60
|
+
const errorMsg = `Remote branch ${expectedBranchName} does not exist!`;
|
|
61
61
|
ok(remoteBranchExists(expectedBranchName), errorMsg);
|
|
62
62
|
};
|
|
63
63
|
module.exports = {
|
|
64
|
-
statusList
|
|
65
|
-
getCurrentBranchName
|
|
66
|
-
pullRequest
|
|
67
|
-
remoteBranchExists
|
|
68
|
-
pull
|
|
69
|
-
addAll
|
|
70
|
-
add
|
|
71
|
-
checkout
|
|
72
|
-
createBranch
|
|
73
|
-
commit
|
|
74
|
-
push
|
|
75
|
-
assertEmptyStatusList
|
|
76
|
-
assertCurrentBranch
|
|
77
|
-
assertRemoteBranch
|
|
64
|
+
statusList,
|
|
65
|
+
getCurrentBranchName,
|
|
66
|
+
pullRequest,
|
|
67
|
+
remoteBranchExists,
|
|
68
|
+
pull,
|
|
69
|
+
addAll,
|
|
70
|
+
add,
|
|
71
|
+
checkout,
|
|
72
|
+
createBranch,
|
|
73
|
+
commit,
|
|
74
|
+
push,
|
|
75
|
+
assertEmptyStatusList,
|
|
76
|
+
assertCurrentBranch,
|
|
77
|
+
assertRemoteBranch,
|
|
78
78
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const cmdUtils = require('./cmdUtils');
|
|
3
|
+
const fsUtils = require('./fsUtils');
|
|
4
|
+
const gitUtils = require('./gitUtils');
|
|
5
|
+
const stringUtils = require('./stringUtils');
|
|
6
6
|
module.exports = {
|
|
7
|
-
cmdUtils
|
|
8
|
-
fsUtils
|
|
9
|
-
gitUtils
|
|
10
|
-
stringUtils
|
|
7
|
+
cmdUtils,
|
|
8
|
+
fsUtils,
|
|
9
|
+
gitUtils,
|
|
10
|
+
stringUtils,
|
|
11
11
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
if (string === void 0) { string = ''; }
|
|
4
|
-
return string.split(/\r?\n/);
|
|
5
|
-
};
|
|
2
|
+
const splitByNewLine = (string = '') => string.split(/\r?\n/);
|
|
6
3
|
module.exports = {
|
|
7
|
-
splitByNewLine
|
|
4
|
+
splitByNewLine,
|
|
8
5
|
};
|
package/dist/src/sdks/index.js
CHANGED
|
@@ -18,62 +18,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
31
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
32
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
33
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
|
-
function step(op) {
|
|
35
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
37
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
38
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
|
-
switch (op[0]) {
|
|
40
|
-
case 0: case 1: t = op; break;
|
|
41
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
42
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
43
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
44
|
-
default:
|
|
45
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
46
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
47
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
48
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
49
|
-
if (t[2]) _.ops.pop();
|
|
50
|
-
_.trys.pop(); continue;
|
|
51
|
-
}
|
|
52
|
-
op = body.call(thisArg, _);
|
|
53
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
54
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
exports.__esModule = true;
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
22
|
exports.handlePlatformSdk = exports.SDKWebpack = exports.SDKTizen = exports.SDKWebos = void 0;
|
|
59
|
-
|
|
60
|
-
|
|
23
|
+
const constants_1 = require("../constants");
|
|
24
|
+
const SDKWebos = __importStar(require("./sdk-webos"));
|
|
61
25
|
exports.SDKWebos = SDKWebos;
|
|
62
|
-
|
|
26
|
+
const SDKTizen = __importStar(require("./sdk-tizen"));
|
|
63
27
|
exports.SDKTizen = SDKTizen;
|
|
64
|
-
|
|
28
|
+
const SDKWebpack = __importStar(require("./sdk-webpack"));
|
|
65
29
|
exports.SDKWebpack = SDKWebpack;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return [2];
|
|
77
|
-
});
|
|
78
|
-
}); };
|
|
30
|
+
const handlePlatformSdk = async (c) => {
|
|
31
|
+
switch (c.platform) {
|
|
32
|
+
case constants_1.Platforms.TIZEN:
|
|
33
|
+
return SDKTizen.handleTizenSdk(c);
|
|
34
|
+
case constants_1.Platforms.WEBOS:
|
|
35
|
+
return SDKWebos.handleWebosSdk(c);
|
|
36
|
+
default:
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
79
40
|
exports.handlePlatformSdk = handlePlatformSdk;
|