@24i/smartapps-bigscreen-rnv-build-engine 0.11.3-alpha.1630 → 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/sdk-xbox/sdkXbox.js +27 -23
- package/package.json +6 -14
|
@@ -23,14 +23,10 @@ const packagedManifestImages = '/output/packaged/windows10/manifest/images';
|
|
|
23
23
|
const identityNamePlaceholder = 'INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE';
|
|
24
24
|
const identityPublisherPlaceholder = 'INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE';
|
|
25
25
|
const publisherDisplayNamePlaceholder = 'INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE';
|
|
26
|
-
|
|
27
|
-
content:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
theme_color: 'white',
|
|
31
|
-
},
|
|
32
|
-
format: 'w3c',
|
|
33
|
-
};
|
|
26
|
+
class Manifest {
|
|
27
|
+
content = { start_url: '', short_name: '', theme_color: 'white' };
|
|
28
|
+
format = 'w3c';
|
|
29
|
+
}
|
|
34
30
|
const buildXboxProject = async (c) => {
|
|
35
31
|
logTask('buildXboxProject');
|
|
36
32
|
await buildCoreWebpackProject(c);
|
|
@@ -51,7 +47,7 @@ const getHostedAppEntryUrl = (c) => {
|
|
|
51
47
|
if (keys !== null && keys.length > 0) {
|
|
52
48
|
const version = keys[0];
|
|
53
49
|
if (version !== null) {
|
|
54
|
-
url = deployLocations.versions[version].platforms.xbox?.animated_720
|
|
50
|
+
url = deployLocations.versions[version].platforms.xbox?.animated_720?.indexUrl;
|
|
55
51
|
}
|
|
56
52
|
}
|
|
57
53
|
return url;
|
|
@@ -69,7 +65,7 @@ async function zipOutput(c) {
|
|
|
69
65
|
(0, child_process_1.execSync)(`zip -r ${outputDirectory}/${fileName} *`, { cwd: `${tmpOutputDirectory}` });
|
|
70
66
|
(0, child_process_1.execSync)(`rm -rf ${tmpOutputDirectory}`);
|
|
71
67
|
}
|
|
72
|
-
const createVSSolution = async (c, outputPath) => {
|
|
68
|
+
const createVSSolution = async (c, outputPath, manifest) => {
|
|
73
69
|
logTask('createVSSolution');
|
|
74
70
|
try {
|
|
75
71
|
manifest.content.short_name = c.buildConfig.common.appName;
|
|
@@ -84,15 +80,17 @@ async function loadManifestFromFile(path) {
|
|
|
84
80
|
}
|
|
85
81
|
async function createHostedApplication(c) {
|
|
86
82
|
logTask('createHostedApplication');
|
|
83
|
+
const manifest = new Manifest();
|
|
87
84
|
manifest.content.start_url = getHostedAppEntryUrl(c);
|
|
88
|
-
await createVSSolution(c, `${await getBuildFolder(c)}${hostedAppOutputPath}
|
|
85
|
+
await createVSSolution(c, `${await getBuildFolder(c)}${hostedAppOutputPath}`, manifest);
|
|
89
86
|
}
|
|
90
87
|
async function createPackagedApplication(c) {
|
|
91
88
|
logTask('createPackagedApplication');
|
|
89
|
+
const manifest = new Manifest();
|
|
92
90
|
manifest.content.start_url = packagedAppEntryUrl ?? '';
|
|
93
91
|
const sourceDir = `${await getBuildFolder(c)}${appSourcePath}`;
|
|
94
92
|
const destinationDirectory = `${await getBuildFolder(c)}${packagedAppSrcDestination}`;
|
|
95
|
-
await createVSSolution(c, `${await getBuildFolder(c)}${packagedAppOutputPath}
|
|
93
|
+
await createVSSolution(c, `${await getBuildFolder(c)}${packagedAppOutputPath}`, manifest);
|
|
96
94
|
(0, child_process_1.execSync)(`cp -r ${sourceDir} ${destinationDirectory}`);
|
|
97
95
|
}
|
|
98
96
|
function getBuildFolder(c) {
|
|
@@ -125,10 +123,11 @@ async function replacePublisherId(c, basePath) {
|
|
|
125
123
|
}
|
|
126
124
|
});
|
|
127
125
|
}).then(() => {
|
|
128
|
-
return fs.writeFile(output, appxmanifest ?? '')
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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;
|
|
132
131
|
});
|
|
133
132
|
}
|
|
134
133
|
async function replaceImages(c) {
|
|
@@ -138,11 +137,16 @@ async function replaceImages(c) {
|
|
|
138
137
|
const hostedOutputManifestDirectory = `${await getBuildFolder(c)}${hostedManifestImages}`;
|
|
139
138
|
const packagedOutputManifestDirectory = `${await getBuildFolder(c)}${packagedManifestImages}`;
|
|
140
139
|
const appIconsDirectory = `${await getBuildFolder(c)}/project/appIcons`;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
+
}
|
|
148
152
|
}
|
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,24 +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
|
-
"nock": "13.1
|
|
29
|
+
"nock": "13.2.1",
|
|
37
30
|
"svgo": "1.3.2"
|
|
38
31
|
},
|
|
39
32
|
"peerDependencies": {
|
|
@@ -49,7 +42,6 @@
|
|
|
49
42
|
"glob": "7.1.7",
|
|
50
43
|
"html-webpack-harddisk-plugin": "1.0.2",
|
|
51
44
|
"html-webpack-plugin": "4.5.2",
|
|
52
|
-
"manifoldjs": "*",
|
|
53
45
|
"mini-css-extract-plugin": "1.6.2",
|
|
54
46
|
"node-ssh": "11.1.1",
|
|
55
47
|
"ora": "5.4.1",
|
|
@@ -70,5 +62,5 @@
|
|
|
70
62
|
"keywords": [],
|
|
71
63
|
"author": "24i",
|
|
72
64
|
"license": "ISC",
|
|
73
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "16067c1dbd48180b739e1920c1d2c0c9f1fc3a44"
|
|
74
66
|
}
|