@24i/smartapps-bigscreen-rnv-build-engine 0.12.1-alpha.1705 → 0.12.1-alpha.1713

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.
@@ -4,11 +4,11 @@ exports.buildXboxProject = void 0;
4
4
  const rnv_1 = require("rnv");
5
5
  const child_process_1 = require("child_process");
6
6
  const fs_1 = require("fs");
7
+ const manifoldjs_windows10_1 = require("manifoldjs-windows10");
7
8
  const resolvers_1 = require("../../resolvers");
8
9
  const fs = fs_1.promises;
9
10
  const { logTask } = rnv_1.Logger;
10
11
  const { buildCoreWebpackProject } = rnv_1.WebpackUtils;
11
- const projectBuilder = require('manifoldjs-windows10');
12
12
  const hostedAppOutputPath = '/output/hosted';
13
13
  const packagedAppOutputPath = '/output/packaged';
14
14
  const packagedAppSrcDestination = '/output/packaged/windows10/source/src';
@@ -29,11 +29,12 @@ class Manifest {
29
29
  const getHostedAppEntryUrl = (c) => {
30
30
  const deployLocations = (0, resolvers_1.resolveDeployLocations)(c);
31
31
  const keys = Object.keys(deployLocations.versions);
32
- let url;
32
+ let url = '';
33
33
  if (keys !== null && keys.length > 0) {
34
34
  const version = keys[0];
35
35
  if (version !== null) {
36
- url = deployLocations.versions[version].platforms.xbox?.animated_720?.indexUrl;
36
+ const flavour = c.runtime.appId;
37
+ url = deployLocations.versions[version].platforms.xbox?.[flavour].indexUrl ?? '';
37
38
  }
38
39
  }
39
40
  return url;
@@ -62,7 +63,7 @@ const createVSSolution = async (c, outputPath, manifest) => {
62
63
  logTask('createVSSolution');
63
64
  try {
64
65
  manifest.content.short_name = c.buildConfig.common.appName;
65
- const platform = new projectBuilder.Platform('package', ['windows10']);
66
+ const platform = new manifoldjs_windows10_1.Platform('package', ['windows10']);
66
67
  await platform.create(manifest, outputPath, ['windows10'], '');
67
68
  }
68
69
  catch { }
@@ -76,7 +77,7 @@ const createHostedApplication = async (c) => {
76
77
  const createPackagedApplication = async (c) => {
77
78
  logTask('createPackagedApplication');
78
79
  const manifest = new Manifest();
79
- manifest.content.start_url = packagedAppEntryUrl ?? '';
80
+ manifest.content.start_url = packagedAppEntryUrl;
80
81
  const sourceDir = `${getBuildFolder(c)}${appSourcePath}`;
81
82
  const destinationDirectory = `${getBuildFolder(c)}${packagedAppSrcDestination}`;
82
83
  await createVSSolution(c, `${getBuildFolder(c)}${packagedAppOutputPath}`, manifest);
@@ -91,19 +92,21 @@ const replacePublisherId = async (c, basePath) => {
91
92
  let identityPublisher = null;
92
93
  let publisherDisplayName = null;
93
94
  try {
94
- const data = await fs.readFile(configPath);
95
- const config = JSON.parse(data.toString());
96
- ({ identityName } = config);
97
- ({ identityPublisher } = config);
98
- ({ publisherDisplayName } = config);
99
- const appxmanifestData = await fs.readFile(output);
100
- appxmanifest = appxmanifestData.toString();
95
+ const data = await fs.readFile(configPath, 'utf-8');
96
+ const config = JSON.parse(data);
97
+ ({
98
+ identityName = null,
99
+ identityPublisher = null,
100
+ publisherDisplayName = null,
101
+ } = config);
102
+ const appxmanifestData = await fs.readFile(output, 'utf-8');
103
+ appxmanifest = appxmanifestData;
101
104
  if (identityName !== null
102
105
  && identityPublisher !== null
103
106
  && publisherDisplayName !== null) {
104
- appxmanifest = appxmanifest.replace(identityNamePlaceholder, identityName)
105
- .replace(identityPublisherPlaceholder, identityPublisher)
106
- .replace(publisherDisplayNamePlaceholder, publisherDisplayName);
107
+ appxmanifest = appxmanifest.replace(identityNamePlaceholder, identityName.toString())
108
+ .replace(identityPublisherPlaceholder, identityPublisher.toString())
109
+ .replace(publisherDisplayNamePlaceholder, publisherDisplayName.toString());
107
110
  }
108
111
  await fs.writeFile(output, appxmanifest ?? '');
109
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/smartapps-bigscreen-rnv-build-engine",
3
- "version": "0.12.1-alpha.1705+7d9b1cb1",
3
+ "version": "0.12.1-alpha.1713+09370279",
4
4
  "description": "Package with build engine for SmartApps BIGscreen projects...",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -53,7 +53,7 @@
53
53
  "glob": "7.1.7",
54
54
  "html-webpack-harddisk-plugin": "1.0.2",
55
55
  "html-webpack-plugin": "4.5.2",
56
- "manifoldjs": "*",
56
+ "manifoldjs-windows10": "^0.1.8",
57
57
  "mini-css-extract-plugin": "1.6.2",
58
58
  "node-ssh": "11.1.1",
59
59
  "ora": "5.4.1",
@@ -74,5 +74,5 @@
74
74
  "keywords": [],
75
75
  "author": "24i",
76
76
  "license": "ISC",
77
- "gitHead": "7d9b1cb12e396b516d5996beda2ab95fe40626a4"
77
+ "gitHead": "09370279a549bf398ab973ec5005460c552b04a7"
78
78
  }