@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1341 → 0.0.2-alpha.1343
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 +14 -10
- package/dist/src/constants/index.js +21 -13
- package/dist/src/constants/platforms.js +11 -7
- package/dist/src/index.js +80 -70
- package/dist/src/resolvers/index.js +77 -27
- package/dist/src/resolvers/resolveBaseUrl.js +56 -30
- package/dist/src/resolvers/resolveBuildVersion.js +59 -38
- package/dist/src/resolvers/resolveBuildVersionOffset.js +50 -30
- package/dist/src/resolvers/resolveDeployLocations.js +106 -73
- package/dist/src/resolvers/resolveGenericRnvConfig.js +69 -73
- package/dist/src/resolvers/resolveHbbtvDeployConfig.js +12 -4
- package/dist/src/resolvers/resolveHbbtvDeployUrl.js +18 -8
- package/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +41 -24
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +19 -12
- package/dist/src/scripts/buildAllWithScheme.js +30 -18
- package/dist/src/scripts/gitReleaser/afterVersionBump.js +30 -15
- package/dist/src/scripts/gitReleaser/beforeVersionBump.js +21 -10
- package/dist/src/scripts/gitReleaser/checkReleaseNotes.js +32 -15
- package/dist/src/scripts/gitReleaser/pushRelease.js +44 -22
- package/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +10 -4
- package/dist/src/scripts/gitReleaser/pushReleaseNotes.js +60 -29
- package/dist/src/scripts/release/deleteSourceMaps.js +20 -8
- package/dist/src/scripts/release/deployToAppCenter.js +82 -61
- package/dist/src/scripts/release/githubRelease.js +139 -106
- package/dist/src/scripts/release/notifySlack/makePayload.js +137 -79
- package/dist/src/scripts/release/notifySlack/notifySlack.js +44 -37
- package/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +52 -25
- package/dist/src/scripts/release/sentryRelease.js +97 -62
- package/dist/src/scripts/release/urlsMarkdown.js +109 -52
- package/dist/src/scripts/releaseAllWithScheme.js +95 -66
- package/dist/src/scripts/utils/cmdUtils.js +30 -10
- package/dist/src/scripts/utils/fsUtils.js +15 -7
- package/dist/src/scripts/utils/gitUtils.js +108 -67
- package/dist/src/scripts/utils/index.js +11 -5
- package/dist/src/scripts/utils/stringUtils.js +8 -5
- package/dist/src/sdks/index.js +59 -74
- package/dist/src/sdks/sdk-tizen/index.js +515 -301
- package/dist/src/sdks/sdk-webos/index.js +375 -231
- package/dist/src/sdks/sdk-webpack/index.js +99 -73
- package/dist/src/sdks/sdkUtils.js +71 -60
- package/dist/src/tasks/deploy/aswS3/aws.js +42 -21
- package/dist/src/tasks/deploy/aswS3/deployS3.js +104 -108
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +199 -165
- package/dist/src/tasks/engineTasks.js +24 -20
- package/dist/src/tasks/task.rnv.build.js +179 -161
- package/dist/src/tasks/task.rnv.configure.js +101 -93
- package/dist/src/tasks/task.rnv.configureSoft.js +78 -79
- package/dist/src/tasks/task.rnv.deploy.js +76 -83
- package/dist/src/tasks/task.rnv.hooks.run.js +121 -104
- package/dist/src/tasks/task.rnv.package.js +61 -65
- package/dist/src/tasks/task.rnv.project.configure.js +263 -209
- package/dist/src/tasks/task.rnv.start.js +95 -93
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +39 -19
- package/dist/src/utils/replaceRelevantStringsInConfig/index.js +13 -11
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +45 -30
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +82 -58
- package/dist/src/utils/zipBuildsByPlatforms.js +78 -42
- package/dist/templates/platforms/_shared/template.js +91 -60
- package/dist/templates/platforms/_shared/webpack.base.js +265 -257
- package/dist/templates/platforms/entone/webpack.config.dev.js +44 -38
- package/dist/templates/platforms/entone/webpack.config.prod.js +38 -36
- package/dist/templates/platforms/hbbtv/webpack.config.dev.js +48 -42
- package/dist/templates/platforms/hbbtv/webpack.config.prod.js +42 -40
- package/dist/templates/platforms/tizen/webpack.config.dev.js +45 -38
- package/dist/templates/platforms/tizen/webpack.config.prod.js +38 -36
- package/dist/templates/platforms/webos/project/public/content/js/webOSTVjs-1.2.3/webOSTV.js +391 -1
- package/dist/templates/platforms/webos/webpack.config.dev.js +46 -40
- package/dist/templates/platforms/webos/webpack.config.prod.js +38 -38
- package/dist/templates/platforms/webtv/webpack.config.dev.js +44 -38
- package/dist/templates/platforms/webtv/webpack.config.prod.js +38 -36
- package/package.json +13 -10
- package/dist/src/types/c.js +0 -1
- package/dist/src/types/index.js +0 -1
- package/dist/types/src/constants/buildSchemes.d.ts +0 -11
- package/dist/types/src/constants/index.d.ts +0 -2
- package/dist/types/src/constants/platforms.d.ts +0 -8
- package/dist/types/src/index.d.ts +0 -18
- package/dist/types/src/resolvers/index.d.ts +0 -9
- package/dist/types/src/resolvers/resolveBaseUrl.d.ts +0 -6
- package/dist/types/src/resolvers/resolveBuildVersion.d.ts +0 -6
- package/dist/types/src/resolvers/resolveBuildVersionOffset.d.ts +0 -3
- package/dist/types/src/resolvers/resolveDeployLocations.d.ts +0 -9
- package/dist/types/src/resolvers/resolveGenericRnvConfig.d.ts +0 -4
- package/dist/types/src/resolvers/resolveHbbtvDeployConfig.d.ts +0 -10
- package/dist/types/src/resolvers/resolveHbbtvDeployUrl.d.ts +0 -3
- package/dist/types/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.d.ts +0 -3
- package/dist/types/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.d.ts +0 -3
- package/dist/types/src/scripts/buildAllWithScheme.d.ts +0 -1
- package/dist/types/src/scripts/gitReleaser/afterVersionBump.d.ts +0 -1
- package/dist/types/src/scripts/gitReleaser/beforeVersionBump.d.ts +0 -1
- package/dist/types/src/scripts/gitReleaser/checkReleaseNotes.d.ts +0 -1
- package/dist/types/src/scripts/gitReleaser/pushRelease.d.ts +0 -1
- package/dist/types/src/scripts/gitReleaser/pushReleaseCandidate.d.ts +0 -1
- package/dist/types/src/scripts/gitReleaser/pushReleaseNotes.d.ts +0 -1
- package/dist/types/src/scripts/release/deleteSourceMaps.d.ts +0 -1
- package/dist/types/src/scripts/release/deployToAppCenter.d.ts +0 -1
- package/dist/types/src/scripts/release/githubRelease.d.ts +0 -1
- package/dist/types/src/scripts/release/notifySlack/makePayload.d.ts +0 -9
- package/dist/types/src/scripts/release/notifySlack/notifySlack.d.ts +0 -1
- package/dist/types/src/scripts/release/notifySlack/slackBlockKitBuilder.d.ts +0 -26
- package/dist/types/src/scripts/release/sentryRelease.d.ts +0 -1
- package/dist/types/src/scripts/release/urlsMarkdown.d.ts +0 -1
- package/dist/types/src/scripts/releaseAllWithScheme.d.ts +0 -1
- package/dist/types/src/scripts/utils/cmdUtils.d.ts +0 -4
- package/dist/types/src/scripts/utils/fsUtils.d.ts +0 -2
- package/dist/types/src/scripts/utils/gitUtils.d.ts +0 -14
- package/dist/types/src/scripts/utils/index.d.ts +0 -5
- package/dist/types/src/scripts/utils/stringUtils.d.ts +0 -1
- package/dist/types/src/sdks/index.d.ts +0 -5
- package/dist/types/src/sdks/sdk-tizen/index.d.ts +0 -5
- package/dist/types/src/sdks/sdk-webos/index.d.ts +0 -4
- package/dist/types/src/sdks/sdk-webpack/index.d.ts +0 -4
- package/dist/types/src/sdks/sdkUtils.d.ts +0 -2
- package/dist/types/src/tasks/deploy/aswS3/aws.d.ts +0 -2
- package/dist/types/src/tasks/deploy/aswS3/deployS3.d.ts +0 -1
- package/dist/types/src/tasks/deploy/hbbtv/deployHbbtv.d.ts +0 -1
- package/dist/types/src/tasks/engineTasks.d.ts +0 -13
- package/dist/types/src/tasks/task.rnv.build.d.ts +0 -9
- package/dist/types/src/tasks/task.rnv.configure.d.ts +0 -9
- package/dist/types/src/tasks/task.rnv.configureSoft.d.ts +0 -9
- package/dist/types/src/tasks/task.rnv.deploy.d.ts +0 -9
- package/dist/types/src/tasks/task.rnv.hooks.run.d.ts +0 -13
- package/dist/types/src/tasks/task.rnv.package.d.ts +0 -9
- package/dist/types/src/tasks/task.rnv.project.configure.d.ts +0 -9
- package/dist/types/src/tasks/task.rnv.start.d.ts +0 -9
- package/dist/types/src/types/c.d.ts +0 -316
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/utils/forEachSupportedPlatformFlavour.d.ts +0 -1
- package/dist/types/src/utils/replaceRelevantStringsInConfig/index.d.ts +0 -1
- package/dist/types/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.d.ts +0 -1
- package/dist/types/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.d.ts +0 -1
- package/dist/types/src/utils/zipBuildsByPlatforms.d.ts +0 -1
- package/dist/types/templates/platforms/_shared/template.d.ts +0 -2
- package/dist/types/templates/platforms/_shared/webpack.base.d.ts +0 -1
- package/dist/types/templates/platforms/entone/webpack.config.dev.d.ts +0 -2
- package/dist/types/templates/platforms/entone/webpack.config.prod.d.ts +0 -2
- package/dist/types/templates/platforms/hbbtv/webpack.config.dev.d.ts +0 -2
- package/dist/types/templates/platforms/hbbtv/webpack.config.prod.d.ts +0 -2
- package/dist/types/templates/platforms/tizen/webpack.config.dev.d.ts +0 -2
- package/dist/types/templates/platforms/tizen/webpack.config.prod.d.ts +0 -2
- package/dist/types/templates/platforms/webos/webpack.config.dev.d.ts +0 -2
- package/dist/types/templates/platforms/webos/webpack.config.prod.d.ts +0 -2
- package/dist/types/templates/platforms/webtv/webpack.config.dev.d.ts +0 -2
- package/dist/types/templates/platforms/webtv/webpack.config.prod.d.ts +0 -2
|
@@ -1,81 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
exports.__esModule = true;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
10
8
|
exports.resolveDeployLocations = void 0;
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
|
|
10
|
+
var fs = _interopRequireWildcard(require("fs"));
|
|
11
|
+
|
|
12
|
+
var _resolveBuildVersion = require("./resolveBuildVersion");
|
|
13
|
+
|
|
14
|
+
var _resolveBaseUrl = require("./resolveBaseUrl");
|
|
15
|
+
|
|
16
|
+
var _resolveHbbtvDeployUrl = require("./resolveHbbtvDeployUrl");
|
|
17
|
+
|
|
18
|
+
var _constants = require("../constants");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
25
|
+
|
|
26
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
|
|
30
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
31
|
+
|
|
32
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
33
|
+
|
|
34
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
+
|
|
38
|
+
var getBuildVersion = function getBuildVersion(c) {
|
|
39
|
+
var platform = c.platform,
|
|
40
|
+
runtime = c.runtime;
|
|
41
|
+
var scheme = runtime.scheme,
|
|
42
|
+
appId = runtime.appId;
|
|
43
|
+
return (0, _resolveBuildVersion.resolveBuildVersion)({
|
|
44
|
+
platform: platform,
|
|
45
|
+
scheme: scheme,
|
|
46
|
+
appConfigId: appId
|
|
47
|
+
});
|
|
24
48
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
49
|
+
|
|
50
|
+
var getSupportedPlatforms = function getSupportedPlatforms(c) {
|
|
51
|
+
var _ref = c.buildConfig.defaults || {},
|
|
52
|
+
_ref$supportedPlatfor = _ref.supportedPlatforms,
|
|
53
|
+
supportedPlatforms = _ref$supportedPlatfor === void 0 ? [] : _ref$supportedPlatfor;
|
|
54
|
+
|
|
55
|
+
return supportedPlatforms;
|
|
28
56
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
57
|
+
|
|
58
|
+
var getSupportedFlavoursForPlatform = function getSupportedFlavoursForPlatform(c, platformName) {
|
|
59
|
+
var _c$buildConfig$platfo;
|
|
60
|
+
|
|
61
|
+
var _ref2 = ((_c$buildConfig$platfo = c.buildConfig.platforms[platformName]) === null || _c$buildConfig$platfo === void 0 ? void 0 : _c$buildConfig$platfo.deploy) || {},
|
|
62
|
+
_ref2$supportedFlavou = _ref2.supportedFlavours,
|
|
63
|
+
supportedFlavours = _ref2$supportedFlavou === void 0 ? [] : _ref2$supportedFlavou;
|
|
64
|
+
|
|
65
|
+
return supportedFlavours;
|
|
33
66
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_a)
|
|
43
|
-
});
|
|
67
|
+
|
|
68
|
+
var makeOutputObject = function makeOutputObject() {
|
|
69
|
+
var buildVersion = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
70
|
+
return {
|
|
71
|
+
versions: _defineProperty({}, buildVersion, {
|
|
72
|
+
platforms: {}
|
|
73
|
+
})
|
|
74
|
+
};
|
|
44
75
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
|
|
77
|
+
var makeUrls = function makeUrls(c, platformName, flavourName) {
|
|
78
|
+
var isHbbTVPlatform = platformName === _constants.Platforms.HBBTV;
|
|
79
|
+
var baseUrl = (0, _resolveBaseUrl.resolveBaseUrl)({
|
|
80
|
+
platform: platformName,
|
|
81
|
+
scheme: c.runtime.scheme || '',
|
|
82
|
+
appConfigId: flavourName
|
|
83
|
+
});
|
|
84
|
+
if (!baseUrl) return null;
|
|
85
|
+
var packageOutputDirPath = "platformBuilds/".concat(flavourName, "_").concat(platformName, "/output");
|
|
86
|
+
var outputFilenameList = fs.readdirSync(packageOutputDirPath);
|
|
87
|
+
var packageFileName = outputFilenameList[0];
|
|
88
|
+
var packageUrl = packageFileName ? "".concat(baseUrl, "/build/").concat(packageFileName) : '';
|
|
89
|
+
var indexUrl = isHbbTVPlatform ? (0, _resolveHbbtvDeployUrl.resolveHbbtvDeployUrl)(c, c.runtime.scheme, flavourName) : "".concat(baseUrl, "/public/index.html");
|
|
90
|
+
return {
|
|
91
|
+
packageUrl: packageUrl,
|
|
92
|
+
indexUrl: indexUrl
|
|
93
|
+
};
|
|
62
94
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
_a);
|
|
73
|
-
};
|
|
74
|
-
var outputPlatformData = getSupportedFlavoursForPlatform(c, platformName)
|
|
75
|
-
.map(processPlatformFlavour);
|
|
76
|
-
outputPlatforms[platformName] = Object.assign.apply(Object, __spreadArray([{}], outputPlatformData));
|
|
95
|
+
|
|
96
|
+
var resolveDeployLocations = function resolveDeployLocations(c) {
|
|
97
|
+
var buildVersion = getBuildVersion(c);
|
|
98
|
+
var output = makeOutputObject(buildVersion);
|
|
99
|
+
var outputPlatforms = output.versions[buildVersion].platforms;
|
|
100
|
+
|
|
101
|
+
var processPlatform = function processPlatform(platformName) {
|
|
102
|
+
var processPlatformFlavour = function processPlatformFlavour(flavourName) {
|
|
103
|
+
return _defineProperty({}, flavourName, makeUrls(c, platformName, flavourName));
|
|
77
104
|
};
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
|
|
106
|
+
var outputPlatformData = getSupportedFlavoursForPlatform(c, platformName).map(processPlatformFlavour);
|
|
107
|
+
outputPlatforms[platformName] = Object.assign.apply(Object, [{}].concat(_toConsumableArray(outputPlatformData)));
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
getSupportedPlatforms(c).forEach(processPlatform);
|
|
111
|
+
return output;
|
|
80
112
|
};
|
|
81
|
-
|
|
113
|
+
|
|
114
|
+
exports.resolveDeployLocations = resolveDeployLocations;
|
|
@@ -1,79 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
o[k2] = m[k];
|
|
7
|
-
}));
|
|
8
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
9
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
10
|
-
}) : function(o, v) {
|
|
11
|
-
o["default"] = v;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
12
5
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var ConfigManager = __importStar(require("rnv/dist/core/configManager"));
|
|
33
|
-
var replaceRelevantStringsInConfig_1 = require("../utils/replaceRelevantStringsInConfig");
|
|
6
|
+
exports.isObject = isObject;
|
|
7
|
+
exports.getBaseConfig = void 0;
|
|
8
|
+
|
|
9
|
+
var fs = _interopRequireWildcard(require("fs"));
|
|
10
|
+
|
|
11
|
+
var path = _interopRequireWildcard(require("path"));
|
|
12
|
+
|
|
13
|
+
var ConfigManager = _interopRequireWildcard(require("rnv/dist/core/configManager"));
|
|
14
|
+
|
|
15
|
+
var _replaceRelevantStringsInConfig = require("../utils/replaceRelevantStringsInConfig");
|
|
16
|
+
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
+
|
|
21
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
+
|
|
23
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
24
|
+
|
|
34
25
|
function isObject(item) {
|
|
35
|
-
|
|
26
|
+
return item && _typeof(item) === 'object' && !Array.isArray(item);
|
|
36
27
|
}
|
|
37
|
-
|
|
38
|
-
var mergeDeep = function (target) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
return mergeDeep.apply(void 0, __spreadArray([target], sources));
|
|
28
|
+
|
|
29
|
+
var mergeDeep = function mergeDeep(target) {
|
|
30
|
+
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
31
|
+
sources[_key - 1] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!sources.length) return target;
|
|
35
|
+
var source = sources.shift();
|
|
36
|
+
|
|
37
|
+
if (isObject(target) && isObject(source)) {
|
|
38
|
+
Object.keys(source).forEach(function (key) {
|
|
39
|
+
if (isObject(source[key])) {
|
|
40
|
+
if (!target[key]) Object.assign(target, _defineProperty({}, key, {}));
|
|
41
|
+
mergeDeep(target[key], source[key]);
|
|
42
|
+
} else {
|
|
43
|
+
Object.assign(target, _defineProperty({}, key, source[key]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return mergeDeep.apply(void 0, [target].concat(sources));
|
|
60
49
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
50
|
+
|
|
51
|
+
var mergeFileJsonIntoObject = function mergeFileJsonIntoObject() {
|
|
52
|
+
var filePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
53
|
+
var targetObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
54
|
+
var fileContentAsString = fs.readFileSync(filePath).toString();
|
|
55
|
+
var fileContentAsJSON = JSON.parse(fileContentAsString);
|
|
56
|
+
mergeDeep(targetObject, fileContentAsJSON);
|
|
67
57
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
58
|
+
|
|
59
|
+
var getBaseConfig = function getBaseConfig() {
|
|
60
|
+
var c = ConfigManager.createRnvConfig({
|
|
61
|
+
ci: true
|
|
62
|
+
}, process);
|
|
63
|
+
c.buildConfig = {};
|
|
64
|
+
var packageJsonfileContent = fs.readFileSync('package.json').toString();
|
|
65
|
+
c.files.project["package"] = JSON.parse(packageJsonfileContent); // renative.json
|
|
66
|
+
|
|
67
|
+
mergeFileJsonIntoObject(c.paths.project.config, c.buildConfig); // appConfigs/base/renative.json
|
|
68
|
+
|
|
69
|
+
var baseConfigPath = path.join(c.paths.project.appConfigBase.dir, 'renative.json');
|
|
70
|
+
mergeFileJsonIntoObject(baseConfigPath, c.buildConfig);
|
|
71
|
+
(0, _replaceRelevantStringsInConfig.replaceRelevantStringsInConfig)(c);
|
|
72
|
+
return c;
|
|
78
73
|
};
|
|
79
|
-
|
|
74
|
+
|
|
75
|
+
exports.getBaseConfig = getBaseConfig;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
2
6
|
exports.resolveHbbtvDeployConfig = void 0;
|
|
3
|
-
|
|
7
|
+
|
|
8
|
+
var resolveHbbtvDeployConfig = function resolveHbbtvDeployConfig() {
|
|
9
|
+
return {
|
|
4
10
|
host: 'nxg-bigscreen-test.24imedia.tv',
|
|
5
11
|
username: 'admin',
|
|
6
12
|
privateKeyRelativePath: 'certificates/id_rsa_24i_smartapps_bigscreen',
|
|
@@ -8,5 +14,7 @@ var resolveHbbtvDeployConfig = function () { return ({
|
|
|
8
14
|
hostHomeDir: '/home/admin',
|
|
9
15
|
dockerHtmlRootDir: '/usr/share/nginx/html',
|
|
10
16
|
dockerContainerName: '24inginx'
|
|
11
|
-
}
|
|
12
|
-
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.resolveHbbtvDeployConfig = resolveHbbtvDeployConfig;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
2
6
|
exports.resolveHbbtvDeployUrl = void 0;
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
var _resolveHbbtvRemoteBuildDirRelativePath = require("./resolveHbbtvRemoteBuildDirRelativePath");
|
|
9
|
+
|
|
10
|
+
var _resolveHbbtvDeployConfig = require("./resolveHbbtvDeployConfig");
|
|
11
|
+
|
|
12
|
+
var resolveHbbtvDeployUrl = function resolveHbbtvDeployUrl(c, scheme, appConfigId) {
|
|
13
|
+
var _resolveHbbtvDeployCo = (0, _resolveHbbtvDeployConfig.resolveHbbtvDeployConfig)(),
|
|
14
|
+
host = _resolveHbbtvDeployCo.host;
|
|
15
|
+
|
|
16
|
+
var remoteDirRelativePath = (0, _resolveHbbtvRemoteBuildDirRelativePath.resolveHbbtvRemoteBuildDirRelativePath)(c, scheme, appConfigId);
|
|
17
|
+
return "http://".concat(host, "/").concat(remoteDirRelativePath, "/public/index.html");
|
|
9
18
|
};
|
|
10
|
-
|
|
19
|
+
|
|
20
|
+
exports.resolveHbbtvDeployUrl = resolveHbbtvDeployUrl;
|
|
@@ -1,26 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
2
6
|
exports.resolveHbbtvRemoteBuildDirRelativePath = void 0;
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
|
|
8
|
+
var _rnv = require("rnv");
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
var getConfigProp = _rnv.Common.getConfigProp;
|
|
13
|
+
|
|
14
|
+
var resolveHbbtvRemoteBuildDirRelativePath = function resolveHbbtvRemoteBuildDirRelativePath(c, scheme, appConfigId) {
|
|
15
|
+
var _getConfigProp = getConfigProp(c, _constants.Platforms.HBBTV, 'deploy', {}),
|
|
16
|
+
projectDirName = _getConfigProp.projectDirName;
|
|
17
|
+
|
|
18
|
+
var version = getConfigProp(c, _constants.Platforms.HBBTV, 'packageVersion', '');
|
|
19
|
+
var appId = c.runtime.appId || appConfigId;
|
|
20
|
+
|
|
21
|
+
if (!projectDirName || !appId) {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
switch (c.runtime.scheme || scheme) {
|
|
26
|
+
case _constants.BuildSchemes.DEV_LATEST:
|
|
27
|
+
return "".concat(projectDirName, "/").concat(appId, "/latest/dev");
|
|
28
|
+
|
|
29
|
+
case _constants.BuildSchemes.RC_LATEST:
|
|
30
|
+
return "".concat(projectDirName, "/").concat(appId, "/latest/rc");
|
|
31
|
+
|
|
32
|
+
case _constants.BuildSchemes.RELEASE_LATEST:
|
|
33
|
+
return "".concat(projectDirName, "/").concat(appId, "/latest/release");
|
|
34
|
+
|
|
35
|
+
case _constants.BuildSchemes.RELEASE_DIST:
|
|
36
|
+
return "".concat(projectDirName, "/").concat(appId, "/dist/v").concat(version);
|
|
37
|
+
|
|
38
|
+
default:
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
25
41
|
};
|
|
26
|
-
|
|
42
|
+
|
|
43
|
+
exports.resolveHbbtvRemoteBuildDirRelativePath = resolveHbbtvRemoteBuildDirRelativePath;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
2
6
|
exports.resolveZippedPlatformBuildsRelativeFilePath = void 0;
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
|
|
8
|
+
var _common = require("rnv/dist/core/common");
|
|
9
|
+
|
|
10
|
+
var resolveZippedPlatformBuildsRelativeFilePath = function resolveZippedPlatformBuildsRelativeFilePath(c, platformName) {
|
|
11
|
+
var platformBuildsDir = c.buildConfig.paths.platformBuildsDir;
|
|
12
|
+
var appNameInFileName = (0, _common.getConfigProp)(c, platformName, 'appNameInFileName', '');
|
|
13
|
+
var buildVersion = (0, _common.getConfigProp)(c, platformName, 'packageVersion', '');
|
|
14
|
+
var zippedFilesParentDir = 'zipped_by_platform';
|
|
15
|
+
var fileExtension = 'zip';
|
|
16
|
+
var relativePathToDir = "".concat(platformBuildsDir, "/").concat(zippedFilesParentDir);
|
|
17
|
+
var zipFileName = "".concat(appNameInFileName, "_").concat(platformName, "_").concat(buildVersion, ".").concat(fileExtension);
|
|
18
|
+
return "".concat(relativePathToDir, "/").concat(zipFileName);
|
|
13
19
|
};
|
|
14
|
-
|
|
20
|
+
|
|
21
|
+
exports.resolveZippedPlatformBuildsRelativeFilePath = resolveZippedPlatformBuildsRelativeFilePath;
|
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _child_process = require("child_process");
|
|
4
|
+
|
|
5
|
+
var _forEachSupportedPlatformFlavour = require("../utils/forEachSupportedPlatformFlavour");
|
|
6
|
+
|
|
7
|
+
var _resolvers = require("../resolvers");
|
|
8
|
+
|
|
9
|
+
var buildTask = function buildTask(options) {
|
|
10
|
+
var scheme = options.scheme,
|
|
11
|
+
platform = options.platform,
|
|
12
|
+
flavour = options.flavour;
|
|
13
|
+
var cmd = "npx rnv build -s ".concat(scheme, " -p ").concat(platform, " -c ").concat(flavour, " --ci");
|
|
14
|
+
(0, _child_process.execSync)(cmd, {
|
|
15
|
+
stdio: 'inherit'
|
|
16
|
+
});
|
|
9
17
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
var buildAllWithScheme = function buildAllWithScheme() {
|
|
20
|
+
var scheme = process.argv[2];
|
|
21
|
+
|
|
22
|
+
if (!scheme) {
|
|
23
|
+
throw new Error('No scheme name to use found! Please use rnv scheme name as a param.');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var c = (0, _resolvers.getBaseConfig)();
|
|
27
|
+
c.runtime.scheme = scheme;
|
|
28
|
+
(0, _forEachSupportedPlatformFlavour.forEachSupportedPlatformFlavour)(c, buildTask);
|
|
29
|
+
return true;
|
|
19
30
|
};
|
|
31
|
+
|
|
20
32
|
var startTimestamp = Date.now();
|
|
21
33
|
buildAllWithScheme();
|
|
22
34
|
var msPerSecond = 1000;
|
|
23
35
|
var scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
|
|
24
|
-
console.log("buildAllWithScheme: done in "
|
|
36
|
+
console.log("buildAllWithScheme: done in ".concat(scriptTotalTimeInSeconds, " second(s)!"));
|
|
@@ -1,18 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _resolvers = require("../../resolvers");
|
|
4
|
+
|
|
5
|
+
var _gitUtils = require("../utils/gitUtils");
|
|
6
|
+
|
|
7
|
+
var _c$buildConfig, _c$buildConfig$common, _c$buildConfig2;
|
|
8
|
+
|
|
9
|
+
var c = (0, _resolvers.getBaseConfig)();
|
|
10
|
+
|
|
11
|
+
var _ref = ((_c$buildConfig = c.buildConfig) === null || _c$buildConfig === void 0 ? void 0 : (_c$buildConfig$common = _c$buildConfig.common) === null || _c$buildConfig$common === void 0 ? void 0 : _c$buildConfig$common.git) || {},
|
|
12
|
+
_ref$branchNames = _ref.branchNames,
|
|
13
|
+
branchNames = _ref$branchNames === void 0 ? {} : _ref$branchNames,
|
|
14
|
+
_ref$commitTitles = _ref.commitTitles,
|
|
15
|
+
commitTitles = _ref$commitTitles === void 0 ? {} : _ref$commitTitles;
|
|
16
|
+
|
|
17
|
+
var _ref2 = ((_c$buildConfig2 = c.buildConfig) === null || _c$buildConfig2 === void 0 ? void 0 : _c$buildConfig2.common) || {},
|
|
18
|
+
_ref2$packageVersion = _ref2.packageVersion,
|
|
19
|
+
packageVersion = _ref2$packageVersion === void 0 ? '' : _ref2$packageVersion;
|
|
20
|
+
|
|
8
21
|
var newReleaseBranchName = branchNames.rc;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
(0, _gitUtils.createBranch)(newReleaseBranchName);
|
|
23
|
+
(0, _gitUtils.checkout)(newReleaseBranchName);
|
|
24
|
+
(0, _gitUtils.addAll)(); // add version changes into a git stage
|
|
25
|
+
|
|
12
26
|
var withNoVerifyFlag = true;
|
|
13
27
|
console.log('Creating commit with changed version...');
|
|
14
|
-
|
|
15
|
-
console.log("Pushing "
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
console.log(
|
|
28
|
+
(0, _gitUtils.commit)(commitTitles.versionBump, withNoVerifyFlag);
|
|
29
|
+
console.log("Pushing ".concat(newReleaseBranchName, " branch..."));
|
|
30
|
+
(0, _gitUtils.push)(newReleaseBranchName, withNoVerifyFlag); // eslint-disable-next-line max-len
|
|
31
|
+
|
|
32
|
+
console.log("\nDone! The version has been bumped to ".concat(packageVersion, " and ").concat(newReleaseBranchName, " branch pushed into the remote repository."));
|
|
33
|
+
console.log('Note: Do not forget to update release notes for upcoming release!');
|