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