@24i/smartapps-bigscreen-rnv-build-engine 0.11.3-alpha.1629 → 0.11.3-alpha.1658
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/sdks/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.handlePlatformSdk = exports.SDKWebpack = exports.SDKTizen = exports.SDKWebos = void 0;
|
|
22
|
+
exports.handlePlatformSdk = exports.SDKXbox = exports.SDKWebpack = exports.SDKTizen = exports.SDKWebos = void 0;
|
|
23
23
|
const constants_1 = require("../constants");
|
|
24
24
|
const SDKWebos = __importStar(require("./sdk-webos"));
|
|
25
25
|
exports.SDKWebos = SDKWebos;
|
|
@@ -27,6 +27,8 @@ const SDKTizen = __importStar(require("./sdk-tizen"));
|
|
|
27
27
|
exports.SDKTizen = SDKTizen;
|
|
28
28
|
const SDKWebpack = __importStar(require("./sdk-webpack"));
|
|
29
29
|
exports.SDKWebpack = SDKWebpack;
|
|
30
|
+
const SDKXbox = __importStar(require("./sdk-xbox"));
|
|
31
|
+
exports.SDKXbox = SDKXbox;
|
|
30
32
|
const handlePlatformSdk = async (c) => {
|
|
31
33
|
switch (c.platform) {
|
|
32
34
|
case constants_1.Platforms.TIZEN:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildXboxProject = void 0;
|
|
3
4
|
const rnv_1 = require("rnv");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const fs_1 = require("fs");
|
|
@@ -7,8 +8,8 @@ const resolvers_1 = require("../../resolvers");
|
|
|
7
8
|
const fs = fs_1.promises;
|
|
8
9
|
const { logTask } = rnv_1.Logger;
|
|
9
10
|
const { buildCoreWebpackProject } = rnv_1.WebpackUtils;
|
|
10
|
-
const projectBuilder = require('
|
|
11
|
-
const { manifestTools } = require('
|
|
11
|
+
const projectBuilder = require('manifoldjs-windows10/index');
|
|
12
|
+
const { manifestTools } = require('manifoldjs/index');
|
|
12
13
|
const hostedAppOutputPath = '/output/hosted';
|
|
13
14
|
const packagedAppOutputPath = '/output/packaged';
|
|
14
15
|
const packagedAppSrcDestination = '/output/packaged/windows10/source/src';
|
|
@@ -22,14 +23,10 @@ const packagedManifestImages = '/output/packaged/windows10/manifest/images';
|
|
|
22
23
|
const identityNamePlaceholder = 'INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE';
|
|
23
24
|
const identityPublisherPlaceholder = 'INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE';
|
|
24
25
|
const publisherDisplayNamePlaceholder = 'INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE';
|
|
25
|
-
|
|
26
|
-
content:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
theme_color: 'white',
|
|
30
|
-
},
|
|
31
|
-
format: 'w3c',
|
|
32
|
-
};
|
|
26
|
+
class Manifest {
|
|
27
|
+
content = { start_url: '', short_name: '', theme_color: 'white' };
|
|
28
|
+
format = 'w3c';
|
|
29
|
+
}
|
|
33
30
|
const buildXboxProject = async (c) => {
|
|
34
31
|
logTask('buildXboxProject');
|
|
35
32
|
await buildCoreWebpackProject(c);
|
|
@@ -50,7 +47,7 @@ const getHostedAppEntryUrl = (c) => {
|
|
|
50
47
|
if (keys !== null && keys.length > 0) {
|
|
51
48
|
const version = keys[0];
|
|
52
49
|
if (version !== null) {
|
|
53
|
-
url = deployLocations.versions[version].platforms.xbox?.animated_720
|
|
50
|
+
url = deployLocations.versions[version].platforms.xbox?.animated_720?.indexUrl;
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
53
|
return url;
|
|
@@ -68,7 +65,7 @@ async function zipOutput(c) {
|
|
|
68
65
|
(0, child_process_1.execSync)(`zip -r ${outputDirectory}/${fileName} *`, { cwd: `${tmpOutputDirectory}` });
|
|
69
66
|
(0, child_process_1.execSync)(`rm -rf ${tmpOutputDirectory}`);
|
|
70
67
|
}
|
|
71
|
-
const createVSSolution = async (c, outputPath) => {
|
|
68
|
+
const createVSSolution = async (c, outputPath, manifest) => {
|
|
72
69
|
logTask('createVSSolution');
|
|
73
70
|
try {
|
|
74
71
|
manifest.content.short_name = c.buildConfig.common.appName;
|
|
@@ -83,15 +80,17 @@ async function loadManifestFromFile(path) {
|
|
|
83
80
|
}
|
|
84
81
|
async function createHostedApplication(c) {
|
|
85
82
|
logTask('createHostedApplication');
|
|
83
|
+
const manifest = new Manifest();
|
|
86
84
|
manifest.content.start_url = getHostedAppEntryUrl(c);
|
|
87
|
-
await createVSSolution(c, `${await getBuildFolder(c)}${hostedAppOutputPath}
|
|
85
|
+
await createVSSolution(c, `${await getBuildFolder(c)}${hostedAppOutputPath}`, manifest);
|
|
88
86
|
}
|
|
89
87
|
async function createPackagedApplication(c) {
|
|
90
88
|
logTask('createPackagedApplication');
|
|
89
|
+
const manifest = new Manifest();
|
|
91
90
|
manifest.content.start_url = packagedAppEntryUrl ?? '';
|
|
92
91
|
const sourceDir = `${await getBuildFolder(c)}${appSourcePath}`;
|
|
93
92
|
const destinationDirectory = `${await getBuildFolder(c)}${packagedAppSrcDestination}`;
|
|
94
|
-
await createVSSolution(c, `${await getBuildFolder(c)}${packagedAppOutputPath}
|
|
93
|
+
await createVSSolution(c, `${await getBuildFolder(c)}${packagedAppOutputPath}`, manifest);
|
|
95
94
|
(0, child_process_1.execSync)(`cp -r ${sourceDir} ${destinationDirectory}`);
|
|
96
95
|
}
|
|
97
96
|
function getBuildFolder(c) {
|
|
@@ -124,10 +123,11 @@ async function replacePublisherId(c, basePath) {
|
|
|
124
123
|
}
|
|
125
124
|
});
|
|
126
125
|
}).then(() => {
|
|
127
|
-
return fs.writeFile(output, appxmanifest ?? '')
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
return fs.writeFile(output, appxmanifest ?? '');
|
|
127
|
+
}).catch((err) => {
|
|
128
|
+
const errorMessage = 'Failed to modify the xbox appxmanifest.xml';
|
|
129
|
+
console.log(errorMessage);
|
|
130
|
+
return errorMessage;
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
async function replaceImages(c) {
|
|
@@ -137,11 +137,16 @@ async function replaceImages(c) {
|
|
|
137
137
|
const hostedOutputManifestDirectory = `${await getBuildFolder(c)}${hostedManifestImages}`;
|
|
138
138
|
const packagedOutputManifestDirectory = `${await getBuildFolder(c)}${packagedManifestImages}`;
|
|
139
139
|
const appIconsDirectory = `${await getBuildFolder(c)}/project/appIcons`;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
try {
|
|
141
|
+
(0, child_process_1.execSync)(`rm -rf ${hostedOutputDirectory}`);
|
|
142
|
+
(0, child_process_1.execSync)(`rm -rf ${packagedOutputDirectory}`);
|
|
143
|
+
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${hostedOutputDirectory}`);
|
|
144
|
+
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${packagedOutputDirectory}`);
|
|
145
|
+
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${hostedOutputManifestDirectory}`);
|
|
146
|
+
(0, child_process_1.execSync)(`cp -r ${appIconsDirectory} ${packagedOutputManifestDirectory}`);
|
|
147
|
+
(0, child_process_1.execSync)(`rm -rf ${appIconsDirectory}`);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
console.log('Failed to replace the xbox icons');
|
|
151
|
+
}
|
|
147
152
|
}
|
|
@@ -32,6 +32,7 @@ const { logTask } = rnv_1.Logger;
|
|
|
32
32
|
const { buildWeb } = sdks_1.SDKWebpack;
|
|
33
33
|
const { buildTizenProject } = sdks_1.SDKTizen;
|
|
34
34
|
const { buildWebOSProject } = sdks_1.SDKWebos;
|
|
35
|
+
const { buildXboxProject } = sdks_1.SDKXbox;
|
|
35
36
|
const { executeOrSkipTask } = rnv_1.TaskManager;
|
|
36
37
|
const { TASK_BUILD, TASK_PACKAGE, PARAMS } = rnv_1.Constants;
|
|
37
38
|
const makeZipOutput = (c) => {
|
|
@@ -70,10 +71,12 @@ const buildFn = async (c, parentTask, originTask) => {
|
|
|
70
71
|
case constants_1.Platforms.KREATV:
|
|
71
72
|
case constants_1.Platforms.SAPHI:
|
|
72
73
|
case constants_1.Platforms.WEBTV:
|
|
73
|
-
case constants_1.Platforms.XBOX:
|
|
74
74
|
await buildWeb(c);
|
|
75
75
|
makeZipOutput(c);
|
|
76
76
|
return;
|
|
77
|
+
case constants_1.Platforms.XBOX:
|
|
78
|
+
await buildXboxProject(c);
|
|
79
|
+
return;
|
|
77
80
|
case constants_1.Platforms.TIZEN:
|
|
78
81
|
await buildTizenProject(c);
|
|
79
82
|
renameOutput(c);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/smartapps-bigscreen-rnv-build-engine",
|
|
3
|
-
"version": "0.11.3-alpha.
|
|
3
|
+
"version": "0.11.3-alpha.1658+16067c1d",
|
|
4
4
|
"description": "Package with build engine for SmartApps BIGscreen projects...",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,25 +16,17 @@
|
|
|
16
16
|
"lintcheck:cached": "npm run eslint -- --cache && npm run stylelint -- --cache",
|
|
17
17
|
"typecheck:cached": "tsc --noEmit --incremental",
|
|
18
18
|
"test": "jest --passWithNoTests",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
20
|
-
"postinstall": "node fixDependency.js"
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
21
20
|
},
|
|
22
|
-
"deleteDependencies": [
|
|
23
|
-
{
|
|
24
|
-
"path": "../../unzip2/node_modules/graceful-fs/",
|
|
25
|
-
"version": "^4.2.8"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
21
|
"devDependencies": {
|
|
29
22
|
"@types/inquirer": "8.1.3",
|
|
30
23
|
"@types/mini-css-extract-plugin": "1.2.2",
|
|
31
|
-
"@types/node": "16.11.
|
|
24
|
+
"@types/node": "16.11.11",
|
|
32
25
|
"@types/semver": "7.3.9",
|
|
33
|
-
"@types/ssh2": "0.5.
|
|
26
|
+
"@types/ssh2": "0.5.49",
|
|
34
27
|
"@types/tapable": "1.0.6",
|
|
35
28
|
"@types/webpack": "4.41.26",
|
|
36
|
-
"
|
|
37
|
-
"nock": "13.1.4",
|
|
29
|
+
"nock": "13.2.1",
|
|
38
30
|
"svgo": "1.3.2"
|
|
39
31
|
},
|
|
40
32
|
"peerDependencies": {
|
|
@@ -70,5 +62,5 @@
|
|
|
70
62
|
"keywords": [],
|
|
71
63
|
"author": "24i",
|
|
72
64
|
"license": "ISC",
|
|
73
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "16067c1dbd48180b739e1920c1d2c0c9f1fc3a44"
|
|
74
66
|
}
|