@24i/smartapps-bigscreen-rnv-build-engine 0.0.2-alpha.1328 → 0.0.2-alpha.1332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/constants/buildSchemes.js +3 -3
- package/dist/src/constants/index.js +5 -10
- package/dist/src/constants/platforms.js +11 -0
- package/dist/src/index.js +29 -31
- package/dist/src/resolvers/index.js +19 -12
- package/dist/src/resolvers/resolveBaseUrl.js +15 -16
- package/dist/src/resolvers/resolveBuildVersion.js +17 -19
- package/dist/src/resolvers/resolveBuildVersionOffset.js +35 -0
- package/dist/src/resolvers/resolveDeployLocations.js +70 -0
- package/dist/src/{utils/getBaseConfig.js → resolvers/resolveGenericRnvConfig.js} +18 -30
- package/dist/src/resolvers/resolveHbbtvDeployConfig.js +13 -0
- package/dist/src/resolvers/resolveHbbtvDeployUrl.js +11 -0
- package/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +27 -0
- package/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +15 -0
- package/dist/src/scripts/buildAllWithScheme.js +14 -14
- package/dist/src/scripts/gitReleaser/afterVersionBump.js +10 -10
- package/dist/src/scripts/gitReleaser/beforeVersionBump.js +7 -7
- package/dist/src/scripts/gitReleaser/checkReleaseNotes.js +9 -9
- package/dist/src/scripts/gitReleaser/pushRelease.js +17 -17
- package/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +4 -4
- package/dist/src/scripts/gitReleaser/pushReleaseNotes.js +16 -16
- package/dist/src/scripts/release/deleteSourceMaps.js +6 -6
- package/dist/src/scripts/release/deployToAppCenter.js +37 -38
- package/dist/src/scripts/release/githubRelease.js +60 -64
- package/dist/src/scripts/release/notifySlack/makePayload.js +44 -48
- package/dist/src/scripts/release/notifySlack/notifySlack.js +10 -10
- package/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +25 -28
- package/dist/src/scripts/release/sentryRelease.js +34 -33
- package/dist/src/scripts/release/urlsMarkdown.js +29 -30
- package/dist/src/scripts/releaseAllWithScheme.js +27 -28
- package/dist/src/scripts/utils/cmdUtils.js +9 -9
- package/dist/src/scripts/utils/fsUtils.js +7 -7
- package/dist/src/scripts/utils/gitUtils.js +50 -50
- package/dist/src/scripts/utils/index.js +8 -8
- package/dist/src/scripts/utils/stringUtils.js +2 -5
- package/dist/src/sdks/index.js +15 -54
- package/dist/src/sdks/sdk-tizen/index.js +154 -254
- package/dist/src/sdks/sdk-webos/index.js +136 -231
- package/dist/src/sdks/sdk-webpack/index.js +20 -69
- package/dist/src/sdks/sdkUtils.js +14 -59
- package/dist/src/tasks/deploy/aswS3/aws.js +9 -9
- package/dist/src/tasks/deploy/aswS3/deployS3.js +44 -82
- package/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +70 -174
- package/dist/src/tasks/engineTasks.js +10 -10
- package/dist/src/tasks/task.rnv.build.js +77 -134
- package/dist/src/tasks/task.rnv.configure.js +39 -88
- package/dist/src/tasks/task.rnv.configureSoft.js +22 -75
- package/dist/src/tasks/task.rnv.deploy.js +28 -78
- package/dist/src/tasks/task.rnv.hooks.run.js +42 -92
- package/dist/src/tasks/task.rnv.package.js +18 -61
- package/dist/src/tasks/task.rnv.project.configure.js +80 -183
- package/dist/src/tasks/task.rnv.start.js +42 -87
- package/dist/src/types/c.js +1 -1
- package/dist/src/types/index.js +1 -1
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +12 -12
- package/dist/src/utils/replaceRelevantStringsInConfig/index.js +2 -9
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +10 -11
- package/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +24 -30
- package/dist/src/utils/zipBuildsByPlatforms.js +28 -39
- package/dist/templates/platforms/_shared/template.js +58 -42
- package/dist/templates/platforms/_shared/webpack.base.js +119 -139
- package/dist/templates/platforms/entone/webpack.config.dev.js +27 -22
- package/dist/templates/platforms/entone/webpack.config.prod.js +21 -20
- package/dist/templates/platforms/hbbtv/webpack.config.dev.js +42 -24
- package/dist/templates/platforms/hbbtv/webpack.config.prod.js +36 -22
- package/dist/templates/platforms/tizen/webpack.config.dev.js +28 -22
- package/dist/templates/platforms/tizen/webpack.config.prod.js +21 -20
- package/dist/templates/platforms/webos/webpack.config.dev.js +31 -24
- package/dist/templates/platforms/webos/webpack.config.prod.js +23 -22
- package/dist/templates/platforms/webtv/webpack.config.dev.js +27 -22
- package/dist/templates/platforms/webtv/webpack.config.prod.js +21 -20
- package/dist/types/src/constants/index.d.ts +1 -0
- package/dist/types/src/constants/platforms.d.ts +8 -0
- package/dist/types/src/resolvers/index.d.ts +8 -1
- 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/release/notifySlack/makePayload.d.ts +9 -3
- package/dist/types/src/tasks/deploy/hbbtv/deployHbbtv.d.ts +0 -1
- package/dist/types/src/tasks/task.rnv.build.d.ts +1 -2
- package/dist/types/src/tasks/task.rnv.configure.d.ts +1 -2
- package/dist/types/src/tasks/task.rnv.deploy.d.ts +1 -2
- package/dist/types/src/tasks/task.rnv.package.d.ts +1 -2
- package/dist/types/src/tasks/task.rnv.start.d.ts +1 -2
- package/dist/types/src/types/c.d.ts +278 -8
- package/dist/types/src/utils/zipBuildsByPlatforms.d.ts +0 -1
- package/package.json +3 -3
- package/dist/src/enginePlatforms.js +0 -15
- package/dist/src/utils/getDeployLocations.js +0 -80
- package/dist/src/utils/getVersionOffset.js +0 -35
- package/dist/types/src/enginePlatforms.d.ts +0 -8
- package/dist/types/src/utils/getBaseConfig.d.ts +0 -2
- package/dist/types/src/utils/getDeployLocations.d.ts +0 -7
- package/dist/types/src/utils/getVersionOffset.d.ts +0 -1
|
@@ -1,243 +1,148 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
4
|
};
|
|
41
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
6
|
exports.handleWebosSdk = exports.configureWebOSProject = exports.buildWebOSProject = exports.runWebOS = void 0;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
isPortActive = _a.sent();
|
|
94
|
-
isDebuggerEnabledForPlatform = REMOTE_DEBUGGER_ENABLED_PLATFORMS.includes(platform);
|
|
95
|
-
isWeinreEnabled = isDebuggerEnabledForPlatform && !bundleAssets && !hosted;
|
|
96
|
-
if (!!isPortActive) return [3, 9];
|
|
97
|
-
logInfo("Your " + chalk().white(platform) + " devServer at port " + chalk().white(c.runtime.port) + " is not running. Starting it up for you...");
|
|
98
|
-
waitForWebpack(c)
|
|
99
|
-
.then(function () { return runWebosSimOrDevice(c); })["catch"](logError);
|
|
100
|
-
return [4, runWebpackServer(c, isWeinreEnabled)];
|
|
101
|
-
case 8:
|
|
102
|
-
_a.sent();
|
|
103
|
-
return [3, 14];
|
|
104
|
-
case 9: return [4, confirmActiveBundler(c)];
|
|
105
|
-
case 10:
|
|
106
|
-
resetCompleted = _a.sent();
|
|
107
|
-
if (!resetCompleted) return [3, 12];
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const semver_1 = __importDefault(require("semver"));
|
|
10
|
+
const os_1 = require("os");
|
|
11
|
+
const rnv_1 = require("rnv");
|
|
12
|
+
const installer_1 = require("rnv/dist/core/sdkManager/installer");
|
|
13
|
+
const sdkUtils_1 = require("../sdkUtils");
|
|
14
|
+
const { writeCleanFile } = rnv_1.FileUtils;
|
|
15
|
+
const { execCLI } = rnv_1.Exec;
|
|
16
|
+
const { getPlatformProjectDir, getTemplateProjectDir, getPlatformBuildDir, getAppVersion, getAppTitle, getAppId, getAppDescription, getConfigProp, checkPortInUse, confirmActiveBundler, addSystemInjects, } = rnv_1.Common;
|
|
17
|
+
const { buildCoreWebpackProject, runWebpackServer, configureCoreWebProject, waitForWebpack, } = rnv_1.WebpackUtils;
|
|
18
|
+
const { isPlatformActive } = rnv_1.PlatformManager;
|
|
19
|
+
const { chalk, logTask, logInfo, logSuccess, logError } = rnv_1.Logger;
|
|
20
|
+
const { copyBuildsFolder, copyAssetsFolder } = rnv_1.ProjectManager;
|
|
21
|
+
const { CLI_WEBOS_ARES_PACKAGE, REMOTE_DEBUGGER_ENABLED_PLATFORMS } = rnv_1.Constants;
|
|
22
|
+
const { runWebosSimOrDevice } = rnv_1.SDKManager.Webos;
|
|
23
|
+
const runWebOS = async (c) => {
|
|
24
|
+
const { hosted } = c.program;
|
|
25
|
+
const { target } = c.runtime;
|
|
26
|
+
const { platform } = c;
|
|
27
|
+
const isHosted = hosted && !getConfigProp(c, platform, 'bundleAssets');
|
|
28
|
+
if (isHosted) {
|
|
29
|
+
const isPortActive = await checkPortInUse(c, platform, c.runtime.port);
|
|
30
|
+
if (isPortActive) {
|
|
31
|
+
const resetCompleted = await confirmActiveBundler(c);
|
|
32
|
+
c.runtime.skipActiveServerCheck = !resetCompleted;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
logTask('runWebOS', `target:${target} hosted:${!!isHosted}`);
|
|
36
|
+
if (isHosted)
|
|
37
|
+
return;
|
|
38
|
+
const bundleAssets = getConfigProp(c, platform, 'bundleAssets') === true;
|
|
39
|
+
if (bundleAssets) {
|
|
40
|
+
await buildCoreWebpackProject(c);
|
|
41
|
+
await runWebosSimOrDevice(c);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const isPortActive = await checkPortInUse(c, platform, c.runtime.port);
|
|
45
|
+
const isDebuggerEnabledForPlatform = REMOTE_DEBUGGER_ENABLED_PLATFORMS.includes(platform);
|
|
46
|
+
const isWeinreEnabled = isDebuggerEnabledForPlatform && !bundleAssets && !hosted;
|
|
47
|
+
if (!isPortActive) {
|
|
48
|
+
logInfo(`Your ${chalk().white(platform)} devServer at port ${chalk().white(c.runtime.port)} is not running. Starting it up for you...`);
|
|
49
|
+
waitForWebpack(c)
|
|
50
|
+
.then(() => runWebosSimOrDevice(c))
|
|
51
|
+
.catch(logError);
|
|
52
|
+
await runWebpackServer(c, isWeinreEnabled);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const resetCompleted = await confirmActiveBundler(c);
|
|
56
|
+
if (resetCompleted) {
|
|
108
57
|
waitForWebpack(c)
|
|
109
|
-
.then(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_a.sent();
|
|
117
|
-
_a.label = 14;
|
|
118
|
-
case 14: return [2];
|
|
58
|
+
.then(() => runWebosSimOrDevice(c))
|
|
59
|
+
.catch(logError);
|
|
60
|
+
await runWebpackServer(c, isWeinreEnabled);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
await runWebosSimOrDevice(c);
|
|
64
|
+
}
|
|
119
65
|
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
122
68
|
exports.runWebOS = runWebOS;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
tDir = getPlatformProjectDir(c);
|
|
134
|
-
tOut = path_1["default"].join(getPlatformBuildDir(c), 'output');
|
|
135
|
-
return [4, execCLI(c, CLI_WEBOS_ARES_PACKAGE, "-o " + tOut + " " + tDir + " -n")];
|
|
136
|
-
case 2:
|
|
137
|
-
_a.sent();
|
|
138
|
-
logSuccess("Your IPK package is located in " + chalk().cyan(tOut) + " .");
|
|
139
|
-
_a.label = 3;
|
|
140
|
-
case 3: return [2];
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
}); };
|
|
69
|
+
const buildWebOSProject = async (c) => {
|
|
70
|
+
logTask('buildWebOSProject');
|
|
71
|
+
await buildCoreWebpackProject(c);
|
|
72
|
+
if (!c.program.hosted) {
|
|
73
|
+
const tDir = getPlatformProjectDir(c);
|
|
74
|
+
const tOut = path_1.default.join(getPlatformBuildDir(c), 'output');
|
|
75
|
+
await execCLI(c, CLI_WEBOS_ARES_PACKAGE, `-o ${tOut} ${tDir} -n`);
|
|
76
|
+
logSuccess(`Your IPK package is located in ${chalk().cyan(tOut)} .`);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
144
79
|
exports.buildWebOSProject = buildWebOSProject;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if (!isPlatformActive(c, platform))
|
|
195
|
-
return [2];
|
|
196
|
-
return [4, copyAssetsFolder(c, platform)];
|
|
197
|
-
case 1:
|
|
198
|
-
_a.sent();
|
|
199
|
-
return [4, configureCoreWebProject(c)];
|
|
200
|
-
case 2:
|
|
201
|
-
_a.sent();
|
|
202
|
-
return [4, configureProject(c)];
|
|
203
|
-
case 3:
|
|
204
|
-
_a.sent();
|
|
205
|
-
copyBuildsFolder(c, platform);
|
|
206
|
-
return [2];
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
}); };
|
|
80
|
+
const configureProject = async (c) => {
|
|
81
|
+
logTask('configureProject');
|
|
82
|
+
const { platform } = c;
|
|
83
|
+
const configFile = 'appinfo.json';
|
|
84
|
+
const injects = [
|
|
85
|
+
{
|
|
86
|
+
pattern: '{{APPLICATION_ID}}',
|
|
87
|
+
override: getAppId(c, platform).toLowerCase(),
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
pattern: '{{APP_TITLE}}',
|
|
91
|
+
override: getAppTitle(c, platform),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
pattern: '{{APP_VERSION}}',
|
|
95
|
+
override: semver_1.default.coerce(getAppVersion(c, platform)),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
pattern: '{{APP_DESCRIPTION}}',
|
|
99
|
+
override: getAppDescription(c, platform),
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
pattern: '{{APP_BG_COLOR}}',
|
|
103
|
+
override: getConfigProp(c, platform, 'bgColor', '#fff'),
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
pattern: '{{APP_ICON_COLOR}}',
|
|
107
|
+
override: getConfigProp(c, platform, 'iconColor', '#000'),
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
pattern: '{{APP_VENDOR}}',
|
|
111
|
+
override: getConfigProp(c, platform, 'vendor', '24i'),
|
|
112
|
+
},
|
|
113
|
+
];
|
|
114
|
+
addSystemInjects(c, injects);
|
|
115
|
+
writeCleanFile(path_1.default.join(getTemplateProjectDir(c), configFile), path_1.default.join(getPlatformProjectDir(c), configFile), injects, null, c);
|
|
116
|
+
return true;
|
|
117
|
+
};
|
|
118
|
+
const configureWebOSProject = async (c) => {
|
|
119
|
+
logTask('configureWebOSProject');
|
|
120
|
+
const { platform } = c;
|
|
121
|
+
c.runtime.platformBuildsProjectPath = getPlatformProjectDir(c);
|
|
122
|
+
if (!isPlatformActive(c, platform))
|
|
123
|
+
return;
|
|
124
|
+
await copyAssetsFolder(c, platform);
|
|
125
|
+
await configureCoreWebProject(c);
|
|
126
|
+
await configureProject(c);
|
|
127
|
+
copyBuildsFolder(c, platform);
|
|
128
|
+
};
|
|
210
129
|
exports.configureWebOSProject = configureWebOSProject;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
var _a
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
case 1:
|
|
226
|
-
_c.sent();
|
|
227
|
-
_c.label = 2;
|
|
228
|
-
case 2: return [4, sdkUtils_1.installSdk(WEBOS_SDK_INSTALLER_URL, installPath)];
|
|
229
|
-
case 3:
|
|
230
|
-
sdkInstalledToPath = _c.sent();
|
|
231
|
-
if (!sdkInstalledToPath) return [3, 5];
|
|
232
|
-
return [4, sdkUtils_1.registerSdkPath(c, rnvSdkKey, sdkInstalledToPath)];
|
|
233
|
-
case 4:
|
|
234
|
-
_c.sent();
|
|
235
|
-
_c.label = 5;
|
|
236
|
-
case 5: return [4, installer_1.checkAndConfigureWebosSdks(c)];
|
|
237
|
-
case 6:
|
|
238
|
-
_c.sent();
|
|
239
|
-
return [2];
|
|
130
|
+
const sdkInstallerUUrl = 'https://s3.amazonaws.com/tools.nxg-bigscreen.24imedia.com/sdks/webos/ares_webos_builder_v1.10.4_multiplatform.zip';
|
|
131
|
+
const handleWebosSdk = async (c) => {
|
|
132
|
+
var _a;
|
|
133
|
+
const { WEBOS_SDK_INSTALLER_URL = sdkInstallerUUrl } = process.env;
|
|
134
|
+
const { WEBOS_SDK } = ((_a = c.buildConfig) === null || _a === void 0 ? void 0 : _a.sdks) || {};
|
|
135
|
+
const installPath = `${os_1.homedir()}/webOS_TV_SDK`;
|
|
136
|
+
const rnvSdkKey = 'WEBOS_SDK';
|
|
137
|
+
if (!WEBOS_SDK) {
|
|
138
|
+
if (fs_1.default.existsSync(installPath)) {
|
|
139
|
+
await sdkUtils_1.registerSdkPath(c, rnvSdkKey, installPath);
|
|
140
|
+
}
|
|
141
|
+
const sdkInstalledToPath = await sdkUtils_1.installSdk(WEBOS_SDK_INSTALLER_URL, installPath);
|
|
142
|
+
if (sdkInstalledToPath) {
|
|
143
|
+
await sdkUtils_1.registerSdkPath(c, rnvSdkKey, sdkInstalledToPath);
|
|
240
144
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
145
|
+
}
|
|
146
|
+
await installer_1.checkAndConfigureWebosSdks(c);
|
|
147
|
+
};
|
|
243
148
|
exports.handleWebosSdk = handleWebosSdk;
|
|
@@ -1,80 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.__esModule = true;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.exportWeb = exports.deployWeb = exports.configureWebProject = exports.buildWeb = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return [2, buildCoreWebpackProject(c)];
|
|
48
|
-
}); }); };
|
|
4
|
+
const rnv_1 = require("rnv");
|
|
5
|
+
const { getPlatformProjectDir } = rnv_1.Common;
|
|
6
|
+
const { isPlatformActive } = rnv_1.PlatformManager;
|
|
7
|
+
const { logTask } = rnv_1.Logger;
|
|
8
|
+
const { copyBuildsFolder, copyAssetsFolder } = rnv_1.ProjectManager;
|
|
9
|
+
const { buildCoreWebpackProject, configureCoreWebProject } = rnv_1.WebpackUtils;
|
|
10
|
+
const buildWeb = async (c) => buildCoreWebpackProject(c);
|
|
49
11
|
exports.buildWeb = buildWeb;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return [4, copyAssetsFolder(c, platform)];
|
|
61
|
-
case 1:
|
|
62
|
-
_a.sent();
|
|
63
|
-
return [4, configureCoreWebProject(c)];
|
|
64
|
-
case 2:
|
|
65
|
-
_a.sent();
|
|
66
|
-
copyBuildsFolder(c, platform);
|
|
67
|
-
return [2];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}); };
|
|
12
|
+
const configureWebProject = async (c) => {
|
|
13
|
+
logTask('configureWebProject');
|
|
14
|
+
const { platform } = c;
|
|
15
|
+
c.runtime.platformBuildsProjectPath = getPlatformProjectDir(c);
|
|
16
|
+
if (!isPlatformActive(c, platform))
|
|
17
|
+
return;
|
|
18
|
+
await copyAssetsFolder(c, platform);
|
|
19
|
+
await configureCoreWebProject(c);
|
|
20
|
+
copyBuildsFolder(c, platform);
|
|
21
|
+
};
|
|
71
22
|
exports.configureWebProject = configureWebProject;
|
|
72
|
-
|
|
23
|
+
const deployWeb = () => {
|
|
73
24
|
logTask('deployWeb');
|
|
74
25
|
return true;
|
|
75
26
|
};
|
|
76
27
|
exports.deployWeb = deployWeb;
|
|
77
|
-
|
|
28
|
+
const exportWeb = () => {
|
|
78
29
|
logTask('exportWeb');
|
|
79
30
|
return true;
|
|
80
31
|
};
|
|
@@ -1,63 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.__esModule = true;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.installSdk = exports.registerSdkPath = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
FileUtils.updateObjectSync(rnvWorkspaceConfigPath, customObjectToMerge);
|
|
49
|
-
Object.assign(c.buildConfig, customObjectToMerge);
|
|
50
|
-
return [2];
|
|
51
|
-
});
|
|
52
|
-
}); };
|
|
4
|
+
const { FileUtils } = require('rnv');
|
|
5
|
+
const { sdkInstaller } = require('@24i/smartapps-bigscreen-sdk-installer');
|
|
6
|
+
const registerSdkPath = async (c, sdkKey, sdkValue) => {
|
|
7
|
+
const rnvWorkspaceConfigPath = c.paths.workspace.config;
|
|
8
|
+
const customObjectToMerge = { sdks: { [sdkKey]: sdkValue } };
|
|
9
|
+
FileUtils.updateObjectSync(rnvWorkspaceConfigPath, customObjectToMerge);
|
|
10
|
+
Object.assign(c.buildConfig, customObjectToMerge);
|
|
11
|
+
};
|
|
53
12
|
exports.registerSdkPath = registerSdkPath;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
enableLogs: true
|
|
60
|
-
})];
|
|
61
|
-
});
|
|
62
|
-
}); };
|
|
13
|
+
const installSdk = async (installerUrl, installPath) => sdkInstaller({
|
|
14
|
+
zipPath: installerUrl,
|
|
15
|
+
installPath,
|
|
16
|
+
enableLogs: true,
|
|
17
|
+
});
|
|
63
18
|
exports.installSdk = installSdk;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.rm = exports.cp = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const child_process_1 = require("child_process");
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const runCmdSync = (cmd) => child_process_1.execSync(cmd, { stdio: 'inherit' });
|
|
10
|
+
const isDir = (path) => fs_1.default.existsSync(path) && fs_1.default.lstatSync(path).isDirectory();
|
|
11
|
+
const cp = (source, destination) => {
|
|
12
|
+
let cmd = `aws s3 cp ${source} s3://${destination} --acl public-read`;
|
|
13
13
|
if (isDir(source)) {
|
|
14
14
|
cmd += ' --recursive';
|
|
15
15
|
}
|
|
16
16
|
runCmdSync(cmd);
|
|
17
17
|
};
|
|
18
18
|
exports.cp = cp;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const rm = (remoteDirPath) => {
|
|
20
|
+
let cmd = `aws s3 rm s3://${remoteDirPath}`;
|
|
21
21
|
if (remoteDirPath.endsWith('/')) {
|
|
22
22
|
cmd += ' --recursive';
|
|
23
23
|
}
|