@24i/smartapps-bigscreen-rnv-build-engine 0.17.6-alpha.6 → 0.17.6-alpha.7
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/resolvers/index.js +2 -2
- package/dist/src/resolvers/resolveBaseUrl.js +5 -5
- package/dist/src/scripts/buildProductionPackagesAll.js +1 -1
- package/dist/src/scripts/release/appCenter/deployProductionPackagesToAppCenter.js +4 -2
- package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +2 -2
- package/dist/src/sdks/sdk-webpack/sdkWebpack.js +2 -2
- package/dist/src/tasks/task.rnv.build.js +6 -6
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProductionZipFileRelativePath = exports.resolveZippedPlatformBuildsRelativeFilePath = exports.resolvePackageVersions = exports.resolveBuildFileExtension = exports.resolveUsedFlavours = exports.resolveSupportedPlatforms = exports.getBaseConfig = exports.resolveBuildFileName = exports.resolveBuildFileBaseName = exports.resolveHbbtvDeployConfig = exports.resolveHbbtvDeployUrl = exports.resolveHbbtvRemoteBuildDirRelativePath = exports.resolveDeployLocations = exports.resolveBuildVersionOffset = exports.resolveBuildVersion = exports.resolveBuildEnvName = exports.
|
|
3
|
+
exports.getProductionZipFileRelativePath = exports.resolveZippedPlatformBuildsRelativeFilePath = exports.resolvePackageVersions = exports.resolveBuildFileExtension = exports.resolveUsedFlavours = exports.resolveSupportedPlatforms = exports.getBaseConfig = exports.resolveBuildFileName = exports.resolveBuildFileBaseName = exports.resolveHbbtvDeployConfig = exports.resolveHbbtvDeployUrl = exports.resolveHbbtvRemoteBuildDirRelativePath = exports.resolveDeployLocations = exports.resolveBuildVersionOffset = exports.resolveBuildVersion = exports.resolveBuildEnvName = exports.resolveProductionPackagesBaseUrl = exports.resolveBaseUrl = void 0;
|
|
4
4
|
var resolveBaseUrl_1 = require("./resolveBaseUrl");
|
|
5
5
|
Object.defineProperty(exports, "resolveBaseUrl", { enumerable: true, get: function () { return resolveBaseUrl_1.resolveBaseUrl; } });
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "resolveProductionPackagesBaseUrl", { enumerable: true, get: function () { return resolveBaseUrl_1.resolveProductionPackagesBaseUrl; } });
|
|
7
7
|
var resolveBuildEnvName_1 = require("./resolveBuildEnvName");
|
|
8
8
|
Object.defineProperty(exports, "resolveBuildEnvName", { enumerable: true, get: function () { return resolveBuildEnvName_1.resolveBuildEnvName; } });
|
|
9
9
|
var resolveBuildVersion_1 = require("./resolveBuildVersion");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolveProductionPackagesBaseUrl = exports.resolveBaseUrl = void 0;
|
|
4
4
|
const resolveGenericRnvConfig_1 = require("./resolveGenericRnvConfig");
|
|
5
5
|
const resolveBuildEnvName_1 = require("./resolveBuildEnvName");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
@@ -34,13 +34,13 @@ const resolveBaseUrl = ({ platform, scheme, flavour }) => {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
exports.resolveBaseUrl = resolveBaseUrl;
|
|
37
|
-
const
|
|
38
|
-
const { hostedUrl } = c.buildConfig.common;
|
|
37
|
+
const resolveProductionPackagesBaseUrl = (c) => {
|
|
38
|
+
const { hostedUrl } = c.buildConfig.common.deploy.productionPackages || {};
|
|
39
39
|
const baseUrl = hostedUrl?.baseUrl;
|
|
40
40
|
const subpath = hostedUrl?.subpath ?? '';
|
|
41
41
|
if (!baseUrl) {
|
|
42
|
-
throw new Error('The
|
|
42
|
+
throw new Error('The resolveProductionPackagesBaseUrl failed because baseUrl is missing.');
|
|
43
43
|
}
|
|
44
44
|
return `${baseUrl}${subpath}`;
|
|
45
45
|
};
|
|
46
|
-
exports.
|
|
46
|
+
exports.resolveProductionPackagesBaseUrl = resolveProductionPackagesBaseUrl;
|
|
@@ -42,7 +42,7 @@ const buildProductionTask = (options, c) => {
|
|
|
42
42
|
const buildDirPath = path.join(platformBuildsDir, buildDirName);
|
|
43
43
|
const buildOutputDirPath = path.join(buildDirPath, 'output');
|
|
44
44
|
fs.rmSync(buildDirPath, { recursive: true, force: true });
|
|
45
|
-
const cmd = `npx rnv build -s ${scheme} -p ${platform} -c ${flavour} --ci --
|
|
45
|
+
const cmd = `npx rnv build -s ${scheme} -p ${platform} -c ${flavour} --ci --productionPackagesHostedUrl`;
|
|
46
46
|
(0, child_process_1.execSync)(cmd, { stdio: 'inherit' });
|
|
47
47
|
const zippedDir = path.join(getZippedDirRelativePath(c), platform);
|
|
48
48
|
fse.copySync(buildOutputDirPath, zippedDir);
|
|
@@ -49,11 +49,13 @@ const getPlatformPackagesList = (c) => {
|
|
|
49
49
|
const platformObj = {
|
|
50
50
|
platformName: platform,
|
|
51
51
|
packages: supportedFlavours.map((appConfigID) => {
|
|
52
|
-
const c = (0, index_2.getBaseConfig)({
|
|
52
|
+
const c = (0, index_2.getBaseConfig)({
|
|
53
|
+
platform, scheme, appConfigID, productionPackagesHostedUrl: true
|
|
54
|
+
});
|
|
53
55
|
return {
|
|
54
56
|
name: (0, index_2.resolveBuildFileName)(c),
|
|
55
57
|
flavour: appConfigID,
|
|
56
|
-
hostedUrl: `${(0, index_2.
|
|
58
|
+
hostedUrl: `${(0, index_2.resolveProductionPackagesBaseUrl)(c)}/public`,
|
|
57
59
|
};
|
|
58
60
|
})
|
|
59
61
|
};
|
|
@@ -166,8 +166,8 @@ const configureProject = (c) => {
|
|
|
166
166
|
const getHostedAppEntryUrl = (c) => {
|
|
167
167
|
const { platform, runtime } = c;
|
|
168
168
|
let baseUrl = '';
|
|
169
|
-
if (c.program.
|
|
170
|
-
baseUrl = (0, resolvers_1.
|
|
169
|
+
if (c.program.productionPackagesHostedUrl) {
|
|
170
|
+
baseUrl = (0, resolvers_1.resolveProductionPackagesBaseUrl)(c);
|
|
171
171
|
}
|
|
172
172
|
else {
|
|
173
173
|
baseUrl = (0, resolvers_1.resolveBaseUrl)({
|
|
@@ -53,8 +53,8 @@ const buildCoreWebpackProject = async (c) => {
|
|
|
53
53
|
rnv_1.Logger.logWarning('Webpack not found. Will try to use globally installed one');
|
|
54
54
|
}
|
|
55
55
|
let hostedUrlVariable = '';
|
|
56
|
-
if (c.program.
|
|
57
|
-
hostedUrlVariable = `HOSTED_URL=${(0, resolvers_1.
|
|
56
|
+
if (c.program.productionPackagesHostedUrl) {
|
|
57
|
+
hostedUrlVariable = `HOSTED_URL=${(0, resolvers_1.resolveProductionPackagesBaseUrl)(c)}`;
|
|
58
58
|
}
|
|
59
59
|
const envVars = [
|
|
60
60
|
`PLATFORM=${platform}`, `NODE_ENV=${environment}`, debugVariables, hostedUrlVariable,
|
|
@@ -32,9 +32,9 @@ const sdks_1 = require("../sdks");
|
|
|
32
32
|
const resolvers_1 = require("../resolvers");
|
|
33
33
|
const { TASK_BUILD, TASK_PACKAGE, PARAMS } = rnv_1.Constants;
|
|
34
34
|
const PARAM_KEYS = {
|
|
35
|
-
|
|
36
|
-
key: '
|
|
37
|
-
description: 'Uses hosted URL of App',
|
|
35
|
+
productionPackagesHostedUrl: {
|
|
36
|
+
key: 'productionPackagesHostedUrl',
|
|
37
|
+
description: 'Uses production package hosted URL of App',
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
const makeZipOutput = (c) => {
|
|
@@ -65,8 +65,8 @@ const buildFn = async (c, parentTask, originTask) => {
|
|
|
65
65
|
rnv_1.Logger.logTask('taskRnvBuild', `parent:${parentTask}`);
|
|
66
66
|
const { platform } = c;
|
|
67
67
|
c.runtime.forceBundleAssets = true;
|
|
68
|
-
if (c.program.rawArgs
|
|
69
|
-
c.program[PARAM_KEYS.
|
|
68
|
+
if (c.program.rawArgs?.includes(`--${PARAM_KEYS.productionPackagesHostedUrl.key}`)) {
|
|
69
|
+
c.program[PARAM_KEYS.productionPackagesHostedUrl.key] = true;
|
|
70
70
|
}
|
|
71
71
|
await (0, sdks_1.handlePlatformSdk)(c);
|
|
72
72
|
await rnv_1.TaskManager.executeOrSkipTask(c, TASK_PACKAGE, TASK_BUILD, originTask);
|
|
@@ -102,7 +102,7 @@ const customRnvBuildTask = {
|
|
|
102
102
|
description: 'Build project binary',
|
|
103
103
|
fn: buildFn,
|
|
104
104
|
task: 'build',
|
|
105
|
-
params: PARAMS.withBase(PARAMS.withConfigure([PARAM_KEYS.
|
|
105
|
+
params: PARAMS.withBase(PARAMS.withConfigure([PARAM_KEYS.productionPackagesHostedUrl])),
|
|
106
106
|
platforms: Object.values(constants_1.Platforms),
|
|
107
107
|
};
|
|
108
108
|
exports.customRnvBuildTask = customRnvBuildTask;
|
package/package.json
CHANGED