@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1343 → 0.0.2-alpha.1345
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 +11 -14
- package/dist/src/constants/index.js +6 -20
- package/dist/src/constants/platforms.js +8 -11
- package/dist/src/index.js +68 -79
- package/dist/src/resolvers/index.js +20 -76
- package/dist/src/resolvers/resolveBaseUrl.js +29 -55
- package/dist/src/resolvers/resolveBuildVersion.js +37 -58
- package/dist/src/resolvers/resolveBuildVersionOffset.js +30 -49
- package/dist/src/resolvers/resolveDeployLocations.js +62 -106
- package/dist/src/resolvers/resolveGenericRnvConfig.js +61 -68
- package/dist/src/resolvers/resolveHbbtvDeployConfig.js +5 -12
- package/dist/src/resolvers/resolveHbbtvDeployUrl.js +8 -17
- package/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +24 -40
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +12 -18
- package/dist/src/scripts/buildAllWithScheme.js +21 -32
- package/dist/src/scripts/gitReleaser/afterVersionBump.js +17 -31
- package/dist/src/scripts/gitReleaser/beforeVersionBump.js +10 -20
- package/dist/src/scripts/gitReleaser/checkReleaseNotes.js +15 -31
- package/dist/src/scripts/gitReleaser/pushRelease.js +27 -48
- package/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +4 -9
- package/dist/src/scripts/gitReleaser/pushReleaseNotes.js +33 -63
- package/dist/src/scripts/release/deleteSourceMaps.js +8 -19
- package/dist/src/scripts/release/deployToAppCenter.js +60 -81
- package/dist/src/scripts/release/githubRelease.js +106 -142
- package/dist/src/scripts/release/notifySlack/makePayload.js +75 -136
- package/dist/src/scripts/release/notifySlack/notifySlack.js +37 -43
- package/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +27 -56
- package/dist/src/scripts/release/sentryRelease.js +62 -96
- package/dist/src/scripts/release/urlsMarkdown.js +51 -109
- package/dist/src/scripts/releaseAllWithScheme.js +69 -97
- package/dist/src/scripts/utils/cmdUtils.js +10 -29
- package/dist/src/scripts/utils/fsUtils.js +9 -16
- package/dist/src/scripts/utils/gitUtils.js +68 -108
- package/dist/src/scripts/utils/index.js +9 -14
- package/dist/src/scripts/utils/stringUtils.js +3 -8
- package/dist/src/sdks/index.js +35 -59
- package/dist/src/sdks/sdk-tizen/index.js +203 -517
- package/dist/src/sdks/sdk-webos/index.js +138 -377
- package/dist/src/sdks/sdk-webpack/index.js +25 -100
- package/dist/src/sdks/sdkUtils.js +15 -71
- package/dist/src/tasks/deploy/aswS3/aws.js +21 -41
- package/dist/src/tasks/deploy/aswS3/deployS3.js +70 -105
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +96 -199
- package/dist/src/tasks/engineTasks.js +20 -23
- package/dist/src/tasks/task.rnv.build.js +101 -176
- package/dist/src/tasks/task.rnv.configure.js +46 -103
- package/dist/src/tasks/task.rnv.configureSoft.js +27 -79
- package/dist/src/tasks/task.rnv.deploy.js +33 -76
- package/dist/src/tasks/task.rnv.hooks.run.js +55 -122
- package/dist/src/tasks/task.rnv.package.js +23 -62
- package/dist/src/tasks/task.rnv.project.configure.js +104 -261
- package/dist/src/tasks/task.rnv.start.js +48 -95
- package/dist/src/types/c.js +2 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +19 -38
- package/dist/src/utils/replaceRelevantStringsInConfig/index.js +4 -12
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +29 -44
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +54 -83
- package/dist/src/utils/zipBuildsByPlatforms.js +42 -77
- package/dist/templates/platforms/_shared/template.js +76 -91
- package/dist/templates/platforms/_shared/webpack.base.js +244 -271
- package/dist/templates/platforms/entone/webpack.config.dev.js +46 -46
- package/dist/templates/platforms/entone/webpack.config.prod.js +40 -40
- package/dist/templates/platforms/hbbtv/webpack.config.dev.js +63 -50
- package/dist/templates/platforms/hbbtv/webpack.config.prod.js +57 -44
- package/dist/templates/platforms/tizen/webpack.config.dev.js +47 -47
- package/dist/templates/platforms/tizen/webpack.config.prod.js +40 -40
- package/dist/templates/platforms/webos/project/public/content/js/webOSTVjs-1.2.3/webOSTV.js +1 -391
- package/dist/templates/platforms/webos/webpack.config.dev.js +50 -48
- package/dist/templates/platforms/webos/webpack.config.prod.js +42 -40
- package/dist/templates/platforms/webtv/webpack.config.dev.js +46 -46
- package/dist/templates/platforms/webtv/webpack.config.prod.js +40 -40
- package/dist/types/src/constants/buildSchemes.d.ts +11 -0
- package/dist/types/src/constants/index.d.ts +2 -0
- package/dist/types/src/constants/platforms.d.ts +8 -0
- package/dist/types/src/index.d.ts +18 -0
- package/dist/types/src/resolvers/index.d.ts +9 -0
- package/dist/types/src/resolvers/resolveBaseUrl.d.ts +6 -0
- package/dist/types/src/resolvers/resolveBuildVersion.d.ts +6 -0
- package/dist/types/src/resolvers/resolveBuildVersionOffset.d.ts +3 -0
- package/dist/types/src/resolvers/resolveDeployLocations.d.ts +9 -0
- package/dist/types/src/resolvers/resolveGenericRnvConfig.d.ts +4 -0
- package/dist/types/src/resolvers/resolveHbbtvDeployConfig.d.ts +10 -0
- package/dist/types/src/resolvers/resolveHbbtvDeployUrl.d.ts +3 -0
- package/dist/types/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.d.ts +3 -0
- package/dist/types/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.d.ts +3 -0
- package/dist/types/src/scripts/buildAllWithScheme.d.ts +1 -0
- package/dist/types/src/scripts/gitReleaser/afterVersionBump.d.ts +1 -0
- package/dist/types/src/scripts/gitReleaser/beforeVersionBump.d.ts +1 -0
- package/dist/types/src/scripts/gitReleaser/checkReleaseNotes.d.ts +1 -0
- package/dist/types/src/scripts/gitReleaser/pushRelease.d.ts +1 -0
- package/dist/types/src/scripts/gitReleaser/pushReleaseCandidate.d.ts +1 -0
- package/dist/types/src/scripts/gitReleaser/pushReleaseNotes.d.ts +1 -0
- package/dist/types/src/scripts/release/deleteSourceMaps.d.ts +1 -0
- package/dist/types/src/scripts/release/deployToAppCenter.d.ts +1 -0
- package/dist/types/src/scripts/release/githubRelease.d.ts +1 -0
- package/dist/types/src/scripts/release/notifySlack/makePayload.d.ts +15 -0
- package/dist/types/src/scripts/release/notifySlack/notifySlack.d.ts +1 -0
- package/dist/types/src/scripts/release/notifySlack/slackBlockKitBuilder.d.ts +26 -0
- package/dist/types/src/scripts/release/sentryRelease.d.ts +1 -0
- package/dist/types/src/scripts/release/urlsMarkdown.d.ts +1 -0
- package/dist/types/src/scripts/releaseAllWithScheme.d.ts +1 -0
- package/dist/types/src/scripts/utils/cmdUtils.d.ts +4 -0
- package/dist/types/src/scripts/utils/fsUtils.d.ts +2 -0
- package/dist/types/src/scripts/utils/gitUtils.d.ts +14 -0
- package/dist/types/src/scripts/utils/index.d.ts +5 -0
- package/dist/types/src/scripts/utils/stringUtils.d.ts +1 -0
- package/dist/types/src/sdks/index.d.ts +5 -0
- package/dist/types/src/sdks/sdk-tizen/index.d.ts +5 -0
- package/dist/types/src/sdks/sdk-webos/index.d.ts +4 -0
- package/dist/types/src/sdks/sdk-webpack/index.d.ts +4 -0
- package/dist/types/src/sdks/sdkUtils.d.ts +2 -0
- package/dist/types/src/tasks/deploy/aswS3/aws.d.ts +2 -0
- package/dist/types/src/tasks/deploy/aswS3/deployS3.d.ts +1 -0
- package/dist/types/src/tasks/deploy/hbbtv/deployHbbtv.d.ts +1 -0
- package/dist/types/src/tasks/engineTasks.d.ts +13 -0
- package/dist/types/src/tasks/task.rnv.build.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.configure.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.configureSoft.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.deploy.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.hooks.run.d.ts +13 -0
- package/dist/types/src/tasks/task.rnv.package.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.project.configure.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.start.d.ts +9 -0
- package/dist/types/src/types/c.d.ts +316 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/utils/forEachSupportedPlatformFlavour.d.ts +1 -0
- package/dist/types/src/utils/replaceRelevantStringsInConfig/index.d.ts +1 -0
- package/dist/types/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.d.ts +1 -0
- package/dist/types/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.d.ts +1 -0
- package/dist/types/src/utils/zipBuildsByPlatforms.d.ts +1 -0
- package/dist/types/templates/platforms/_shared/template.d.ts +2 -0
- package/dist/types/templates/platforms/_shared/webpack.base.d.ts +1 -0
- package/dist/types/templates/platforms/entone/webpack.config.dev.d.ts +2 -0
- package/dist/types/templates/platforms/entone/webpack.config.prod.d.ts +2 -0
- package/dist/types/templates/platforms/hbbtv/webpack.config.dev.d.ts +2 -0
- package/dist/types/templates/platforms/hbbtv/webpack.config.prod.d.ts +2 -0
- package/dist/types/templates/platforms/tizen/webpack.config.dev.d.ts +2 -0
- package/dist/types/templates/platforms/tizen/webpack.config.prod.d.ts +2 -0
- package/dist/types/templates/platforms/webos/webpack.config.dev.d.ts +2 -0
- package/dist/types/templates/platforms/webos/webpack.config.prod.d.ts +2 -0
- package/dist/types/templates/platforms/webtv/webpack.config.dev.d.ts +2 -0
- package/dist/types/templates/platforms/webtv/webpack.config.prod.d.ts +2 -0
- package/package.json +14 -17
|
@@ -1,114 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.resolveDeployLocations = void 0;
|
|
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
|
-
});
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
4
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveDeployLocations = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const resolveBuildVersion_1 = require("./resolveBuildVersion");
|
|
9
|
+
const resolveBaseUrl_1 = require("./resolveBaseUrl");
|
|
10
|
+
const resolveHbbtvDeployUrl_1 = require("./resolveHbbtvDeployUrl");
|
|
11
|
+
const constants_1 = require("../constants");
|
|
12
|
+
const getBuildVersion = (c) => {
|
|
13
|
+
const { platform, runtime } = c;
|
|
14
|
+
const { scheme, appId } = runtime;
|
|
15
|
+
return resolveBuildVersion_1.resolveBuildVersion({
|
|
16
|
+
platform,
|
|
17
|
+
scheme,
|
|
18
|
+
appConfigId: appId,
|
|
19
|
+
});
|
|
56
20
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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;
|
|
21
|
+
const getSupportedPlatforms = (c) => {
|
|
22
|
+
const { supportedPlatforms = [] } = c.buildConfig.defaults || {};
|
|
23
|
+
return supportedPlatforms;
|
|
66
24
|
};
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
versions: _defineProperty({}, buildVersion, {
|
|
72
|
-
platforms: {}
|
|
73
|
-
})
|
|
74
|
-
};
|
|
25
|
+
const getSupportedFlavoursForPlatform = (c, platformName) => {
|
|
26
|
+
var _a;
|
|
27
|
+
const { supportedFlavours = [] } = ((_a = c.buildConfig.platforms[platformName]) === null || _a === void 0 ? void 0 : _a.deploy) || {};
|
|
28
|
+
return supportedFlavours;
|
|
75
29
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
30
|
+
const makeOutputObject = (buildVersion = '') => ({
|
|
31
|
+
versions: {
|
|
32
|
+
[buildVersion]: {
|
|
33
|
+
platforms: {},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
const makeUrls = (c, platformName, flavourName) => {
|
|
38
|
+
const isHbbTVPlatform = platformName === constants_1.Platforms.HBBTV;
|
|
39
|
+
const baseUrl = resolveBaseUrl_1.resolveBaseUrl({
|
|
40
|
+
platform: platformName,
|
|
41
|
+
scheme: c.runtime.scheme || '',
|
|
42
|
+
appConfigId: flavourName,
|
|
43
|
+
});
|
|
44
|
+
if (!baseUrl)
|
|
45
|
+
return null;
|
|
46
|
+
const packageOutputDirPath = `platformBuilds/${flavourName}_${platformName}/output`;
|
|
47
|
+
const outputFilenameList = fs_1.default.readdirSync(packageOutputDirPath);
|
|
48
|
+
const packageFileName = outputFilenameList[0];
|
|
49
|
+
const packageUrl = packageFileName ? `${baseUrl}/build/${packageFileName}` : '';
|
|
50
|
+
const indexUrl = isHbbTVPlatform
|
|
51
|
+
? resolveHbbtvDeployUrl_1.resolveHbbtvDeployUrl(c, c.runtime.scheme, flavourName)
|
|
52
|
+
: `${baseUrl}/public/index.html`;
|
|
53
|
+
return { packageUrl, indexUrl };
|
|
94
54
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
55
|
+
const resolveDeployLocations = (c) => {
|
|
56
|
+
const buildVersion = getBuildVersion(c);
|
|
57
|
+
const output = makeOutputObject(buildVersion);
|
|
58
|
+
const outputPlatforms = output.versions[buildVersion].platforms;
|
|
59
|
+
const processPlatform = (platformName) => {
|
|
60
|
+
const processPlatformFlavour = (flavourName) => ({
|
|
61
|
+
[flavourName]: makeUrls(c, platformName, flavourName),
|
|
62
|
+
});
|
|
63
|
+
const outputPlatformData = getSupportedFlavoursForPlatform(c, platformName)
|
|
64
|
+
.map(processPlatformFlavour);
|
|
65
|
+
outputPlatforms[platformName] = Object.assign({}, ...outputPlatformData);
|
|
104
66
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
outputPlatforms[platformName] = Object.assign.apply(Object, [{}].concat(_toConsumableArray(outputPlatformData)));
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
getSupportedPlatforms(c).forEach(processPlatform);
|
|
111
|
-
return output;
|
|
67
|
+
getSupportedPlatforms(c).forEach(processPlatform);
|
|
68
|
+
return output;
|
|
112
69
|
};
|
|
113
|
-
|
|
114
|
-
exports.resolveDeployLocations = resolveDeployLocations;
|
|
70
|
+
exports.resolveDeployLocations = resolveDeployLocations;
|
|
@@ -1,75 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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;
|
|
5
13
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.getBaseConfig = exports.isObject = void 0;
|
|
26
|
+
const fs_1 = __importDefault(require("fs"));
|
|
27
|
+
const path_1 = __importDefault(require("path"));
|
|
28
|
+
const ConfigManager = __importStar(require("rnv/dist/core/configManager"));
|
|
29
|
+
const replaceRelevantStringsInConfig_1 = require("../utils/replaceRelevantStringsInConfig");
|
|
25
30
|
function isObject(item) {
|
|
26
|
-
|
|
31
|
+
return (item && typeof item === 'object' && !Array.isArray(item));
|
|
27
32
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return mergeDeep.apply(void 0, [target].concat(sources));
|
|
33
|
+
exports.isObject = isObject;
|
|
34
|
+
const mergeDeep = (target, ...sources) => {
|
|
35
|
+
if (!sources.length)
|
|
36
|
+
return target;
|
|
37
|
+
const source = sources.shift();
|
|
38
|
+
if (isObject(target) && isObject(source)) {
|
|
39
|
+
Object.keys(source).forEach((key) => {
|
|
40
|
+
if (isObject(source[key])) {
|
|
41
|
+
if (!target[key])
|
|
42
|
+
Object.assign(target, { [key]: {} });
|
|
43
|
+
mergeDeep(target[key], source[key]);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
Object.assign(target, { [key]: source[key] });
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return mergeDeep(target, ...sources);
|
|
49
51
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var fileContentAsString = fs.readFileSync(filePath).toString();
|
|
55
|
-
var fileContentAsJSON = JSON.parse(fileContentAsString);
|
|
56
|
-
mergeDeep(targetObject, fileContentAsJSON);
|
|
52
|
+
const mergeFileJsonIntoObject = (filePath = '', targetObject = {}) => {
|
|
53
|
+
const fileContentAsString = fs_1.default.readFileSync(filePath).toString();
|
|
54
|
+
const fileContentAsJSON = JSON.parse(fileContentAsString);
|
|
55
|
+
mergeDeep(targetObject, fileContentAsJSON);
|
|
57
56
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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;
|
|
57
|
+
const getBaseConfig = () => {
|
|
58
|
+
const c = ConfigManager.createRnvConfig({ ci: true }, process);
|
|
59
|
+
c.buildConfig = {};
|
|
60
|
+
const packageJsonfileContent = fs_1.default.readFileSync('package.json').toString();
|
|
61
|
+
c.files.project.package = JSON.parse(packageJsonfileContent);
|
|
62
|
+
mergeFileJsonIntoObject(c.paths.project.config, c.buildConfig);
|
|
63
|
+
const baseConfigPath = path_1.default.join(c.paths.project.appConfigBase.dir, 'renative.json');
|
|
64
|
+
mergeFileJsonIntoObject(baseConfigPath, c.buildConfig);
|
|
65
|
+
replaceRelevantStringsInConfig_1.replaceRelevantStringsInConfig(c);
|
|
66
|
+
return c;
|
|
73
67
|
};
|
|
74
|
-
|
|
75
|
-
exports.getBaseConfig = getBaseConfig;
|
|
68
|
+
exports.getBaseConfig = getBaseConfig;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.resolveHbbtvDeployConfig = void 0;
|
|
7
|
-
|
|
8
|
-
var resolveHbbtvDeployConfig = function resolveHbbtvDeployConfig() {
|
|
9
|
-
return {
|
|
4
|
+
const resolveHbbtvDeployConfig = () => ({
|
|
10
5
|
host: 'nxg-bigscreen-test.24imedia.tv',
|
|
11
6
|
username: 'admin',
|
|
12
7
|
privateKeyRelativePath: 'certificates/id_rsa_24i_smartapps_bigscreen',
|
|
13
8
|
passphrase: process.env.CI_SSH_KEY_PASSPHRASE,
|
|
14
9
|
hostHomeDir: '/home/admin',
|
|
15
10
|
dockerHtmlRootDir: '/usr/share/nginx/html',
|
|
16
|
-
dockerContainerName: '24inginx'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.resolveHbbtvDeployConfig = resolveHbbtvDeployConfig;
|
|
11
|
+
dockerContainerName: '24inginx',
|
|
12
|
+
});
|
|
13
|
+
exports.resolveHbbtvDeployConfig = resolveHbbtvDeployConfig;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.resolveHbbtvDeployUrl = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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");
|
|
4
|
+
const resolveHbbtvRemoteBuildDirRelativePath_1 = require("./resolveHbbtvRemoteBuildDirRelativePath");
|
|
5
|
+
const resolveHbbtvDeployConfig_1 = require("./resolveHbbtvDeployConfig");
|
|
6
|
+
const resolveHbbtvDeployUrl = (c, scheme, appConfigId) => {
|
|
7
|
+
const { host } = resolveHbbtvDeployConfig_1.resolveHbbtvDeployConfig();
|
|
8
|
+
const remoteDirRelativePath = resolveHbbtvRemoteBuildDirRelativePath_1.resolveHbbtvRemoteBuildDirRelativePath(c, scheme, appConfigId);
|
|
9
|
+
return `http://${host}/${remoteDirRelativePath}/public/index.html`;
|
|
18
10
|
};
|
|
19
|
-
|
|
20
|
-
exports.resolveHbbtvDeployUrl = resolveHbbtvDeployUrl;
|
|
11
|
+
exports.resolveHbbtvDeployUrl = resolveHbbtvDeployUrl;
|
|
@@ -1,43 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.resolveHbbtvRemoteBuildDirRelativePath = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
}
|
|
4
|
+
const rnv_1 = require("rnv");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const { getConfigProp } = rnv_1.Common;
|
|
7
|
+
const resolveHbbtvRemoteBuildDirRelativePath = (c, scheme, appConfigId) => {
|
|
8
|
+
const { projectDirName } = getConfigProp(c, constants_1.Platforms.HBBTV, 'deploy', {});
|
|
9
|
+
const version = getConfigProp(c, constants_1.Platforms.HBBTV, 'packageVersion', '');
|
|
10
|
+
const appId = c.runtime.appId || appConfigId;
|
|
11
|
+
if (!projectDirName || !appId) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
switch (c.runtime.scheme || scheme) {
|
|
15
|
+
case constants_1.BuildSchemes.DEV_LATEST:
|
|
16
|
+
return `${projectDirName}/${appId}/latest/dev`;
|
|
17
|
+
case constants_1.BuildSchemes.RC_LATEST:
|
|
18
|
+
return `${projectDirName}/${appId}/latest/rc`;
|
|
19
|
+
case constants_1.BuildSchemes.RELEASE_LATEST:
|
|
20
|
+
return `${projectDirName}/${appId}/latest/release`;
|
|
21
|
+
case constants_1.BuildSchemes.RELEASE_DIST:
|
|
22
|
+
return `${projectDirName}/${appId}/dist/v${version}`;
|
|
23
|
+
default:
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
41
26
|
};
|
|
42
|
-
|
|
43
|
-
exports.resolveHbbtvRemoteBuildDirRelativePath = resolveHbbtvRemoteBuildDirRelativePath;
|
|
27
|
+
exports.resolveHbbtvRemoteBuildDirRelativePath = resolveHbbtvRemoteBuildDirRelativePath;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.resolveZippedPlatformBuildsRelativeFilePath = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var zipFileName = "".concat(appNameInFileName, "_").concat(platformName, "_").concat(buildVersion, ".").concat(fileExtension);
|
|
18
|
-
return "".concat(relativePathToDir, "/").concat(zipFileName);
|
|
4
|
+
const common_1 = require("rnv/dist/core/common");
|
|
5
|
+
const resolveZippedPlatformBuildsRelativeFilePath = (c, platformName) => {
|
|
6
|
+
const { platformBuildsDir } = c.buildConfig.paths;
|
|
7
|
+
const appNameInFileName = common_1.getConfigProp(c, platformName, 'appNameInFileName', '');
|
|
8
|
+
const buildVersion = common_1.getConfigProp(c, platformName, 'packageVersion', '');
|
|
9
|
+
const zippedFilesParentDir = 'zipped_by_platform';
|
|
10
|
+
const fileExtension = 'zip';
|
|
11
|
+
const relativePathToDir = `${platformBuildsDir}/${zippedFilesParentDir}`;
|
|
12
|
+
const zipFileName = `${appNameInFileName}_${platformName}_${buildVersion}.${fileExtension}`;
|
|
13
|
+
return `${relativePathToDir}/${zipFileName}`;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
|
-
exports.resolveZippedPlatformBuildsRelativeFilePath = resolveZippedPlatformBuildsRelativeFilePath;
|
|
15
|
+
exports.resolveZippedPlatformBuildsRelativeFilePath = resolveZippedPlatformBuildsRelativeFilePath;
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const child_process_1 = require("child_process");
|
|
4
|
+
const forEachSupportedPlatformFlavour_1 = require("../utils/forEachSupportedPlatformFlavour");
|
|
5
|
+
const resolvers_1 = require("../resolvers");
|
|
6
|
+
const buildTask = (options) => {
|
|
7
|
+
const { scheme, platform, flavour } = options;
|
|
8
|
+
const cmd = `npx rnv build -s ${scheme} -p ${platform} -c ${flavour} --ci`;
|
|
9
|
+
child_process_1.execSync(cmd, { stdio: 'inherit' });
|
|
17
10
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
c.runtime.scheme = scheme;
|
|
28
|
-
(0, _forEachSupportedPlatformFlavour.forEachSupportedPlatformFlavour)(c, buildTask);
|
|
29
|
-
return true;
|
|
11
|
+
const buildAllWithScheme = () => {
|
|
12
|
+
const scheme = process.argv[2];
|
|
13
|
+
if (!scheme) {
|
|
14
|
+
throw new Error('No scheme name to use found! Please use rnv scheme name as a param.');
|
|
15
|
+
}
|
|
16
|
+
const c = resolvers_1.getBaseConfig();
|
|
17
|
+
c.runtime.scheme = scheme;
|
|
18
|
+
forEachSupportedPlatformFlavour_1.forEachSupportedPlatformFlavour(c, buildTask);
|
|
19
|
+
return true;
|
|
30
20
|
};
|
|
31
|
-
|
|
32
|
-
var startTimestamp = Date.now();
|
|
21
|
+
const startTimestamp = Date.now();
|
|
33
22
|
buildAllWithScheme();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
console.log(
|
|
23
|
+
const msPerSecond = 1000;
|
|
24
|
+
const scriptTotalTimeInSeconds = Math.ceil((Date.now() - startTimestamp) / msPerSecond);
|
|
25
|
+
console.log(`buildAllWithScheme: done in ${scriptTotalTimeInSeconds} second(s)!`);
|
|
@@ -1,33 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
21
|
-
var newReleaseBranchName = branchNames.rc;
|
|
22
|
-
(0, _gitUtils.createBranch)(newReleaseBranchName);
|
|
23
|
-
(0, _gitUtils.checkout)(newReleaseBranchName);
|
|
24
|
-
(0, _gitUtils.addAll)(); // add version changes into a git stage
|
|
25
|
-
|
|
26
|
-
var withNoVerifyFlag = true;
|
|
2
|
+
var _a, _b, _c;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const resolvers_1 = require("../../resolvers");
|
|
5
|
+
const gitUtils_1 = require("../utils/gitUtils");
|
|
6
|
+
const c = resolvers_1.getBaseConfig();
|
|
7
|
+
const { branchNames = {}, commitTitles = {} } = ((_b = (_a = c.buildConfig) === null || _a === void 0 ? void 0 : _a.common) === null || _b === void 0 ? void 0 : _b.git) || {};
|
|
8
|
+
const { packageVersion = '' } = ((_c = c.buildConfig) === null || _c === void 0 ? void 0 : _c.common) || {};
|
|
9
|
+
const newReleaseBranchName = branchNames.rc;
|
|
10
|
+
gitUtils_1.createBranch(newReleaseBranchName);
|
|
11
|
+
gitUtils_1.checkout(newReleaseBranchName);
|
|
12
|
+
gitUtils_1.addAll();
|
|
13
|
+
const withNoVerifyFlag = true;
|
|
27
14
|
console.log('Creating commit with changed version...');
|
|
28
|
-
|
|
29
|
-
console.log(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
console.log(
|
|
33
|
-
console.log('Note: Do not forget to update release notes for upcoming release!');
|
|
15
|
+
gitUtils_1.commit(commitTitles.versionBump, withNoVerifyFlag);
|
|
16
|
+
console.log(`Pushing ${newReleaseBranchName} branch...`);
|
|
17
|
+
gitUtils_1.push(newReleaseBranchName, withNoVerifyFlag);
|
|
18
|
+
console.log(`\nDone! The version has been bumped to ${packageVersion} and ${newReleaseBranchName} branch pushed into the remote repository.`);
|
|
19
|
+
console.log('Note: Do not forget to update release notes for upcoming release!');
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var ok = _assert.strict.ok;
|
|
12
|
-
var c = (0, _resolvers.getBaseConfig)();
|
|
13
|
-
|
|
14
|
-
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) || {},
|
|
15
|
-
_ref$branchNames = _ref.branchNames,
|
|
16
|
-
branchNames = _ref$branchNames === void 0 ? {} : _ref$branchNames,
|
|
17
|
-
_ref$commitTitles = _ref.commitTitles,
|
|
18
|
-
commitTitles = _ref$commitTitles === void 0 ? {} : _ref$commitTitles;
|
|
19
|
-
|
|
2
|
+
var _a, _b;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const assert_1 = require("assert");
|
|
5
|
+
const resolvers_1 = require("../../resolvers");
|
|
6
|
+
const gitUtils_1 = require("../utils/gitUtils");
|
|
7
|
+
const { ok } = assert_1.strict;
|
|
8
|
+
const c = resolvers_1.getBaseConfig();
|
|
9
|
+
const { branchNames = {}, commitTitles = {} } = ((_b = (_a = c.buildConfig) === null || _a === void 0 ? void 0 : _a.common) === null || _b === void 0 ? void 0 : _b.git) || {};
|
|
20
10
|
ok(branchNames.dev);
|
|
21
11
|
ok(branchNames.rc);
|
|
22
12
|
ok(commitTitles.versionBump);
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
gitUtils_1.assertCurrentBranch(branchNames.dev);
|
|
14
|
+
gitUtils_1.assertEmptyStatusList();
|