@24i/bigscreen-sdk 1.0.15-alpha.2301 → 1.0.15
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/package.json +3 -3
- package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +2 -0
- package/packages/epg/src/v2/MockGenerator/generator.ts +3 -2
- package/packages/types-bigscreen-jsx/index.d.ts +50 -50
- package/packages/create-package/dist/createPackage.js +0 -66
- package/packages/create-package/dist/createPackage.js.map +0 -1
- package/packages/create-package/dist/index.js +0 -5
- package/packages/create-package/dist/index.js.map +0 -1
- package/packages/create-package/dist/questionnaire/questions.js +0 -35
- package/packages/create-package/dist/questionnaire/questions.js.map +0 -1
- package/packages/create-package/dist/settings/Settings.js +0 -10
- package/packages/create-package/dist/settings/Settings.js.map +0 -1
- package/packages/create-package/dist/types.js +0 -3
- package/packages/create-package/dist/types.js.map +0 -1
- package/packages/rnv-build-engine/dist/src/constants/buildSchemes.js +0 -14
- package/packages/rnv-build-engine/dist/src/constants/index.js +0 -7
- package/packages/rnv-build-engine/dist/src/constants/platforms.js +0 -14
- package/packages/rnv-build-engine/dist/src/engine.js +0 -94
- package/packages/rnv-build-engine/dist/src/index.js +0 -26
- package/packages/rnv-build-engine/dist/src/resolvers/index.js +0 -29
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBaseUrl.js +0 -31
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildFileExtension.js +0 -12
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildFileName.js +0 -36
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildVersion.js +0 -42
- package/packages/rnv-build-engine/dist/src/resolvers/resolveBuildVersionOffset.js +0 -34
- package/packages/rnv-build-engine/dist/src/resolvers/resolveDeployLocations.js +0 -79
- package/packages/rnv-build-engine/dist/src/resolvers/resolveGenericRnvConfig.js +0 -47
- package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvDeployConfig.js +0 -13
- package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvDeployUrl.js +0 -11
- package/packages/rnv-build-engine/dist/src/resolvers/resolveHbbtvRemoteBuildDirRelativePath.js +0 -24
- package/packages/rnv-build-engine/dist/src/resolvers/resolveSupportedPlatforms.js +0 -5
- package/packages/rnv-build-engine/dist/src/resolvers/resolveUsedFlavours.js +0 -23
- package/packages/rnv-build-engine/dist/src/resolvers/resolveZippedPlatformBuildsRelativeFilePath.js +0 -14
- package/packages/rnv-build-engine/dist/src/scripts/buildAllWithScheme.js +0 -25
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/formatTableDataSpaces.js +0 -30
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/generateDeployUrls.js +0 -90
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/index.js +0 -4
- package/packages/rnv-build-engine/dist/src/scripts/generateDeployUrls/makeTableDataByScheme.js +0 -63
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/afterVersionBump.js +0 -18
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/beforeVersionBump.js +0 -12
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/checkReleaseNotes.js +0 -16
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushRelease.js +0 -31
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushReleaseCandidate.js +0 -6
- package/packages/rnv-build-engine/dist/src/scripts/gitReleaser/pushReleaseNotes.js +0 -37
- package/packages/rnv-build-engine/dist/src/scripts/release/deleteSourceMaps.js +0 -11
- package/packages/rnv-build-engine/dist/src/scripts/release/deployToAppCenter.js +0 -83
- package/packages/rnv-build-engine/dist/src/scripts/release/githubRelease.js +0 -128
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/generateWebhoook.js +0 -66
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/makePayload.js +0 -92
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/notifySlack.js +0 -44
- package/packages/rnv-build-engine/dist/src/scripts/release/notifySlack/slackBlockKitBuilder.js +0 -39
- package/packages/rnv-build-engine/dist/src/scripts/release/sentryRelease.js +0 -85
- package/packages/rnv-build-engine/dist/src/scripts/release/urlsMarkdown.js +0 -62
- package/packages/rnv-build-engine/dist/src/scripts/releaseAllWithScheme.js +0 -79
- package/packages/rnv-build-engine/dist/src/scripts/utils/cmdUtils.js +0 -12
- package/packages/rnv-build-engine/dist/src/scripts/utils/fsUtils.js +0 -33
- package/packages/rnv-build-engine/dist/src/scripts/utils/generateIcons.js +0 -29
- package/packages/rnv-build-engine/dist/src/scripts/utils/gitUtils.js +0 -78
- package/packages/rnv-build-engine/dist/src/scripts/utils/index.js +0 -27
- package/packages/rnv-build-engine/dist/src/scripts/utils/stringUtils.js +0 -5
- package/packages/rnv-build-engine/dist/src/sdks/index.js +0 -42
- package/packages/rnv-build-engine/dist/src/sdks/sdk-tizen/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-tizen/sdkTizen.js +0 -240
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/index.js +0 -14
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/registerSdkPath.js +0 -14
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/index.js +0 -5
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/sdkInstaller.js +0 -39
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/clean.js +0 -11
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/download.js +0 -74
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/index.js +0 -11
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/install.js +0 -23
- package/packages/rnv-build-engine/dist/src/sdks/sdk-utils/sdk-installer/services/unzip.js +0 -12
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webos/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webos/sdkWebos.js +0 -135
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webpack/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-webpack/sdkWebpack.js +0 -32
- package/packages/rnv-build-engine/dist/src/sdks/sdk-xbox/index.js +0 -13
- package/packages/rnv-build-engine/dist/src/sdks/sdk-xbox/sdkXbox.js +0 -222
- package/packages/rnv-build-engine/dist/src/tasks/deploy/aswS3/aws.js +0 -22
- package/packages/rnv-build-engine/dist/src/tasks/deploy/aswS3/deployS3.js +0 -71
- package/packages/rnv-build-engine/dist/src/tasks/deploy/hbbtv/deployHbbtv.js +0 -94
- package/packages/rnv-build-engine/dist/src/tasks/engineTasks.js +0 -22
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.build.js +0 -99
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.configure.js +0 -45
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.configureSoft.js +0 -31
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.deploy.js +0 -40
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.hooks.run.js +0 -71
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.package.js +0 -19
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.project.configure.js +0 -116
- package/packages/rnv-build-engine/dist/src/tasks/task.rnv.start.js +0 -72
- package/packages/rnv-build-engine/dist/src/types/c.js +0 -2
- package/packages/rnv-build-engine/dist/src/types/constants.js +0 -2
- package/packages/rnv-build-engine/dist/src/types/index.js +0 -2
- package/packages/rnv-build-engine/dist/src/utils/forEachSupportedPlatformFlavour.js +0 -24
- package/packages/rnv-build-engine/dist/src/utils/generatePngSpriteMap.js +0 -78
- package/packages/rnv-build-engine/dist/src/utils/generateSvgSpriteMap.js +0 -113
- package/packages/rnv-build-engine/dist/src/utils/mergeSvgAndPngIcons.js +0 -61
- package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/index.js +0 -5
- package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/replaceRelevantStringsInConfig.js +0 -31
- package/packages/rnv-build-engine/dist/src/utils/replaceRelevantStringsInConfig/replaceTemplateString.js +0 -40
- package/packages/rnv-build-engine/dist/src/utils/zipBuildsByPlatforms.js +0 -61
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/template.js +0 -110
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/utils/extendSass.js +0 -29
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/utils/joinStrings.js +0 -5
- package/packages/rnv-build-engine/dist/templates/platforms/_shared/webpack.base.js +0 -239
- package/packages/rnv-build-engine/dist/templates/platforms/entone/webpack.config.dev.js +0 -63
- package/packages/rnv-build-engine/dist/templates/platforms/entone/webpack.config.prod.js +0 -58
- package/packages/rnv-build-engine/dist/templates/platforms/hbbtv/webpack.config.dev.js +0 -80
- package/packages/rnv-build-engine/dist/templates/platforms/hbbtv/webpack.config.prod.js +0 -75
- package/packages/rnv-build-engine/dist/templates/platforms/kreatv/webpack.config.dev.js +0 -63
- package/packages/rnv-build-engine/dist/templates/platforms/kreatv/webpack.config.prod.js +0 -58
- package/packages/rnv-build-engine/dist/templates/platforms/saphi/webpack.config.dev.js +0 -63
- package/packages/rnv-build-engine/dist/templates/platforms/saphi/webpack.config.prod.js +0 -58
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/.project +0 -24
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/.tproject +0 -12
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/project/config.xml +0 -17
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/webpack.config.dev.js +0 -64
- package/packages/rnv-build-engine/dist/templates/platforms/tizen/webpack.config.prod.js +0 -58
- package/packages/rnv-build-engine/dist/templates/platforms/webos/project/.project +0 -35
- package/packages/rnv-build-engine/dist/templates/platforms/webos/project/appinfo.json +0 -19
- package/packages/rnv-build-engine/dist/templates/platforms/webos/webpack.config.dev.js +0 -65
- package/packages/rnv-build-engine/dist/templates/platforms/webos/webpack.config.prod.js +0 -58
- package/packages/rnv-build-engine/dist/templates/platforms/webtv/webpack.config.dev.js +0 -63
- package/packages/rnv-build-engine/dist/templates/platforms/webtv/webpack.config.prod.js +0 -58
- package/packages/rnv-build-engine/dist/templates/platforms/xbox/webpack.config.dev.js +0 -64
- package/packages/rnv-build-engine/dist/templates/platforms/xbox/webpack.config.prod.js +0 -58
- package/packages/sdk-installer/dist/index.js +0 -5
- package/packages/sdk-installer/dist/sdkInstaller.js +0 -38
- package/packages/sdk-installer/dist/services/clean.js +0 -11
- package/packages/sdk-installer/dist/services/download.js +0 -55
- package/packages/sdk-installer/dist/services/index.js +0 -11
- package/packages/sdk-installer/dist/services/install.js +0 -24
- package/packages/sdk-installer/dist/services/unzip.js +0 -12
- package/packages/sdk-installer/dist/types/index.d.ts +0 -1
- package/packages/sdk-installer/dist/types/sdkInstaller.d.ts +0 -7
- package/packages/sdk-installer/dist/types/services/clean.d.ts +0 -2
- package/packages/sdk-installer/dist/types/services/download.d.ts +0 -2
- package/packages/sdk-installer/dist/types/services/index.d.ts +0 -4
- package/packages/sdk-installer/dist/types/services/install.d.ts +0 -2
- package/packages/sdk-installer/dist/types/services/unzip.d.ts +0 -2
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildXboxProject = void 0;
|
|
4
|
-
const rnv_1 = require("rnv");
|
|
5
|
-
const sdk_webpack_1 = require("@rnv/sdk-webpack");
|
|
6
|
-
const child_process_1 = require("child_process");
|
|
7
|
-
const fs_1 = require("fs");
|
|
8
|
-
const manifoldjs_windows10_1 = require("manifoldjs-windows10");
|
|
9
|
-
const xml2js_1 = require("xml2js");
|
|
10
|
-
const resolvers_1 = require("../../resolvers");
|
|
11
|
-
const fs = fs_1.promises;
|
|
12
|
-
const { logTask } = rnv_1.Logger;
|
|
13
|
-
const hostedAppOutputPath = '/output/hosted';
|
|
14
|
-
const packagedAppOutputPath = '/output/packaged';
|
|
15
|
-
const packagedAppSrcDestination = '/output/packaged/windows10/source/src';
|
|
16
|
-
const appSourcePath = '/project/public';
|
|
17
|
-
const packagedAppEntryUrl = 'src/index.html';
|
|
18
|
-
const wrapperConfigPath = '/wrapperConfig.json';
|
|
19
|
-
const hostedAppSource = '/output/hosted/windows10/source';
|
|
20
|
-
const packagedAppSource = '/output/packaged/windows10/source';
|
|
21
|
-
const hostedSourceImages = '/output/hosted/windows10/source/images';
|
|
22
|
-
const packagedSourceImages = '/output/packaged/windows10/source/images';
|
|
23
|
-
const hostedManifestImages = '/output/hosted/windows10/manifest/images';
|
|
24
|
-
const packagedManifestImages = '/output/packaged/windows10/manifest/images';
|
|
25
|
-
const directionalNavPath = '/node_modules/@24i/smartapps-bigscreen-driver-xbox/__external__/winjs/directionalnavigation-1.0.0.0.js';
|
|
26
|
-
const identityNamePlaceholder = 'INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE';
|
|
27
|
-
const identityPublisherPlaceholder = 'INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE';
|
|
28
|
-
const publisherDisplayNamePlaceholder = 'INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE';
|
|
29
|
-
class Manifest {
|
|
30
|
-
content = { start_url: '', short_name: '', theme_color: 'white' };
|
|
31
|
-
format = 'w3c';
|
|
32
|
-
}
|
|
33
|
-
const getHostedAppEntryUrl = (c) => {
|
|
34
|
-
const deployLocations = (0, resolvers_1.resolveDeployLocations)(c);
|
|
35
|
-
const keys = Object.keys(deployLocations.versions);
|
|
36
|
-
let url = '';
|
|
37
|
-
if (keys.length > 0) {
|
|
38
|
-
const version = keys[0];
|
|
39
|
-
if (version !== null) {
|
|
40
|
-
const flavour = c.runtime.appId;
|
|
41
|
-
url = deployLocations.versions[version].platforms.xbox?.[flavour].indexUrl ?? '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return url;
|
|
45
|
-
};
|
|
46
|
-
const getBuildFolder = (c) => `${rnv_1.Common.getPlatformBuildDir(c)}`;
|
|
47
|
-
const zipOutput = async (c) => {
|
|
48
|
-
logTask('zipOutput');
|
|
49
|
-
const defaultZipFileName = `${c.platform}_${c.runtime.appId}.zip`;
|
|
50
|
-
const fileName = (0, resolvers_1.resolveBuildFileName)(c) || defaultZipFileName;
|
|
51
|
-
const outputDirectory = `${getBuildFolder(c)}/output`;
|
|
52
|
-
const tmpOutputDirectory = `${getBuildFolder(c)}/tmpOutput`;
|
|
53
|
-
try {
|
|
54
|
-
await fs.mkdir(tmpOutputDirectory);
|
|
55
|
-
(0, child_process_1.execSync)(`cp -r ${outputDirectory} ${tmpOutputDirectory}`);
|
|
56
|
-
await fs.rm(outputDirectory, { recursive: true, force: true });
|
|
57
|
-
await fs.mkdir(outputDirectory);
|
|
58
|
-
(0, child_process_1.execSync)(`zip -r ${outputDirectory}/${fileName} *`, { cwd: `${tmpOutputDirectory}` });
|
|
59
|
-
await fs.rm(tmpOutputDirectory, { recursive: true, force: true });
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
throw new Error('Unable to zip the output folder');
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const createVSSolution = async (c, outputPath, manifest) => {
|
|
66
|
-
logTask('createVSSolution');
|
|
67
|
-
try {
|
|
68
|
-
manifest.content.short_name = c.buildConfig.common.appName;
|
|
69
|
-
const platform = new manifoldjs_windows10_1.Platform('package', ['windows10']);
|
|
70
|
-
await platform.create(manifest, outputPath, ['windows10'], '');
|
|
71
|
-
}
|
|
72
|
-
catch (e) {
|
|
73
|
-
if (e instanceof Error
|
|
74
|
-
&& !e.message.includes('Error retrieving information for module')) {
|
|
75
|
-
console.error(e.message);
|
|
76
|
-
throw new Error('Failed to create VSSolution');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
const createHostedApplication = async (c) => {
|
|
81
|
-
logTask('createHostedApplication');
|
|
82
|
-
const manifest = new Manifest();
|
|
83
|
-
manifest.content.start_url = getHostedAppEntryUrl(c);
|
|
84
|
-
await createVSSolution(c, `${getBuildFolder(c)}${hostedAppOutputPath}`, manifest);
|
|
85
|
-
};
|
|
86
|
-
const readContent = (c, path) => {
|
|
87
|
-
logTask('readContent');
|
|
88
|
-
const srcDirectory = `${getBuildFolder(c)}${packagedAppSource}/${path}`;
|
|
89
|
-
let content = [];
|
|
90
|
-
try {
|
|
91
|
-
const res = (0, fs_1.readdirSync)(srcDirectory, { withFileTypes: true });
|
|
92
|
-
for (let i = 0; i < res.length; i++) {
|
|
93
|
-
const file = res[i];
|
|
94
|
-
const fileNameWithPath = `${path}/${file.name}`;
|
|
95
|
-
if (file.isDirectory()) {
|
|
96
|
-
const subdirectoryContent = readContent(c, fileNameWithPath);
|
|
97
|
-
content = content.concat(subdirectoryContent);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
content.push(fileNameWithPath);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
catch (err) {
|
|
105
|
-
throw new Error('Failed to parse project content');
|
|
106
|
-
}
|
|
107
|
-
return content;
|
|
108
|
-
};
|
|
109
|
-
const addPackagedFiles = async (c) => {
|
|
110
|
-
logTask('addPackagedFiles');
|
|
111
|
-
const destinationDirectory = `${getBuildFolder(c)}${packagedAppSource}/App.jsproj`;
|
|
112
|
-
try {
|
|
113
|
-
let xmlString = await fs.readFile(destinationDirectory, 'utf-8');
|
|
114
|
-
const xmlObject = await (0, xml2js_1.parseStringPromise)(xmlString);
|
|
115
|
-
const srcDirectoryContent = readContent(c, 'src');
|
|
116
|
-
srcDirectoryContent.forEach((element) => {
|
|
117
|
-
const contentElement = { $: { Include: element } };
|
|
118
|
-
xmlObject.Project.ItemGroup[1].Content.push(contentElement);
|
|
119
|
-
});
|
|
120
|
-
const builder = new xml2js_1.Builder();
|
|
121
|
-
xmlString = builder.buildObject(xmlObject);
|
|
122
|
-
await fs.writeFile(destinationDirectory, xmlString);
|
|
123
|
-
}
|
|
124
|
-
catch {
|
|
125
|
-
throw new Error('Failed to parse update App.jsproj project file');
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
const createPackagedApplication = async (c) => {
|
|
129
|
-
logTask('createPackagedApplication');
|
|
130
|
-
const manifest = new Manifest();
|
|
131
|
-
manifest.content.start_url = packagedAppEntryUrl;
|
|
132
|
-
const sourceDir = `${getBuildFolder(c)}${appSourcePath}`;
|
|
133
|
-
const destinationDirectory = `${getBuildFolder(c)}${packagedAppSrcDestination}`;
|
|
134
|
-
await createVSSolution(c, `${getBuildFolder(c)}${packagedAppOutputPath}`, manifest);
|
|
135
|
-
(0, child_process_1.execSync)(`cp -r ${sourceDir} ${destinationDirectory}`);
|
|
136
|
-
await addPackagedFiles(c);
|
|
137
|
-
};
|
|
138
|
-
const replacePublisherId = async (c, basePath) => {
|
|
139
|
-
logTask('replacePublisherId');
|
|
140
|
-
const output = `${basePath}/windows10/manifest/appxmanifest.xml`;
|
|
141
|
-
const configPath = `${getBuildFolder(c)}${wrapperConfigPath}`;
|
|
142
|
-
let appxmanifest = null;
|
|
143
|
-
let identityName = null;
|
|
144
|
-
let identityPublisher = null;
|
|
145
|
-
let publisherDisplayName = null;
|
|
146
|
-
try {
|
|
147
|
-
const data = await fs.readFile(configPath, 'utf-8');
|
|
148
|
-
const config = JSON.parse(data);
|
|
149
|
-
({
|
|
150
|
-
identityName = null,
|
|
151
|
-
identityPublisher = null,
|
|
152
|
-
publisherDisplayName = null,
|
|
153
|
-
} = config);
|
|
154
|
-
const appxmanifestData = await fs.readFile(output, 'utf-8');
|
|
155
|
-
appxmanifest = appxmanifestData;
|
|
156
|
-
if (identityName !== null
|
|
157
|
-
&& identityPublisher !== null
|
|
158
|
-
&& publisherDisplayName !== null) {
|
|
159
|
-
appxmanifest = appxmanifest.replace(identityNamePlaceholder, identityName)
|
|
160
|
-
.replace(identityPublisherPlaceholder, identityPublisher)
|
|
161
|
-
.replace(publisherDisplayNamePlaceholder, publisherDisplayName);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
throw new Error('failed to obtain store settings');
|
|
165
|
-
}
|
|
166
|
-
await fs.writeFile(output, appxmanifest ?? '');
|
|
167
|
-
}
|
|
168
|
-
catch (e) {
|
|
169
|
-
if (e instanceof Error) {
|
|
170
|
-
throw new Error(`Failed to modify the xbox appxmanifest.xml - ${e.message}`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const replaceImages = async (c) => {
|
|
175
|
-
logTask('replaceImages');
|
|
176
|
-
const hostedOutputDirectory = `${getBuildFolder(c)}${hostedSourceImages}`;
|
|
177
|
-
const packagedOutputDirectory = `${getBuildFolder(c)}${packagedSourceImages}`;
|
|
178
|
-
const hostedOutputManifestDirectory = `${getBuildFolder(c)}${hostedManifestImages}`;
|
|
179
|
-
const packagedOutputManifestDirectory = `${getBuildFolder(c)}${packagedManifestImages}`;
|
|
180
|
-
const appIconsDirectory = `${getBuildFolder(c)}/project/appIcons`;
|
|
181
|
-
try {
|
|
182
|
-
await fs.rm(hostedOutputDirectory, { recursive: true, force: true });
|
|
183
|
-
await fs.rm(packagedOutputDirectory, { recursive: true, force: true });
|
|
184
|
-
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${hostedOutputDirectory}`);
|
|
185
|
-
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${packagedOutputDirectory}`);
|
|
186
|
-
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${hostedOutputManifestDirectory}`);
|
|
187
|
-
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${packagedOutputManifestDirectory}`);
|
|
188
|
-
await fs.rm(appIconsDirectory, { recursive: true, force: true });
|
|
189
|
-
}
|
|
190
|
-
catch {
|
|
191
|
-
throw new Error('Failed to replace the xbox icons');
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
const copyWinJS = async (c) => {
|
|
195
|
-
logTask('copyWinJS');
|
|
196
|
-
const source = `${process.cwd()}${directionalNavPath}`;
|
|
197
|
-
const packagedAppDestination = `${getBuildFolder(c)}${packagedAppSource}/lib/TVHelpers`;
|
|
198
|
-
const hostedAppDestination = `${getBuildFolder(c)}${hostedAppSource}/lib/TVHelpers`;
|
|
199
|
-
try {
|
|
200
|
-
await fs.mkdir(packagedAppDestination, { recursive: true });
|
|
201
|
-
await fs.mkdir(hostedAppDestination, { recursive: true });
|
|
202
|
-
(0, child_process_1.execSync)(`cp -r ${source} ${packagedAppDestination}`);
|
|
203
|
-
(0, child_process_1.execSync)(`cp -r ${source} ${hostedAppDestination}`);
|
|
204
|
-
}
|
|
205
|
-
catch {
|
|
206
|
-
throw new Error('Failed to copy the winJS library');
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
const buildXboxProject = async (c) => {
|
|
210
|
-
logTask('buildXboxProject');
|
|
211
|
-
const outputDirectory = `${getBuildFolder(c)}/output`;
|
|
212
|
-
await (0, sdk_webpack_1.buildCoreWebpackProject)(c);
|
|
213
|
-
await fs.rm(outputDirectory, { recursive: true, force: true });
|
|
214
|
-
await createHostedApplication(c);
|
|
215
|
-
await createPackagedApplication(c);
|
|
216
|
-
await replacePublisherId(c, `${getBuildFolder(c)}${hostedAppOutputPath}`);
|
|
217
|
-
await replacePublisherId(c, `${getBuildFolder(c)}${packagedAppOutputPath}`);
|
|
218
|
-
await replaceImages(c);
|
|
219
|
-
await copyWinJS(c);
|
|
220
|
-
await zipOutput(c);
|
|
221
|
-
};
|
|
222
|
-
exports.buildXboxProject = buildXboxProject;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rm = exports.cp = void 0;
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const fsUtils_1 = require("../../../scripts/utils/fsUtils");
|
|
6
|
-
const runCmdSync = (cmd) => (0, child_process_1.execSync)(cmd, { stdio: 'inherit' });
|
|
7
|
-
const cp = (source, destination) => {
|
|
8
|
-
let cmd = `aws s3 cp ${source} s3://${destination} --acl public-read`;
|
|
9
|
-
if ((0, fsUtils_1.isDir)(source)) {
|
|
10
|
-
cmd += ' --recursive';
|
|
11
|
-
}
|
|
12
|
-
runCmdSync(cmd);
|
|
13
|
-
};
|
|
14
|
-
exports.cp = cp;
|
|
15
|
-
const rm = (remoteDirPath) => {
|
|
16
|
-
let cmd = `aws s3 rm s3://${remoteDirPath}`;
|
|
17
|
-
if (remoteDirPath.endsWith('/')) {
|
|
18
|
-
cmd += ' --recursive';
|
|
19
|
-
}
|
|
20
|
-
runCmdSync(cmd);
|
|
21
|
-
};
|
|
22
|
-
exports.rm = rm;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.deployToS3 = void 0;
|
|
23
|
-
const path = __importStar(require("path"));
|
|
24
|
-
const rnv_1 = require("rnv");
|
|
25
|
-
const aws = __importStar(require("./aws"));
|
|
26
|
-
const constants_1 = require("../../../constants");
|
|
27
|
-
const resolvers_1 = require("../../../resolvers");
|
|
28
|
-
const { getConfigProp } = rnv_1.Common;
|
|
29
|
-
const uploadPackage = (c, sourcePath, uploadPath) => {
|
|
30
|
-
const packageOutputDirPath = `${sourcePath}/output`;
|
|
31
|
-
const packageFileName = (0, resolvers_1.resolveBuildFileName)(c);
|
|
32
|
-
const packageLocalPath = `"${packageOutputDirPath}/${packageFileName}"`;
|
|
33
|
-
const packageRemotePath = `"${uploadPath}/build/${packageFileName}"`;
|
|
34
|
-
aws.cp(packageLocalPath, packageRemotePath);
|
|
35
|
-
};
|
|
36
|
-
const uploadPublicDir = (sourcePath, uploadPath) => {
|
|
37
|
-
const publicDirLocalPath = path.join(sourcePath, 'project', 'public');
|
|
38
|
-
const publicDirRemotePath = `${uploadPath}/public`;
|
|
39
|
-
aws.cp(publicDirLocalPath, publicDirRemotePath);
|
|
40
|
-
};
|
|
41
|
-
const urlToS3Protocol = (url) => {
|
|
42
|
-
const hostWithPath = url.split('://')[1];
|
|
43
|
-
const bucketHostnameAwsPostfix = '.s3.amazonaws.com';
|
|
44
|
-
return hostWithPath.replace(bucketHostnameAwsPostfix, '');
|
|
45
|
-
};
|
|
46
|
-
const deployToS3 = async (c) => {
|
|
47
|
-
const { platform, runtime } = c;
|
|
48
|
-
const sourcePath = runtime.appDir;
|
|
49
|
-
const { isBuildHosted } = getConfigProp(c, platform, 'webpackConfig', {});
|
|
50
|
-
const baseUrl = (0, resolvers_1.resolveBaseUrl)({
|
|
51
|
-
platform,
|
|
52
|
-
scheme: runtime.scheme || '',
|
|
53
|
-
flavour: runtime.appId,
|
|
54
|
-
});
|
|
55
|
-
if (!baseUrl) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
const uploadPath = urlToS3Protocol(baseUrl);
|
|
59
|
-
aws.rm(`${uploadPath}/`);
|
|
60
|
-
uploadPackage(c, sourcePath, uploadPath);
|
|
61
|
-
if (platform === constants_1.Platforms.HBBTV) {
|
|
62
|
-
process.stdout.write(`For ${platform} platform, only ZIP package deployment is configured. Skipping deploying app content to AWS S3.\n`);
|
|
63
|
-
process.stdout.write('Deploy done.\n');
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
const sourceDirPath = isBuildHosted ? `${sourcePath}-public` : sourcePath;
|
|
67
|
-
uploadPublicDir(sourceDirPath, uploadPath);
|
|
68
|
-
process.stdout.write('Deploy done.\n');
|
|
69
|
-
return true;
|
|
70
|
-
};
|
|
71
|
-
exports.deployToS3 = deployToS3;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.deployHbbTV = void 0;
|
|
23
|
-
const path = __importStar(require("path"));
|
|
24
|
-
const nodessh = __importStar(require("node-ssh"));
|
|
25
|
-
const constants_1 = require("../../../constants");
|
|
26
|
-
const resolvers_1 = require("../../../resolvers");
|
|
27
|
-
const getSshKeyAbsolutePath = (c, sshKeyRelativePath) => {
|
|
28
|
-
if (!sshKeyRelativePath)
|
|
29
|
-
return '';
|
|
30
|
-
return path.join(c.paths.project.dir, sshKeyRelativePath);
|
|
31
|
-
};
|
|
32
|
-
const makeSshConnection = async (c) => {
|
|
33
|
-
const { host, username, privateKeyRelativePath } = (0, resolvers_1.resolveHbbtvDeployConfig)();
|
|
34
|
-
const privateKey = getSshKeyAbsolutePath(c, privateKeyRelativePath);
|
|
35
|
-
const passphrase = process.env.CI_SSH_KEY_PASSPHRASE;
|
|
36
|
-
if (!privateKey || !passphrase) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
const ssh = new nodessh.NodeSSH();
|
|
40
|
-
await ssh.connect({ host, username, privateKey, passphrase });
|
|
41
|
-
return ssh;
|
|
42
|
-
};
|
|
43
|
-
const getLocalBuildPackagePath = (c) => (path.join(c.runtime.appDir, 'output', (0, resolvers_1.resolveBuildFileName)(c)));
|
|
44
|
-
const resolveRemotePaths = (c) => {
|
|
45
|
-
const { scheme, appId } = c.runtime;
|
|
46
|
-
const remoteBuildDirRelativePath = (0, resolvers_1.resolveHbbtvRemoteBuildDirRelativePath)(c, scheme, appId);
|
|
47
|
-
const { hostHomeDir, dockerHtmlRootDir } = (0, resolvers_1.resolveHbbtvDeployConfig)();
|
|
48
|
-
const hostTempDirName = 'travis-ci-temp';
|
|
49
|
-
return {
|
|
50
|
-
serverTempDirPath: `${hostHomeDir}/${hostTempDirName}/${remoteBuildDirRelativePath}`,
|
|
51
|
-
dockerProjectDirPath: `${dockerHtmlRootDir}/${remoteBuildDirRelativePath}`,
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
const log = (msg) => process.stdout.write(msg);
|
|
55
|
-
const deployHbbTV = async (c) => {
|
|
56
|
-
if (c.platform !== constants_1.Platforms.HBBTV)
|
|
57
|
-
return;
|
|
58
|
-
const { scheme, appId } = c.runtime;
|
|
59
|
-
log('HbbTV deploy via SSH.\n\n');
|
|
60
|
-
const remotePaths = resolveRemotePaths(c);
|
|
61
|
-
const { dockerContainerName } = (0, resolvers_1.resolveHbbtvDeployConfig)();
|
|
62
|
-
const remotePackagePath = `${remotePaths.serverTempDirPath}/${(0, resolvers_1.resolveBuildFileName)(c)}`;
|
|
63
|
-
const dockerExecPrefix = `docker exec -t ${dockerContainerName}`;
|
|
64
|
-
const dockerAppDirPath = remotePaths.dockerProjectDirPath;
|
|
65
|
-
log('Creating connection...\n');
|
|
66
|
-
const ssh = await makeSshConnection(c);
|
|
67
|
-
if (ssh === null) {
|
|
68
|
-
throw new Error('Connection failed - check "privateKeyRelativePath" or "process.env.CI_SSH_KEY_PASSPHRASE" deploy params.');
|
|
69
|
-
}
|
|
70
|
-
log('Clearing temporary dir on host side...\n');
|
|
71
|
-
await ssh.execCommand(`rm -Rf ${remotePaths.serverTempDirPath}`);
|
|
72
|
-
log('Transferring build package from local machine to host...\n');
|
|
73
|
-
await ssh.putFile(getLocalBuildPackagePath(c), remotePackagePath);
|
|
74
|
-
log('Unzipping transferred build package...\n');
|
|
75
|
-
await ssh.execCommand(`unzip ${remotePackagePath}`, { cwd: remotePaths.serverTempDirPath });
|
|
76
|
-
log('Removing transferred build package...\n');
|
|
77
|
-
await ssh.execCommand(`rm ${remotePackagePath}`);
|
|
78
|
-
log('Clearing docker dir on host side...\n');
|
|
79
|
-
await ssh.execCommand(`${dockerExecPrefix} rm -rf ${dockerAppDirPath}`);
|
|
80
|
-
const indexHtmlParentDirPath = `${dockerAppDirPath}/public`;
|
|
81
|
-
log('Creating requested path for build in docker...\n');
|
|
82
|
-
await ssh.execCommand(`${dockerExecPrefix} mkdir -p ${indexHtmlParentDirPath}`);
|
|
83
|
-
log('Copying unzipped build package from host to host\'s docker path...\n');
|
|
84
|
-
const sourcePath = `${remotePaths.serverTempDirPath}/.`;
|
|
85
|
-
const destPath = `${dockerContainerName}:${indexHtmlParentDirPath}`;
|
|
86
|
-
const cmd = `docker cp ${sourcePath} ${destPath}`;
|
|
87
|
-
await ssh.execCommand(cmd);
|
|
88
|
-
log('Clearing temporary dir on host side...\n');
|
|
89
|
-
await ssh.execCommand(`rm -Rf ${remotePaths.serverTempDirPath}`);
|
|
90
|
-
const deployedUrl = (0, resolvers_1.resolveHbbtvDeployUrl)(c, scheme, appId);
|
|
91
|
-
log(`\nThe build is deployed at ${deployedUrl}\n`);
|
|
92
|
-
log('Deploy done.\n');
|
|
93
|
-
};
|
|
94
|
-
exports.deployHbbTV = deployHbbTV;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.engineTaskList = void 0;
|
|
4
|
-
const task_rnv_build_1 = require("./task.rnv.build");
|
|
5
|
-
const task_rnv_configure_1 = require("./task.rnv.configure");
|
|
6
|
-
const task_rnv_configureSoft_1 = require("./task.rnv.configureSoft");
|
|
7
|
-
const task_rnv_deploy_1 = require("./task.rnv.deploy");
|
|
8
|
-
const task_rnv_hooks_run_1 = require("./task.rnv.hooks.run");
|
|
9
|
-
const task_rnv_package_1 = require("./task.rnv.package");
|
|
10
|
-
const task_rnv_start_1 = require("./task.rnv.start");
|
|
11
|
-
const task_rnv_project_configure_1 = require("./task.rnv.project.configure");
|
|
12
|
-
const engineTaskList = [
|
|
13
|
-
task_rnv_build_1.customRnvBuildTask,
|
|
14
|
-
task_rnv_configure_1.customRnvConfigureTask,
|
|
15
|
-
task_rnv_configureSoft_1.customRnvConfigureSoftTask,
|
|
16
|
-
task_rnv_deploy_1.customRnvDeployTask,
|
|
17
|
-
task_rnv_hooks_run_1.customRnvHooksRunTask,
|
|
18
|
-
task_rnv_package_1.customRnvPackageTask,
|
|
19
|
-
task_rnv_project_configure_1.customRnvProjectConfigureTask,
|
|
20
|
-
task_rnv_start_1.customRnvStartTask,
|
|
21
|
-
];
|
|
22
|
-
exports.engineTaskList = engineTaskList;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.customRnvBuildTask = void 0;
|
|
23
|
-
const child_process_1 = require("child_process");
|
|
24
|
-
const fs = __importStar(require("fs"));
|
|
25
|
-
const rnv_1 = require("rnv");
|
|
26
|
-
const constants_1 = require("../constants");
|
|
27
|
-
const sdks_1 = require("../sdks");
|
|
28
|
-
const resolvers_1 = require("../resolvers");
|
|
29
|
-
const { getPlatformBuildDir, getPlatformProjectDir } = rnv_1.Common;
|
|
30
|
-
const { logErrorPlatform } = rnv_1.PlatformManager;
|
|
31
|
-
const { logTask } = rnv_1.Logger;
|
|
32
|
-
const { buildWeb } = sdks_1.SDKWebpack;
|
|
33
|
-
const { buildTizenProject } = sdks_1.SDKTizen;
|
|
34
|
-
const { buildWebOSProject } = sdks_1.SDKWebos;
|
|
35
|
-
const { buildXboxProject } = sdks_1.SDKXbox;
|
|
36
|
-
const { executeOrSkipTask } = rnv_1.TaskManager;
|
|
37
|
-
const { TASK_BUILD, TASK_PACKAGE, PARAMS } = rnv_1.Constants;
|
|
38
|
-
const makeZipOutput = (c) => {
|
|
39
|
-
const platformBuildDir = getPlatformBuildDir(c);
|
|
40
|
-
const copiedProjectBuildDir = `${platformBuildDir}/build`;
|
|
41
|
-
const defaultZipFileName = `${c.platform}_${c.runtime.appId}.zip`;
|
|
42
|
-
const fileName = (0, resolvers_1.resolveBuildFileName)(c) || defaultZipFileName;
|
|
43
|
-
(0, child_process_1.execSync)(`cp -r ${getPlatformProjectDir(c)}/public ${copiedProjectBuildDir}`);
|
|
44
|
-
(0, child_process_1.execSync)(`rm -rf ${platformBuildDir}/output`);
|
|
45
|
-
(0, child_process_1.execSync)(`mkdir ${platformBuildDir}/output`);
|
|
46
|
-
(0, child_process_1.execSync)(`zip -r ../output/${fileName} *`, { cwd: copiedProjectBuildDir });
|
|
47
|
-
(0, child_process_1.execSync)(`rm -rf ${copiedProjectBuildDir}`);
|
|
48
|
-
};
|
|
49
|
-
const renameOutput = (c) => {
|
|
50
|
-
const packageOutputDirPath = `${c.runtime.appDir}/output`;
|
|
51
|
-
if (!fs.existsSync(packageOutputDirPath))
|
|
52
|
-
return;
|
|
53
|
-
const outputFilenameList = fs.readdirSync(packageOutputDirPath);
|
|
54
|
-
const packageFileName = outputFilenameList[0];
|
|
55
|
-
const newFilename = (0, resolvers_1.resolveBuildFileName)(c);
|
|
56
|
-
if (newFilename) {
|
|
57
|
-
const oldPath = `${packageOutputDirPath}/${packageFileName}`;
|
|
58
|
-
const newPath = `${packageOutputDirPath}/${newFilename}`;
|
|
59
|
-
fs.renameSync(oldPath, newPath);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const buildFn = async (c, parentTask, originTask) => {
|
|
63
|
-
logTask('taskRnvBuild', `parent:${parentTask}`);
|
|
64
|
-
const { platform } = c;
|
|
65
|
-
c.runtime.forceBundleAssets = true;
|
|
66
|
-
await (0, sdks_1.handlePlatformSdk)(c);
|
|
67
|
-
await executeOrSkipTask(c, TASK_PACKAGE, TASK_BUILD, originTask);
|
|
68
|
-
switch (platform) {
|
|
69
|
-
case constants_1.Platforms.ENTONE:
|
|
70
|
-
case constants_1.Platforms.HBBTV:
|
|
71
|
-
case constants_1.Platforms.KREATV:
|
|
72
|
-
case constants_1.Platforms.SAPHI:
|
|
73
|
-
case constants_1.Platforms.WEBTV:
|
|
74
|
-
await buildWeb(c);
|
|
75
|
-
makeZipOutput(c);
|
|
76
|
-
return;
|
|
77
|
-
case constants_1.Platforms.XBOX:
|
|
78
|
-
await buildXboxProject(c);
|
|
79
|
-
return;
|
|
80
|
-
case constants_1.Platforms.TIZEN:
|
|
81
|
-
await buildTizenProject(c);
|
|
82
|
-
renameOutput(c);
|
|
83
|
-
return;
|
|
84
|
-
case constants_1.Platforms.WEBOS:
|
|
85
|
-
await buildWebOSProject(c);
|
|
86
|
-
renameOutput(c);
|
|
87
|
-
return;
|
|
88
|
-
default:
|
|
89
|
-
logErrorPlatform(c);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const customRnvBuildTask = {
|
|
93
|
-
description: 'Build project binary',
|
|
94
|
-
fn: buildFn,
|
|
95
|
-
task: 'build',
|
|
96
|
-
params: PARAMS.withBase(PARAMS.withConfigure()),
|
|
97
|
-
platforms: Object.values(constants_1.Platforms),
|
|
98
|
-
};
|
|
99
|
-
exports.customRnvBuildTask = customRnvBuildTask;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customRnvConfigureTask = void 0;
|
|
4
|
-
const rnv_1 = require("rnv");
|
|
5
|
-
const generateIcons_1 = require("../scripts/utils/generateIcons");
|
|
6
|
-
const constants_1 = require("../constants");
|
|
7
|
-
const sdks_1 = require("../sdks");
|
|
8
|
-
const { logErrorPlatform, copySharedPlatforms } = rnv_1.PlatformManager;
|
|
9
|
-
const { logTask } = rnv_1.Logger;
|
|
10
|
-
const { TASK_PLATFORM_CONFIGURE, TASK_CONFIGURE, PARAMS } = rnv_1.Constants;
|
|
11
|
-
const { configureWebProject } = sdks_1.SDKWebpack;
|
|
12
|
-
const { configureTizenProject } = sdks_1.SDKTizen;
|
|
13
|
-
const { configureWebOSProject } = sdks_1.SDKWebos;
|
|
14
|
-
const { executeTask } = rnv_1.TaskManager;
|
|
15
|
-
const configureFn = async (c, parentTask, originTask) => {
|
|
16
|
-
logTask('taskRnvConfigure');
|
|
17
|
-
await executeTask(c, TASK_PLATFORM_CONFIGURE, TASK_CONFIGURE, originTask);
|
|
18
|
-
await copySharedPlatforms(c);
|
|
19
|
-
await (0, generateIcons_1.generateIcons)(c);
|
|
20
|
-
if (c.program.only && !!parentTask)
|
|
21
|
-
return true;
|
|
22
|
-
switch (c.platform) {
|
|
23
|
-
case constants_1.Platforms.ENTONE:
|
|
24
|
-
case constants_1.Platforms.HBBTV:
|
|
25
|
-
case constants_1.Platforms.KREATV:
|
|
26
|
-
case constants_1.Platforms.SAPHI:
|
|
27
|
-
case constants_1.Platforms.WEBTV:
|
|
28
|
-
case constants_1.Platforms.XBOX:
|
|
29
|
-
return configureWebProject(c);
|
|
30
|
-
case constants_1.Platforms.TIZEN:
|
|
31
|
-
return configureTizenProject(c);
|
|
32
|
-
case constants_1.Platforms.WEBOS:
|
|
33
|
-
return configureWebOSProject(c);
|
|
34
|
-
default:
|
|
35
|
-
return logErrorPlatform(c);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const customRnvConfigureTask = {
|
|
39
|
-
description: 'Configure current project',
|
|
40
|
-
fn: configureFn,
|
|
41
|
-
task: 'configure',
|
|
42
|
-
params: PARAMS.withBase(PARAMS.withConfigure()),
|
|
43
|
-
platforms: Object.values(constants_1.Platforms),
|
|
44
|
-
};
|
|
45
|
-
exports.customRnvConfigureTask = customRnvConfigureTask;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customRnvConfigureSoftTask = void 0;
|
|
4
|
-
const rnv_1 = require("rnv");
|
|
5
|
-
const schemeParser_1 = require("rnv/dist/core/configManager/schemeParser");
|
|
6
|
-
const replaceRelevantStringsInConfig_1 = require("../utils/replaceRelevantStringsInConfig");
|
|
7
|
-
const { logTask } = rnv_1.Logger;
|
|
8
|
-
const { isPlatformSupported } = rnv_1.PlatformManager;
|
|
9
|
-
const { configureRuntimeDefaults } = rnv_1.RuntimeManager;
|
|
10
|
-
const { executeTask } = rnv_1.TaskManager;
|
|
11
|
-
const { TASK_APP_CONFIGURE, TASK_CONFIGURE_SOFT, PARAMS } = rnv_1.Constants;
|
|
12
|
-
const { checkSdk } = rnv_1.SDKManager.Installer;
|
|
13
|
-
const configureSoftFn = async (c, parentTask, originTask) => {
|
|
14
|
-
logTask('taskRnvConfigureSoft');
|
|
15
|
-
await configureRuntimeDefaults(c);
|
|
16
|
-
await executeTask(c, TASK_APP_CONFIGURE, parentTask, originTask);
|
|
17
|
-
await isPlatformSupported(c);
|
|
18
|
-
await (0, schemeParser_1.isBuildSchemeSupported)(c);
|
|
19
|
-
await checkSdk(c);
|
|
20
|
-
await configureRuntimeDefaults(c);
|
|
21
|
-
(0, replaceRelevantStringsInConfig_1.replaceRelevantStringsInConfig)(c);
|
|
22
|
-
return true;
|
|
23
|
-
};
|
|
24
|
-
const customRnvConfigureSoftTask = {
|
|
25
|
-
description: 'Configure system and project without recreating files (used for --only)',
|
|
26
|
-
fn: configureSoftFn,
|
|
27
|
-
task: TASK_CONFIGURE_SOFT,
|
|
28
|
-
params: PARAMS.withBase(),
|
|
29
|
-
platforms: [],
|
|
30
|
-
};
|
|
31
|
-
exports.customRnvConfigureSoftTask = customRnvConfigureSoftTask;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customRnvDeployTask = void 0;
|
|
4
|
-
const rnv_1 = require("rnv");
|
|
5
|
-
const constants_1 = require("../constants");
|
|
6
|
-
const deployS3_1 = require("./deploy/aswS3/deployS3");
|
|
7
|
-
const deployHbbtv_1 = require("./deploy/hbbtv/deployHbbtv");
|
|
8
|
-
const { logErrorPlatform } = rnv_1.PlatformManager;
|
|
9
|
-
const { logTask } = rnv_1.Logger;
|
|
10
|
-
const { TASK_EXPORT, TASK_DEPLOY, PARAMS } = rnv_1.Constants;
|
|
11
|
-
const { executeOrSkipTask } = rnv_1.TaskManager;
|
|
12
|
-
const deployFn = async (c, parentTask, originTask) => {
|
|
13
|
-
logTask('taskRnvDeploy', `parent:${parentTask}`);
|
|
14
|
-
await executeOrSkipTask(c, TASK_EXPORT, TASK_DEPLOY, originTask);
|
|
15
|
-
switch (c.platform) {
|
|
16
|
-
case constants_1.Platforms.HBBTV:
|
|
17
|
-
await (0, deployHbbtv_1.deployHbbTV)(c);
|
|
18
|
-
await (0, deployS3_1.deployToS3)(c);
|
|
19
|
-
return true;
|
|
20
|
-
case constants_1.Platforms.ENTONE:
|
|
21
|
-
case constants_1.Platforms.KREATV:
|
|
22
|
-
case constants_1.Platforms.SAPHI:
|
|
23
|
-
case constants_1.Platforms.TIZEN:
|
|
24
|
-
case constants_1.Platforms.WEBOS:
|
|
25
|
-
case constants_1.Platforms.WEBTV:
|
|
26
|
-
case constants_1.Platforms.XBOX:
|
|
27
|
-
return (0, deployS3_1.deployToS3)(c);
|
|
28
|
-
default:
|
|
29
|
-
logErrorPlatform(c);
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const customRnvDeployTask = {
|
|
34
|
-
description: 'Deploy the binary via selected deployment integration or build hook',
|
|
35
|
-
fn: deployFn,
|
|
36
|
-
task: 'deploy',
|
|
37
|
-
params: PARAMS.withBase(PARAMS.withConfigure()),
|
|
38
|
-
platforms: Object.values(constants_1.Platforms),
|
|
39
|
-
};
|
|
40
|
-
exports.customRnvDeployTask = customRnvDeployTask;
|