@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,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var _this = this;
|
|
38
|
-
exports.__esModule = true;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
39
6
|
exports.exportWeb = exports.deployWeb = exports.configureWebProject = exports.buildWeb = void 0;
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
7
|
+
|
|
8
|
+
var _rnv = require("rnv");
|
|
9
|
+
|
|
10
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
|
+
|
|
12
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
13
|
+
|
|
14
|
+
var getPlatformProjectDir = _rnv.Common.getPlatformProjectDir;
|
|
15
|
+
var isPlatformActive = _rnv.PlatformManager.isPlatformActive;
|
|
16
|
+
var logTask = _rnv.Logger.logTask;
|
|
17
|
+
var copyBuildsFolder = _rnv.ProjectManager.copyBuildsFolder,
|
|
18
|
+
copyAssetsFolder = _rnv.ProjectManager.copyAssetsFolder;
|
|
19
|
+
var buildCoreWebpackProject = _rnv.WebpackUtils.buildCoreWebpackProject,
|
|
20
|
+
configureCoreWebProject = _rnv.WebpackUtils.configureCoreWebProject;
|
|
21
|
+
|
|
22
|
+
var buildWeb = /*#__PURE__*/function () {
|
|
23
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(c) {
|
|
24
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
25
|
+
while (1) {
|
|
26
|
+
switch (_context.prev = _context.next) {
|
|
27
|
+
case 0:
|
|
28
|
+
return _context.abrupt("return", buildCoreWebpackProject(c));
|
|
29
|
+
|
|
30
|
+
case 1:
|
|
31
|
+
case "end":
|
|
32
|
+
return _context.stop();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, _callee);
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
return function buildWeb(_x) {
|
|
39
|
+
return _ref.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
}();
|
|
42
|
+
|
|
49
43
|
exports.buildWeb = buildWeb;
|
|
50
|
-
|
|
44
|
+
|
|
45
|
+
var configureWebProject = /*#__PURE__*/function () {
|
|
46
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(c) {
|
|
51
47
|
var platform;
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
49
|
+
while (1) {
|
|
50
|
+
switch (_context2.prev = _context2.next) {
|
|
51
|
+
case 0:
|
|
52
|
+
logTask('configureWebProject');
|
|
53
|
+
platform = c.platform;
|
|
54
|
+
c.runtime.platformBuildsProjectPath = getPlatformProjectDir(c);
|
|
55
|
+
|
|
56
|
+
if (isPlatformActive(c, platform)) {
|
|
57
|
+
_context2.next = 5;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return _context2.abrupt("return");
|
|
62
|
+
|
|
63
|
+
case 5:
|
|
64
|
+
_context2.next = 7;
|
|
65
|
+
return copyAssetsFolder(c, platform);
|
|
66
|
+
|
|
67
|
+
case 7:
|
|
68
|
+
_context2.next = 9;
|
|
69
|
+
return configureCoreWebProject(c);
|
|
70
|
+
|
|
71
|
+
case 9:
|
|
72
|
+
copyBuildsFolder(c, platform);
|
|
73
|
+
|
|
74
|
+
case 10:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context2.stop();
|
|
68
77
|
}
|
|
69
|
-
|
|
70
|
-
});
|
|
78
|
+
}
|
|
79
|
+
}, _callee2);
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
return function configureWebProject(_x2) {
|
|
83
|
+
return _ref2.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
}();
|
|
86
|
+
|
|
71
87
|
exports.configureWebProject = configureWebProject;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
88
|
+
|
|
89
|
+
var deployWeb = function deployWeb() {
|
|
90
|
+
logTask('deployWeb'); // const { platform } = c;
|
|
91
|
+
// DEPRECATED: custom deployers moved to external packages
|
|
92
|
+
// return selectWebToolAndDeploy(c, platform);
|
|
93
|
+
|
|
94
|
+
return true;
|
|
75
95
|
};
|
|
96
|
+
|
|
76
97
|
exports.deployWeb = deployWeb;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
98
|
+
|
|
99
|
+
var exportWeb = function exportWeb() {
|
|
100
|
+
logTask('exportWeb'); // const { platform } = c;
|
|
101
|
+
// DEPRECATED: custom deployers moved to external packages
|
|
102
|
+
// return selectWebToolAndExport(c, platform);
|
|
103
|
+
|
|
104
|
+
return true;
|
|
80
105
|
};
|
|
81
|
-
|
|
106
|
+
|
|
107
|
+
exports.exportWeb = exportWeb;
|
|
@@ -1,63 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var _this = this;
|
|
38
|
-
exports.__esModule = true;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
39
6
|
exports.installSdk = exports.registerSdkPath = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
|
+
|
|
12
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
13
|
+
|
|
14
|
+
var _require = require('rnv'),
|
|
15
|
+
FileUtils = _require.FileUtils;
|
|
16
|
+
|
|
17
|
+
var _require2 = require('@24i/smartapps-bigscreen-sdk-installer'),
|
|
18
|
+
sdkInstaller = _require2.sdkInstaller;
|
|
19
|
+
|
|
20
|
+
var registerSdkPath = /*#__PURE__*/function () {
|
|
21
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(c, sdkKey, sdkValue) {
|
|
43
22
|
var rnvWorkspaceConfigPath, customObjectToMerge;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
23
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24
|
+
while (1) {
|
|
25
|
+
switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
rnvWorkspaceConfigPath = c.paths.workspace.config;
|
|
28
|
+
customObjectToMerge = {
|
|
29
|
+
sdks: _defineProperty({}, sdkKey, sdkValue)
|
|
30
|
+
};
|
|
31
|
+
FileUtils.updateObjectSync(rnvWorkspaceConfigPath, customObjectToMerge);
|
|
32
|
+
Object.assign(c.buildConfig, customObjectToMerge);
|
|
33
|
+
|
|
34
|
+
case 4:
|
|
35
|
+
case "end":
|
|
36
|
+
return _context.stop();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, _callee);
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
return function registerSdkPath(_x, _x2, _x3) {
|
|
43
|
+
return _ref.apply(this, arguments);
|
|
44
|
+
};
|
|
45
|
+
}();
|
|
46
|
+
|
|
53
47
|
exports.registerSdkPath = registerSdkPath;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
|
|
49
|
+
var installSdk = /*#__PURE__*/function () {
|
|
50
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(installerUrl, installPath) {
|
|
51
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
52
|
+
while (1) {
|
|
53
|
+
switch (_context2.prev = _context2.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
return _context2.abrupt("return", sdkInstaller({
|
|
56
|
+
zipPath: installerUrl,
|
|
57
|
+
installPath: installPath,
|
|
58
|
+
enableLogs: true
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
case 1:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context2.stop();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, _callee2);
|
|
67
|
+
}));
|
|
68
|
+
|
|
69
|
+
return function installSdk(_x4, _x5) {
|
|
70
|
+
return _ref2.apply(this, arguments);
|
|
71
|
+
};
|
|
72
|
+
}();
|
|
73
|
+
|
|
74
|
+
exports.installSdk = installSdk;
|
|
@@ -1,25 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
5
6
|
exports.rm = exports.cp = void 0;
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
|
|
8
|
+
var _child_process = require("child_process");
|
|
9
|
+
|
|
10
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var runCmdSync = function runCmdSync(cmd) {
|
|
15
|
+
return (0, _child_process.execSync)(cmd, {
|
|
16
|
+
stdio: 'inherit'
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var isDir = function isDir(path) {
|
|
21
|
+
return _fs["default"].existsSync(path) && _fs["default"].lstatSync(path).isDirectory();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var cp = function cp(source, destination) {
|
|
25
|
+
var cmd = "aws s3 cp ".concat(source, " s3://").concat(destination, " --acl public-read");
|
|
26
|
+
|
|
27
|
+
if (isDir(source)) {
|
|
28
|
+
cmd += ' --recursive';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
runCmdSync(cmd);
|
|
16
32
|
};
|
|
33
|
+
|
|
17
34
|
exports.cp = cp;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
35
|
+
|
|
36
|
+
var rm = function rm(remoteDirPath) {
|
|
37
|
+
var cmd = "aws s3 rm s3://".concat(remoteDirPath);
|
|
38
|
+
|
|
39
|
+
if (remoteDirPath.endsWith('/')) {
|
|
40
|
+
cmd += ' --recursive';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
runCmdSync(cmd);
|
|
24
44
|
};
|
|
25
|
-
|
|
45
|
+
|
|
46
|
+
exports.rm = rm;
|
|
@@ -1,115 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
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
|
|
12
7
|
});
|
|
13
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
14
|
-
if (mod && mod.__esModule) return mod;
|
|
15
|
-
var result = {};
|
|
16
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17
|
-
__setModuleDefault(result, mod);
|
|
18
|
-
return result;
|
|
19
|
-
};
|
|
20
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
30
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
31
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
32
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
33
|
-
function step(op) {
|
|
34
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
35
|
-
while (_) try {
|
|
36
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
37
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
38
|
-
switch (op[0]) {
|
|
39
|
-
case 0: case 1: t = op; break;
|
|
40
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
41
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
42
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
43
|
-
default:
|
|
44
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
45
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
46
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
47
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
48
|
-
if (t[2]) _.ops.pop();
|
|
49
|
-
_.trys.pop(); continue;
|
|
50
|
-
}
|
|
51
|
-
op = body.call(thisArg, _);
|
|
52
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
53
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
57
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
|
-
};
|
|
59
|
-
var _this = this;
|
|
60
|
-
exports.__esModule = true;
|
|
61
8
|
exports.deployToS3 = void 0;
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
9
|
+
|
|
10
|
+
var path = _interopRequireWildcard(require("path"));
|
|
11
|
+
|
|
12
|
+
var fs = _interopRequireWildcard(require("fs"));
|
|
13
|
+
|
|
14
|
+
var _rnv = require("rnv");
|
|
15
|
+
|
|
16
|
+
var _constants = require("../../../constants");
|
|
17
|
+
|
|
18
|
+
var aws = _interopRequireWildcard(require("./aws"));
|
|
19
|
+
|
|
20
|
+
var _resolvers = require("../../../resolvers");
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
27
|
+
|
|
28
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
29
|
+
|
|
30
|
+
var getConfigProp = _rnv.Common.getConfigProp;
|
|
31
|
+
|
|
32
|
+
var uploadPackage = function uploadPackage(c, sourcePath, uploadPath) {
|
|
33
|
+
var packageOutputDirPath = "".concat(sourcePath, "/output");
|
|
34
|
+
var outputFilenameList = fs.readdirSync(packageOutputDirPath);
|
|
35
|
+
var packageFileName = outputFilenameList[0];
|
|
36
|
+
var packageLocalPath = "\"".concat(packageOutputDirPath, "/").concat(packageFileName, "\"");
|
|
37
|
+
var packageRemotePath = "\"".concat(uploadPath, "/build/").concat(packageFileName, "\"");
|
|
38
|
+
aws.cp(packageLocalPath, packageRemotePath);
|
|
76
39
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
40
|
+
|
|
41
|
+
var uploadPublicDir = function uploadPublicDir(sourcePath, uploadPath) {
|
|
42
|
+
var publicDirLocalPath = path.join(sourcePath, 'project', 'public');
|
|
43
|
+
var publicDirRemotePath = "".concat(uploadPath, "/public");
|
|
44
|
+
aws.cp(publicDirLocalPath, publicDirRemotePath);
|
|
81
45
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
46
|
+
|
|
47
|
+
var urlToS3Protocol = function urlToS3Protocol(url) {
|
|
48
|
+
var hostWithPath = url.split('://')[1];
|
|
49
|
+
var bucketHostnameAwsPostfix = '.s3.amazonaws.com';
|
|
50
|
+
return hostWithPath.replace(bucketHostnameAwsPostfix, '');
|
|
86
51
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
52
|
+
|
|
53
|
+
var deployToS3 = /*#__PURE__*/function () {
|
|
54
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(c) {
|
|
55
|
+
var platform, runtime, sourcePath, _getConfigProp, isBuildHosted, baseUrl, uploadPath, sourceDirPath;
|
|
56
|
+
|
|
57
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
58
|
+
while (1) {
|
|
59
|
+
switch (_context.prev = _context.next) {
|
|
60
|
+
case 0:
|
|
61
|
+
platform = c.platform, runtime = c.runtime;
|
|
62
|
+
sourcePath = runtime.appDir;
|
|
63
|
+
_getConfigProp = getConfigProp(c, platform, 'webpackConfig', {}), isBuildHosted = _getConfigProp.isBuildHosted;
|
|
64
|
+
baseUrl = (0, _resolvers.resolveBaseUrl)({
|
|
65
|
+
platform: platform,
|
|
66
|
+
scheme: runtime.scheme || '',
|
|
67
|
+
appConfigId: runtime.appId
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (baseUrl) {
|
|
71
|
+
_context.next = 6;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return _context.abrupt("return", false);
|
|
76
|
+
|
|
77
|
+
case 6:
|
|
78
|
+
uploadPath = urlToS3Protocol(baseUrl);
|
|
79
|
+
aws.rm("".concat(uploadPath, "/"));
|
|
80
|
+
uploadPackage(c, sourcePath, uploadPath);
|
|
81
|
+
|
|
82
|
+
if (!(platform === _constants.Platforms.HBBTV)) {
|
|
83
|
+
_context.next = 13;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// eslint-disable-next-line max-len
|
|
88
|
+
process.stdout.write("For ".concat(platform, " platform, only ZIP package deployment is configured. Skipping deploying app content to AWS S3.\n"));
|
|
89
|
+
process.stdout.write('Deploy done.\n');
|
|
90
|
+
return _context.abrupt("return", true);
|
|
91
|
+
|
|
92
|
+
case 13:
|
|
93
|
+
sourceDirPath = isBuildHosted ? "".concat(sourcePath, "-public") : sourcePath;
|
|
94
|
+
uploadPublicDir(sourceDirPath, uploadPath);
|
|
106
95
|
process.stdout.write('Deploy done.\n');
|
|
107
|
-
return
|
|
96
|
+
return _context.abrupt("return", true);
|
|
97
|
+
|
|
98
|
+
case 17:
|
|
99
|
+
case "end":
|
|
100
|
+
return _context.stop();
|
|
108
101
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
102
|
+
}
|
|
103
|
+
}, _callee);
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
return function deployToS3(_x) {
|
|
107
|
+
return _ref.apply(this, arguments);
|
|
108
|
+
};
|
|
109
|
+
}();
|
|
110
|
+
|
|
111
|
+
exports.deployToS3 = deployToS3;
|