@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1323 → 0.0.2-alpha.1325
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/enginePlatforms.js +10 -13
- package/dist/src/index.js +47 -72
- package/dist/src/scripts/buildAllWithScheme.js +20 -30
- package/dist/src/scripts/gitReleaser/afterVersionBump.js +15 -28
- 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 +22 -43
- package/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +4 -9
- package/dist/src/scripts/gitReleaser/pushReleaseNotes.js +38 -74
- package/dist/src/scripts/release/deleteSourceMaps.js +8 -19
- package/dist/src/scripts/release/deployToAppCenter.js +58 -81
- package/dist/src/scripts/release/githubRelease.js +103 -137
- package/dist/src/scripts/release/notifySlack/makePayload.js +74 -135
- package/dist/src/scripts/release/notifySlack/notifySlack.js +19 -44
- package/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +25 -51
- package/dist/src/scripts/release/sentryRelease.js +57 -93
- package/dist/src/scripts/release/urlsMarkdown.js +51 -110
- package/dist/src/scripts/releaseAllWithScheme.js +69 -96
- package/dist/src/scripts/utils/cmdUtils.js +10 -29
- package/dist/src/scripts/utils/fsUtils.js +7 -14
- package/dist/src/scripts/utils/gitUtils.js +67 -104
- package/dist/src/scripts/utils/index.js +5 -10
- package/dist/src/scripts/utils/stringUtils.js +5 -7
- package/dist/src/sdks/index.js +19 -64
- package/dist/src/sdks/sdk-tizen/index.js +267 -516
- package/dist/src/sdks/sdk-webos/index.js +193 -381
- package/dist/src/sdks/sdk-webpack/index.js +36 -98
- package/dist/src/sdks/sdkUtils.js +23 -70
- package/dist/src/tasks/deploy/aswS3/aws.js +18 -41
- package/dist/src/tasks/deploy/aswS3/deployS3.js +49 -107
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +136 -239
- package/dist/src/tasks/engineTasks.js +20 -25
- package/dist/src/tasks/task.rnv.build.js +116 -182
- package/dist/src/tasks/task.rnv.configure.js +58 -105
- package/dist/src/tasks/task.rnv.configureSoft.js +44 -82
- package/dist/src/tasks/task.rnv.deploy.js +48 -80
- package/dist/src/tasks/task.rnv.hooks.run.js +66 -125
- package/dist/src/tasks/task.rnv.package.js +30 -63
- package/dist/src/tasks/task.rnv.project.configure.js +156 -264
- package/dist/src/tasks/task.rnv.start.js +56 -97
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +19 -38
- package/dist/src/utils/getBaseConfig.js +47 -76
- package/dist/src/utils/getDeployLocations.js +64 -101
- package/dist/src/utils/getVersionOffset.js +30 -50
- package/dist/src/utils/replaceRelevantStringsInConfig/index.js +4 -12
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +30 -44
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +59 -82
- package/dist/src/utils/resolveBaseUrl.js +29 -53
- package/dist/src/utils/resolveBuildVersion.js +37 -56
- package/dist/src/utils/zipBuildsByPlatforms.js +48 -87
- package/dist/templates/platforms/_shared/template.js +48 -81
- package/dist/templates/platforms/_shared/webpack.base.js +235 -253
- package/dist/templates/platforms/entone/webpack.config.dev.js +28 -40
- package/dist/templates/platforms/entone/webpack.config.prod.js +26 -34
- package/dist/templates/platforms/hbbtv/webpack.config.dev.js +32 -41
- package/dist/templates/platforms/hbbtv/webpack.config.prod.js +30 -35
- package/dist/templates/platforms/tizen/webpack.config.dev.js +28 -41
- package/dist/templates/platforms/tizen/webpack.config.prod.js +26 -34
- 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 +30 -42
- package/dist/templates/platforms/webos/webpack.config.prod.js +28 -34
- package/dist/templates/platforms/webtv/webpack.config.dev.js +28 -40
- package/dist/templates/platforms/webtv/webpack.config.prod.js +26 -34
- package/dist/types/src/enginePlatforms.d.ts +8 -0
- package/dist/types/src/index.d.ts +15 -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 +9 -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 +2 -0
- package/dist/types/src/tasks/engineTasks.d.ts +19 -0
- package/dist/types/src/tasks/task.rnv.build.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.configure.d.ts +10 -0
- package/dist/types/src/tasks/task.rnv.configureSoft.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.deploy.d.ts +10 -0
- package/dist/types/src/tasks/task.rnv.hooks.run.d.ts +13 -0
- package/dist/types/src/tasks/task.rnv.package.d.ts +10 -0
- package/dist/types/src/tasks/task.rnv.project.configure.d.ts +9 -0
- package/dist/types/src/tasks/task.rnv.start.d.ts +10 -0
- package/dist/types/src/utils/forEachSupportedPlatformFlavour.d.ts +1 -0
- package/dist/types/src/utils/getBaseConfig.d.ts +2 -0
- package/dist/types/src/utils/getDeployLocations.d.ts +7 -0
- package/dist/types/src/utils/getVersionOffset.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/resolveBaseUrl.d.ts +5 -0
- package/dist/types/src/utils/resolveBuildVersion.d.ts +5 -0
- package/dist/types/src/utils/zipBuildsByPlatforms.d.ts +2 -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 +15 -13
- package/engine/src/enginePlatforms.js +0 -16
- package/engine/src/index.js +0 -67
- package/engine/src/scripts/buildAllWithScheme.js +0 -29
- package/engine/src/scripts/gitReleaser/afterVersionBump.js +0 -24
- package/engine/src/scripts/gitReleaser/beforeVersionBump.js +0 -15
- package/engine/src/scripts/gitReleaser/checkReleaseNotes.js +0 -22
- package/engine/src/scripts/gitReleaser/pushRelease.js +0 -41
- package/engine/src/scripts/gitReleaser/pushReleaseCandidate.js +0 -8
- package/engine/src/scripts/gitReleaser/pushReleaseNotes.js +0 -53
- package/engine/src/scripts/release/deleteSourceMaps.js +0 -14
- package/engine/src/scripts/release/deployToAppCenter.js +0 -79
- package/engine/src/scripts/release/githubRelease.js +0 -138
- package/engine/src/scripts/release/notifySlack/makePayload.js +0 -103
- package/engine/src/scripts/release/notifySlack/notifySlack.js +0 -26
- package/engine/src/scripts/release/notifySlack/slackBlockKitBuilder.js +0 -44
- package/engine/src/scripts/release/sentryRelease.js +0 -79
- package/engine/src/scripts/release/urlsMarkdown.js +0 -85
- package/engine/src/scripts/releaseAllWithScheme.js +0 -91
- package/engine/src/scripts/utils/cmdUtils.js +0 -16
- package/engine/src/scripts/utils/fsUtils.js +0 -14
- package/engine/src/scripts/utils/gitUtils.js +0 -94
- package/engine/src/scripts/utils/index.js +0 -11
- package/engine/src/scripts/utils/stringUtils.js +0 -5
- package/engine/src/sdks/index.js +0 -22
- package/engine/src/sdks/sdk-tizen/index.js +0 -287
- package/engine/src/sdks/sdk-webos/index.js +0 -201
- package/engine/src/sdks/sdk-webpack/index.js +0 -45
- package/engine/src/sdks/sdkUtils.js +0 -22
- package/engine/src/tasks/deploy/aswS3/aws.js +0 -27
- package/engine/src/tasks/deploy/aswS3/deployS3.js +0 -71
- package/engine/src/tasks/deploy/hbbtv/deployHbbtv.js +0 -144
- package/engine/src/tasks/engineTasks.js +0 -23
- package/engine/src/tasks/task.rnv.build.js +0 -126
- package/engine/src/tasks/task.rnv.configure.js +0 -52
- package/engine/src/tasks/task.rnv.configureSoft.js +0 -31
- package/engine/src/tasks/task.rnv.deploy.js +0 -40
- package/engine/src/tasks/task.rnv.hooks.run.js +0 -61
- package/engine/src/tasks/task.rnv.package.js +0 -27
- package/engine/src/tasks/task.rnv.project.configure.js +0 -109
- package/engine/src/tasks/task.rnv.start.js +0 -52
- package/engine/src/utils/forEachSupportedPlatformFlavour.js +0 -29
- package/engine/src/utils/getBaseConfig.js +0 -57
- package/engine/src/utils/getDeployLocations.js +0 -78
- package/engine/src/utils/getVersionOffset.js +0 -39
- package/engine/src/utils/replaceRelevantStringsInConfig/index.js +0 -1
- package/engine/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +0 -36
- package/engine/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +0 -70
- package/engine/src/utils/resolveBaseUrl.js +0 -35
- package/engine/src/utils/resolveBuildVersion.js +0 -47
- package/engine/src/utils/zipBuildsByPlatforms.js +0 -70
|
@@ -1,48 +1,23 @@
|
|
|
1
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
|
-
});
|
|
2
|
+
exports.__esModule = true;
|
|
8
3
|
exports.notifySlack = void 0;
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var releaseType = c.runtime.scheme;
|
|
20
|
-
|
|
21
|
-
switch (releaseType) {
|
|
22
|
-
case 'dev:latest':
|
|
23
|
-
return payload.makeDevelopmentPayload(c);
|
|
24
|
-
|
|
25
|
-
case 'rc:latest':
|
|
26
|
-
return payload.makeReleaseCandidatePayload(c);
|
|
27
|
-
|
|
28
|
-
case 'release:dist':
|
|
29
|
-
return payload.makeDistributionPayload(c);
|
|
30
|
-
|
|
31
|
-
default:
|
|
32
|
-
throw new Error('Notify Slack: unsupported or undefined release type! Did you pass it as an argument?');
|
|
33
|
-
}
|
|
4
|
+
var child_process_1 = require("child_process");
|
|
5
|
+
var payload = __importStar(require("./makePayload"));
|
|
6
|
+
var getPayload = function (c) {
|
|
7
|
+
var releaseType = c.runtime.scheme;
|
|
8
|
+
switch (releaseType) {
|
|
9
|
+
case 'dev:latest': return payload.makeDevelopmentPayload(c);
|
|
10
|
+
case 'rc:latest': return payload.makeReleaseCandidatePayload(c);
|
|
11
|
+
case 'release:dist': return payload.makeDistributionPayload(c);
|
|
12
|
+
default: throw new Error('Notify Slack: unsupported or undefined release type! Did you pass it as an argument?');
|
|
13
|
+
}
|
|
34
14
|
};
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var cmd = "curl -X POST -H ".concat(contentType, " ").concat(data, " ").concat(webHookUrl);
|
|
43
|
-
(0, _child_process.execSync)(cmd, {
|
|
44
|
-
stdio: 'inherit'
|
|
45
|
-
});
|
|
15
|
+
var notifySlack = function (c) {
|
|
16
|
+
var _a, _b, _c, _d;
|
|
17
|
+
var contentType = '"Content-type: application/json"';
|
|
18
|
+
var data = "--data '" + JSON.stringify(getPayload(c)) + "'";
|
|
19
|
+
var webHookUrl = ((_d = (_c = (_b = (_a = c.buildConfig) === null || _a === void 0 ? void 0 : _a.common) === null || _b === void 0 ? void 0 : _b.deploy) === null || _c === void 0 ? void 0 : _c.slack) === null || _d === void 0 ? void 0 : _d.webhookUrl) || '';
|
|
20
|
+
var cmd = "curl -X POST -H " + contentType + " " + data + " " + webHookUrl;
|
|
21
|
+
child_process_1.execSync(cmd, { stdio: 'inherit' });
|
|
46
22
|
};
|
|
47
|
-
|
|
48
|
-
exports.notifySlack = notifySlack;
|
|
23
|
+
exports.notifySlack = notifySlack;
|
|
@@ -1,68 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
exports.__esModule = true;
|
|
6
3
|
exports.Context = exports.Divider = exports.Actions = exports.Section = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _mrkdwn = function mrkdwn(text) {
|
|
10
|
-
return {
|
|
11
|
-
type: 'mrkdwn',
|
|
12
|
-
text: text
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var plainText = function plainText(text) {
|
|
17
|
-
return {
|
|
4
|
+
var mrkdwn = function (text) { return ({ type: 'mrkdwn', text: text }); };
|
|
5
|
+
var plainText = function (text) { return ({
|
|
18
6
|
type: 'plain_text',
|
|
19
7
|
text: text,
|
|
20
8
|
emoji: true
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
text: plainText(text),
|
|
30
|
-
url: url
|
|
31
|
-
};
|
|
9
|
+
}); };
|
|
10
|
+
var buttonWithUrl = function (_a) {
|
|
11
|
+
var text = _a.text, url = _a.url;
|
|
12
|
+
return ({
|
|
13
|
+
type: 'button',
|
|
14
|
+
text: plainText(text),
|
|
15
|
+
url: url
|
|
16
|
+
});
|
|
32
17
|
};
|
|
33
|
-
|
|
34
18
|
var Section = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
}
|
|
19
|
+
mrkdwn: function (text) { return ({
|
|
20
|
+
type: 'section',
|
|
21
|
+
text: mrkdwn(text)
|
|
22
|
+
}); }
|
|
41
23
|
};
|
|
42
24
|
exports.Section = Section;
|
|
43
25
|
var Actions = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
}
|
|
26
|
+
buttons: function (btnsData) { return ({
|
|
27
|
+
type: 'actions',
|
|
28
|
+
elements: btnsData.map(buttonWithUrl)
|
|
29
|
+
}); }
|
|
50
30
|
};
|
|
51
31
|
exports.Actions = Actions;
|
|
52
32
|
var Divider = {
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
type: 'divider'
|
|
56
|
-
};
|
|
57
|
-
}
|
|
33
|
+
plain: function () { return ({ type: 'divider' }); }
|
|
58
34
|
};
|
|
59
35
|
exports.Divider = Divider;
|
|
60
36
|
var Context = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
}
|
|
37
|
+
mrkdwns: function (texts) { return ({
|
|
38
|
+
type: 'context',
|
|
39
|
+
elements: texts.map(mrkdwn)
|
|
40
|
+
}); }
|
|
67
41
|
};
|
|
68
|
-
exports.Context = Context;
|
|
42
|
+
exports.Context = Context;
|
|
@@ -1,103 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
exports.__esModule = true;
|
|
6
3
|
exports.sentryRelease = void 0;
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
4
|
+
var child_process_1 = require("child_process");
|
|
5
|
+
var fs_1 = __importDefault(require("fs"));
|
|
14
6
|
var UNSUPPORTED_PLATFORMS = ['webtv'];
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
stdio: 'inherit'
|
|
19
|
-
});
|
|
7
|
+
var executeSync = function (cmd) { return child_process_1.execSync(cmd, { stdio: 'inherit' }); };
|
|
8
|
+
var createNewRelease = function (version) {
|
|
9
|
+
executeSync("sentry-cli releases new " + version);
|
|
20
10
|
};
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
11
|
+
var uploadSourceMaps = function (params) {
|
|
12
|
+
var version = params.version, sourceMapsPath = params.sourceMapsPath, urlPrefix = params.urlPrefix;
|
|
13
|
+
executeSync('sentry-cli releases '
|
|
14
|
+
+ ("files " + version + " ")
|
|
15
|
+
+ ("upload-sourcemaps " + sourceMapsPath + " ")
|
|
16
|
+
+ ("--url-prefix \"~/" + urlPrefix + "\" ")
|
|
17
|
+
+ '--rewrite --validate');
|
|
24
18
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
var setReleaseCommits = function (version) {
|
|
20
|
+
try {
|
|
21
|
+
executeSync("sentry-cli releases set-commits " + version + " --auto --log-level=debug");
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.log('Sentry release commits failed: ', error);
|
|
25
|
+
}
|
|
31
26
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
executeSync("sentry-cli releases set-commits ".concat(version, " --auto --log-level=debug"));
|
|
36
|
-
} catch (error) {
|
|
37
|
-
console.log('Sentry release commits failed: ', error);
|
|
38
|
-
}
|
|
27
|
+
var finalizeRelease = function (version) {
|
|
28
|
+
executeSync("sentry-cli releases finalize " + version);
|
|
39
29
|
};
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
30
|
+
var processPlatform = function (c, platform, version) {
|
|
31
|
+
var _a;
|
|
32
|
+
var processFlavour = function (flavour) {
|
|
33
|
+
var platformBuildsDir = c.buildConfig.paths.platformBuildsDir;
|
|
34
|
+
var mapsPath = platformBuildsDir + "/" + flavour + "_" + platform + "-public/public/content/js";
|
|
35
|
+
var urlPrefix = "builds/" + platform + "/" + flavour + "/dist/" + version + "/public/content/js/";
|
|
36
|
+
if (!fs_1["default"].existsSync(mapsPath))
|
|
37
|
+
return;
|
|
38
|
+
console.log("Uploading " + flavour + "_" + platform + " sourcemaps to Sentry...");
|
|
39
|
+
uploadSourceMaps({ version: version, sourceMapsPath: mapsPath, urlPrefix: urlPrefix });
|
|
40
|
+
};
|
|
41
|
+
var _b = (((_a = c.buildConfig.platforms[platform]) === null || _a === void 0 ? void 0 : _a.deploy) || {}).supportedFlavours, supportedFlavours = _b === void 0 ? [] : _b;
|
|
42
|
+
supportedFlavours.forEach(processFlavour);
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var platformBuildsDir = c.buildConfig.paths.platformBuildsDir;
|
|
50
|
-
var sourceMapsPath = "".concat(platformBuildsDir, "/").concat(flavour, "_").concat(platform, "-public/public/content/js");
|
|
51
|
-
var urlPrefix = "builds/".concat(platform, "/").concat(flavour, "/dist/").concat(version, "/public/content/js/");
|
|
52
|
-
if (!_fs["default"].existsSync(sourceMapsPath)) return;
|
|
53
|
-
console.log("Uploading ".concat(flavour, "_").concat(platform, " sourcemaps to Sentry..."));
|
|
54
|
-
uploadSourceMaps({
|
|
55
|
-
version: version,
|
|
56
|
-
sourceMapsPath: sourceMapsPath,
|
|
57
|
-
urlPrefix: urlPrefix
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
var _ref = ((_c$buildConfig$platfo = c.buildConfig.platforms[platform]) === null || _c$buildConfig$platfo === void 0 ? void 0 : _c$buildConfig$platfo.deploy) || {},
|
|
62
|
-
_ref$supportedFlavour = _ref.supportedFlavours,
|
|
63
|
-
supportedFlavours = _ref$supportedFlavour === void 0 ? [] : _ref$supportedFlavour;
|
|
64
|
-
|
|
65
|
-
supportedFlavours.forEach(processFlavour);
|
|
44
|
+
var isSentryProjectConfigured = function () {
|
|
45
|
+
var _a;
|
|
46
|
+
var cmd = child_process_1.execSync('sentry-cli info --config-status-json');
|
|
47
|
+
var sentryConfig = JSON.parse(cmd.toString()) || {};
|
|
48
|
+
return !!((_a = sentryConfig.config) === null || _a === void 0 ? void 0 : _a.project);
|
|
66
49
|
};
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
var sentryRelease = function (c) {
|
|
51
|
+
var _a;
|
|
52
|
+
if (!isSentryProjectConfigured()) {
|
|
53
|
+
console.log('Project is not defined...');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
var version = "v" + ((_a = c.buildConfig.common) === null || _a === void 0 ? void 0 : _a.packageVersion);
|
|
57
|
+
if (!version)
|
|
58
|
+
return;
|
|
59
|
+
var _b = (c.buildConfig.defaults || {}).supportedPlatforms, supportedPlatforms = _b === void 0 ? [] : _b;
|
|
60
|
+
var supportedPlatformsBySentry = supportedPlatforms.filter(function (platform) { return !UNSUPPORTED_PLATFORMS.includes(platform); });
|
|
61
|
+
createNewRelease(version);
|
|
62
|
+
supportedPlatformsBySentry.forEach(function (platform) { return processPlatform(c, platform, version); });
|
|
63
|
+
setReleaseCommits(version);
|
|
64
|
+
finalizeRelease(version);
|
|
65
|
+
console.log('Source Maps uploaded...');
|
|
74
66
|
};
|
|
75
|
-
|
|
76
|
-
var sentryRelease = function sentryRelease(c) {
|
|
77
|
-
var _c$buildConfig$common;
|
|
78
|
-
|
|
79
|
-
if (!isSentryProjectConfigured()) {
|
|
80
|
-
console.log('Project is not defined...');
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var version = "v".concat((_c$buildConfig$common = c.buildConfig.common) === null || _c$buildConfig$common === void 0 ? void 0 : _c$buildConfig$common.packageVersion);
|
|
85
|
-
if (!version) return;
|
|
86
|
-
|
|
87
|
-
var _ref2 = c.buildConfig.defaults || {},
|
|
88
|
-
_ref2$supportedPlatfo = _ref2.supportedPlatforms,
|
|
89
|
-
supportedPlatforms = _ref2$supportedPlatfo === void 0 ? [] : _ref2$supportedPlatfo;
|
|
90
|
-
|
|
91
|
-
var supportedPlatformsBySentry = supportedPlatforms.filter(function (platform) {
|
|
92
|
-
return !UNSUPPORTED_PLATFORMS.includes(platform);
|
|
93
|
-
});
|
|
94
|
-
createNewRelease(version);
|
|
95
|
-
supportedPlatformsBySentry.forEach(function (platform) {
|
|
96
|
-
return processPlatform(c, platform, version);
|
|
97
|
-
});
|
|
98
|
-
setReleaseCommits(version);
|
|
99
|
-
finalizeRelease(version);
|
|
100
|
-
console.log('Source Maps uploaded...');
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
exports.sentryRelease = sentryRelease;
|
|
67
|
+
exports.sentryRelease = sentryRelease;
|
|
@@ -1,118 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
exports.__esModule = true;
|
|
6
3
|
exports.getUrlsMarkdown = void 0;
|
|
7
|
-
|
|
8
|
-
var _getDeployLocations = require("../../utils/getDeployLocations");
|
|
9
|
-
|
|
10
|
-
var _assert = require("assert");
|
|
11
|
-
|
|
12
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
21
|
-
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
|
|
24
|
-
var ok = _assert.strict.ok;
|
|
4
|
+
var getDeployLocations_1 = require("../../utils/getDeployLocations");
|
|
25
5
|
var newLine = '\r\n';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
6
|
+
var getDataToProceed = function (c, customPlatformList) {
|
|
7
|
+
if (customPlatformList === void 0) { customPlatformList = []; }
|
|
8
|
+
var locations = getDeployLocations_1.getDeployLocations(c);
|
|
9
|
+
var versions = locations.versions;
|
|
10
|
+
var platforms = versions[Object.keys(versions)[0]].platforms;
|
|
11
|
+
if (!customPlatformList.length)
|
|
12
|
+
return platforms;
|
|
13
|
+
var outputData = {};
|
|
14
|
+
var addToOutputIfPlatformHasData = function (platformName) {
|
|
15
|
+
var platformData = platforms[platformName];
|
|
16
|
+
if (platformData) {
|
|
17
|
+
outputData[platformName] = platformData;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
customPlatformList.forEach(addToOutputIfPlatformHasData);
|
|
21
|
+
return outputData;
|
|
22
|
+
};
|
|
23
|
+
var beautifyPlatformName = function (platformName) {
|
|
24
|
+
switch (platformName.toLowerCase()) {
|
|
25
|
+
case 'entone': return 'Entone';
|
|
26
|
+
case 'hbbtv': return 'HbbTV';
|
|
27
|
+
case 'tizen': return 'Tizen (Samsung)';
|
|
28
|
+
case 'webos': return 'webOS (LG)';
|
|
29
|
+
case 'webtv': return 'WebTV';
|
|
30
|
+
default: return platformName;
|
|
41
31
|
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
customPlatformList.forEach(addToOutputIfPlatformHasData);
|
|
45
|
-
return outputData;
|
|
46
32
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return 'webOS (LG)';
|
|
61
|
-
|
|
62
|
-
case 'webtv':
|
|
63
|
-
return 'WebTV';
|
|
64
|
-
|
|
65
|
-
default:
|
|
66
|
-
return platformName;
|
|
67
|
-
}
|
|
33
|
+
var getPlatformOutput = function (data, platformName) {
|
|
34
|
+
if (platformName === 'tizen' || platformName === 'webos') {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
var platformData = data[platformName];
|
|
38
|
+
var output = "**" + beautifyPlatformName(platformName) + "**" + newLine;
|
|
39
|
+
var processPlatformEntry = function (_a) {
|
|
40
|
+
var flavour = _a[0], flavourData = _a[1];
|
|
41
|
+
var indexUrl = flavourData.indexUrl;
|
|
42
|
+
output += "* [" + flavour + "](" + indexUrl + ")" + newLine;
|
|
43
|
+
};
|
|
44
|
+
Object.entries(platformData).forEach(processPlatformEntry);
|
|
45
|
+
return output;
|
|
68
46
|
};
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
|
|
47
|
+
var getUrlsMarkdown = function (c, customPlatformList) {
|
|
48
|
+
var dataToProceed = getDataToProceed(c, customPlatformList);
|
|
49
|
+
var markdownWithoutHeader = Object.keys(dataToProceed)
|
|
50
|
+
.map(function (platformName) { return getPlatformOutput(dataToProceed, platformName); })
|
|
51
|
+
.filter(Boolean)
|
|
52
|
+
.join(newLine);
|
|
53
|
+
if (markdownWithoutHeader.length) {
|
|
54
|
+
var urlHeader = newLine + "## URL" + newLine;
|
|
55
|
+
return urlHeader + markdownWithoutHeader;
|
|
56
|
+
}
|
|
72
57
|
return '';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var platformData = data[platformName];
|
|
76
|
-
var output = "**".concat(beautifyPlatformName(platformName), "**").concat(newLine);
|
|
77
|
-
|
|
78
|
-
var processPlatformEntry = function processPlatformEntry(_ref) {
|
|
79
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
80
|
-
flavour = _ref2[0],
|
|
81
|
-
flavourData = _ref2[1];
|
|
82
|
-
|
|
83
|
-
var indexUrl = flavourData.indexUrl;
|
|
84
|
-
output += "* [".concat(flavour, "](").concat(indexUrl, ")").concat(newLine);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
Object.entries(platformData).forEach(processPlatformEntry);
|
|
88
|
-
return output;
|
|
89
|
-
};
|
|
90
|
-
/*
|
|
91
|
-
=== OUTPUT EXAMPLE start ===
|
|
92
|
-
## URL
|
|
93
|
-
**Entone**
|
|
94
|
-
* [flavour1](http://.../index.html)
|
|
95
|
-
* [flavour2](http://.../index.html)
|
|
96
|
-
|
|
97
|
-
**WebTV**
|
|
98
|
-
* [flavour1](http://.../index.html)
|
|
99
|
-
* [flavour2](http://.../index.html)
|
|
100
|
-
=== OUTPUT EXAMPLE end ===
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var getUrlsMarkdown = function getUrlsMarkdown(c, customPlatformList) {
|
|
105
|
-
var dataToProceed = getDataToProceed(c, customPlatformList);
|
|
106
|
-
var markdownWithoutHeader = Object.keys(dataToProceed).map(function (platformName) {
|
|
107
|
-
return getPlatformOutput(dataToProceed, platformName);
|
|
108
|
-
}).filter(Boolean).join(newLine);
|
|
109
|
-
|
|
110
|
-
if (markdownWithoutHeader.length) {
|
|
111
|
-
var urlHeader = "".concat(newLine, "## URL").concat(newLine);
|
|
112
|
-
return urlHeader + markdownWithoutHeader;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return '';
|
|
116
58
|
};
|
|
117
|
-
|
|
118
|
-
exports.getUrlsMarkdown = getUrlsMarkdown;
|
|
59
|
+
exports.getUrlsMarkdown = getUrlsMarkdown;
|