@24i/smartapps-bigscreen-rnv-build-engine 0.11.3-alpha.1630 → 0.11.3-alpha.1659

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.
@@ -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
- const manifest = {
27
- content: {
28
- start_url: '',
29
- short_name: '',
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.indexUrl;
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 ?? '').catch((err) => {
129
- const errorMessage = 'Failed to copy the manifest to the platform folder.';
130
- return errorMessage;
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
- (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}`);
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.1630+893bea04",
3
+ "version": "0.11.3-alpha.1659+874bde2a",
4
4
  "description": "Package with build engine for SmartApps BIGscreen projects...",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -28,14 +28,17 @@
28
28
  "devDependencies": {
29
29
  "@types/inquirer": "8.1.3",
30
30
  "@types/mini-css-extract-plugin": "1.2.2",
31
- "@types/node": "16.11.6",
31
+ "@types/node": "16.11.11",
32
32
  "@types/semver": "7.3.9",
33
- "@types/ssh2": "0.5.48",
33
+ "@types/ssh2": "0.5.49",
34
34
  "@types/tapable": "1.0.6",
35
35
  "@types/webpack": "4.41.26",
36
- "nock": "13.1.4",
36
+ "nock": "13.2.1",
37
37
  "svgo": "1.3.2"
38
38
  },
39
+ "dependencies": {
40
+ "manifold-js": "*"
41
+ },
39
42
  "peerDependencies": {
40
43
  "@24i/smartapps-bigscreen-device": "*",
41
44
  "assign-deep": "^1.0.1",
@@ -49,7 +52,6 @@
49
52
  "glob": "7.1.7",
50
53
  "html-webpack-harddisk-plugin": "1.0.2",
51
54
  "html-webpack-plugin": "4.5.2",
52
- "manifoldjs": "*",
53
55
  "mini-css-extract-plugin": "1.6.2",
54
56
  "node-ssh": "11.1.1",
55
57
  "ora": "5.4.1",
@@ -70,5 +72,5 @@
70
72
  "keywords": [],
71
73
  "author": "24i",
72
74
  "license": "ISC",
73
- "gitHead": "893bea0489ff04dc510ceaa7706030166156fef8"
75
+ "gitHead": "874bde2a3b77bdae351793099c83d4ee51de0ff7"
74
76
  }