@24i/smartapps-bigscreen-rnv-build-engine 0.17.6-alpha.11 → 0.17.6-alpha.12-analyzer-test
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/README.md +14 -12
- package/dist/src/constants/platforms.js +1 -0
- package/dist/src/engine.js +5 -0
- package/dist/src/resolvers/index.js +3 -1
- package/dist/src/resolvers/resolveBaseUrl.js +4 -25
- package/dist/src/resolvers/resolveProductionZipFileRelativePath.js +1 -2
- package/dist/src/resolvers/resolveS3BucketAppPath.js +15 -0
- package/dist/src/resolvers/shared/constructFullUrl.js +25 -0
- package/dist/src/scripts/release/appCenter/deployProductionPackagesToAppCenter.js +20 -10
- package/dist/src/scripts/release/urlsMarkdown.js +1 -0
- package/dist/src/tasks/deploy/aswS3/deployS3.js +3 -10
- package/dist/src/tasks/deploy/aswS3/distToLiveS3.js +4 -5
- package/dist/src/tasks/task.rnv.build.js +1 -0
- package/dist/src/tasks/task.rnv.configure.js +1 -0
- package/dist/src/tasks/task.rnv.deploy.js +1 -0
- package/dist/src/tasks/task.rnv.start.js +1 -0
- package/dist/src/utils/zipStagingProdBuildsByPlatforms.js +3 -3
- package/dist/templates/platforms/_shared/webpackConfigAdapter.js +2 -0
- package/package.json +3 -2
- package/renative.engine.json +1 -0
package/README.md
CHANGED
|
@@ -38,18 +38,19 @@ it
|
|
|
38
38
|
---
|
|
39
39
|
## Supported platforms
|
|
40
40
|
|
|
41
|
-
| *Platform* | *Vendor* | *id* | *Build file extension* | *Registered file extensions*
|
|
42
|
-
| :------------ | :------: | :---------: | :--------------------: | :---------------------------------:
|
|
43
|
-
| **AndroidTV** | N/A | `androidtv` | `.zip` | `*.android.tv.{js,jsx,ts,tsx,json}`
|
|
44
|
-
| **Entone** | Amino | `entone` | `.zip` | `*.entone.{js,jsx,ts,tsx,json}`
|
|
45
|
-
| **HbbTV** | N/A | `hbbtv` | `.zip` | `*.hbbtv.tv.{js,jsx,ts,tsx,json}`
|
|
46
|
-
| **KreaTV** | Arris | `kreatv` | `.zip` | `*.kreatv.{js,jsx,ts,tsx,json}`
|
|
47
|
-
| **Saphi** | Philips | `saphi` | `.zip` | `*.saphi.tv.{js,jsx,ts,tsx,json}`
|
|
48
|
-
| **Tizen** | Samsung | `tizen` | `.wgt` | `*.tizen.tv.{js,jsx,ts,tsx,json}`
|
|
49
|
-
| **VIDAA** | Hisense | `vidaa` | `.zip` | `*.vidaa.tv.{js,jsx,ts,tsx,json}`
|
|
50
|
-
| **
|
|
51
|
-
| **
|
|
52
|
-
| **
|
|
41
|
+
| *Platform* | *Vendor* | *id* | *Build file extension* | *Registered file extensions* | *Note* |
|
|
42
|
+
| :------------ | :------: | :---------: | :--------------------: | :---------------------------------: | :------------------------------: |
|
|
43
|
+
| **AndroidTV** | N/A | `androidtv` | `.zip` | `*.android.tv.{js,jsx,ts,tsx,json}` | |
|
|
44
|
+
| **Entone** | Amino | `entone` | `.zip` | `*.entone.{js,jsx,ts,tsx,json}` | set-top boxes |
|
|
45
|
+
| **HbbTV** | N/A | `hbbtv` | `.zip` | `*.hbbtv.tv.{js,jsx,ts,tsx,json}` | |
|
|
46
|
+
| **KreaTV** | Arris | `kreatv` | `.zip` | `*.kreatv.{js,jsx,ts,tsx,json}` | set-top boxes |
|
|
47
|
+
| **Saphi** | Philips | `saphi` | `.zip` | `*.saphi.tv.{js,jsx,ts,tsx,json}` | |
|
|
48
|
+
| **Tizen** | Samsung | `tizen` | `.wgt` | `*.tizen.tv.{js,jsx,ts,tsx,json}` | |
|
|
49
|
+
| **VIDAA** | Hisense | `vidaa` | `.zip` | `*.vidaa.tv.{js,jsx,ts,tsx,json}` | |
|
|
50
|
+
| **SmartCast** | VIZIO | `smartcast` | `.zip` | `*.smartcast.tv.{js,jsx,ts,tsx,json}`| |
|
|
51
|
+
| **webOS** | LG | `webos` | `.ipk` | `*.webos.tv.{js,jsx,ts,tsx,json}` | |
|
|
52
|
+
| **WebTV** | N/A | `webtv` | `.zip` | `*.webtv.{js,jsx,ts,tsx,json}` | for previewing builds in browser |
|
|
53
|
+
| **Xbox** | Microsoft | `xbox` | `.zip` | `*.xbox.{js,jsx,ts,tsx,json}` | |
|
|
53
54
|
|
|
54
55
|
When building the application with ReNative, if file with ***registered platform extension*** is found,
|
|
55
56
|
it takes precedence and is bundled instead of file without registered file extension (such as `index.ts`).
|
|
@@ -65,6 +66,7 @@ drivers/
|
|
|
65
66
|
index.saphi.tv.ts
|
|
66
67
|
index.tizen.tv.ts
|
|
67
68
|
index.vidaa.tv.ts
|
|
69
|
+
index.smartcast.tv.ts
|
|
68
70
|
index.webos.tv.ts
|
|
69
71
|
index.webtv.ts
|
|
70
72
|
index.xbox.ts
|
package/dist/src/engine.js
CHANGED
|
@@ -89,6 +89,11 @@ exports.default = {
|
|
|
89
89
|
defaultPort: 8099,
|
|
90
90
|
isWebHosted: true,
|
|
91
91
|
},
|
|
92
|
+
[constants_1.Platforms.SMARTCAST]: {
|
|
93
|
+
extensions: generateEngineExtensions(['smartcast.tv']),
|
|
94
|
+
defaultPort: 8101,
|
|
95
|
+
isWebHosted: true,
|
|
96
|
+
},
|
|
92
97
|
[constants_1.Platforms.WEBOS]: {
|
|
93
98
|
extensions: generateEngineExtensions(['webos.tv']),
|
|
94
99
|
defaultPort: 8088,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProductionZipFileRelativePath = exports.resolveZippedPlatformBuildsRelativeFilePath = exports.resolvePackageVersions = exports.resolveBuildFileExtension = exports.resolveUsedFlavours = exports.resolveSupportedFlavoursForPlatform = 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;
|
|
3
|
+
exports.getProductionZipFileRelativePath = exports.resolveZippedPlatformBuildsRelativeFilePath = exports.resolvePackageVersions = exports.resolveBuildFileExtension = exports.resolveUsedFlavours = exports.resolveSupportedFlavoursForPlatform = exports.resolveSupportedPlatforms = exports.getBaseConfig = exports.resolveBuildFileName = exports.resolveBuildFileBaseName = exports.resolveHbbtvDeployConfig = exports.resolveHbbtvDeployUrl = exports.resolveHbbtvRemoteBuildDirRelativePath = exports.resolveDeployLocations = exports.resolveBuildVersionOffset = exports.resolveBuildVersion = exports.resolveBuildEnvName = exports.resolveS3BucketAppPath = 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
6
|
Object.defineProperty(exports, "resolveProductionPackagesBaseUrl", { enumerable: true, get: function () { return resolveBaseUrl_1.resolveProductionPackagesBaseUrl; } });
|
|
7
|
+
var resolveS3BucketAppPath_1 = require("./resolveS3BucketAppPath");
|
|
8
|
+
Object.defineProperty(exports, "resolveS3BucketAppPath", { enumerable: true, get: function () { return resolveS3BucketAppPath_1.resolveS3BucketAppPath; } });
|
|
7
9
|
var resolveBuildEnvName_1 = require("./resolveBuildEnvName");
|
|
8
10
|
Object.defineProperty(exports, "resolveBuildEnvName", { enumerable: true, get: function () { return resolveBuildEnvName_1.resolveBuildEnvName; } });
|
|
9
11
|
var resolveBuildVersion_1 = require("./resolveBuildVersion");
|
|
@@ -2,36 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveProductionPackagesBaseUrl = exports.resolveBaseUrl = void 0;
|
|
4
4
|
const resolveGenericRnvConfig_1 = require("./resolveGenericRnvConfig");
|
|
5
|
-
const
|
|
6
|
-
const constants_1 = require("../constants");
|
|
5
|
+
const constructFullUrl_1 = require("./shared/constructFullUrl");
|
|
7
6
|
const resolveBaseUrl = ({ platform, scheme, flavour }) => {
|
|
8
7
|
const c = (0, resolveGenericRnvConfig_1.getBaseConfig)();
|
|
9
8
|
c.platform = platform;
|
|
10
9
|
c.runtime.scheme = scheme;
|
|
11
10
|
c.runtime.appId = flavour;
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
const bucketUrl = `http://${bucketName}.s3.amazonaws.com`;
|
|
18
|
-
const appFolderUrl = `${bucketUrl}/builds/${platform}/${flavour}`;
|
|
19
|
-
const envName = (0, resolveBuildEnvName_1.resolveBuildEnvName)(c.runtime.scheme);
|
|
20
|
-
switch (scheme) {
|
|
21
|
-
case constants_1.BuildSchemes.DEV_LATEST:
|
|
22
|
-
return `${appFolderUrl}/latest/dev`;
|
|
23
|
-
case constants_1.BuildSchemes.RC_STAGING_LATEST:
|
|
24
|
-
case constants_1.BuildSchemes.RC_PROD_LATEST:
|
|
25
|
-
return `${appFolderUrl}/latest/rc/${envName}`;
|
|
26
|
-
case constants_1.BuildSchemes.RELEASE_STAGING_LATEST:
|
|
27
|
-
case constants_1.BuildSchemes.RELEASE_PROD_LATEST:
|
|
28
|
-
return `${appFolderUrl}/latest/release/${envName}`;
|
|
29
|
-
case constants_1.BuildSchemes.RELEASE_STAGING_DIST:
|
|
30
|
-
case constants_1.BuildSchemes.RELEASE_PROD_DIST:
|
|
31
|
-
return `${appFolderUrl}/dist/v${packageVersion}/${envName}`;
|
|
32
|
-
default:
|
|
33
|
-
return '';
|
|
34
|
-
}
|
|
11
|
+
const hostedBaseUrl = c.buildConfig?.common.hostedUrl.baseUrl;
|
|
12
|
+
const fullBaseUrl = `${hostedBaseUrl}/builds/${platform}/${flavour}`;
|
|
13
|
+
return (0, constructFullUrl_1.constructFullUrl)({ baseUrl: fullBaseUrl, scheme, c });
|
|
35
14
|
};
|
|
36
15
|
exports.resolveBaseUrl = resolveBaseUrl;
|
|
37
16
|
const resolveProductionPackagesBaseUrl = (c) => {
|
|
@@ -27,10 +27,9 @@ exports.getProductionZipFileRelativePath = void 0;
|
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
const getProductionZipFileRelativePath = (c) => {
|
|
29
29
|
const { appNameInFileName } = c.buildConfig.common;
|
|
30
|
-
const buildVersion = c.buildConfig.common.packageVersion;
|
|
31
30
|
const { platformBuildsDir } = c.buildConfig.paths;
|
|
32
31
|
const platformBuildsDirPath = path.join(platformBuildsDir);
|
|
33
|
-
const zipFileName = `${appNameInFileName}.
|
|
32
|
+
const zipFileName = `${appNameInFileName}.production_packages.zip`;
|
|
34
33
|
return path.join(platformBuildsDirPath, zipFileName);
|
|
35
34
|
};
|
|
36
35
|
exports.getProductionZipFileRelativePath = getProductionZipFileRelativePath;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveS3BucketAppPath = void 0;
|
|
4
|
+
const resolveGenericRnvConfig_1 = require("./resolveGenericRnvConfig");
|
|
5
|
+
const constructFullUrl_1 = require("./shared/constructFullUrl");
|
|
6
|
+
const resolveS3BucketAppPath = ({ platform, scheme, flavour }) => {
|
|
7
|
+
const c = (0, resolveGenericRnvConfig_1.getBaseConfig)();
|
|
8
|
+
c.platform = platform;
|
|
9
|
+
c.runtime.scheme = scheme;
|
|
10
|
+
c.runtime.appId = flavour;
|
|
11
|
+
const bucketName = c.buildConfig?.common.deploy?.aws3?.bucketName || '';
|
|
12
|
+
const appFolderUrl = `${bucketName}/builds/${platform}/${flavour}`;
|
|
13
|
+
return (0, constructFullUrl_1.constructFullUrl)({ baseUrl: appFolderUrl, scheme, c });
|
|
14
|
+
};
|
|
15
|
+
exports.resolveS3BucketAppPath = resolveS3BucketAppPath;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructFullUrl = void 0;
|
|
4
|
+
const resolveBuildEnvName_1 = require("../resolveBuildEnvName");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const constructFullUrl = ({ baseUrl, scheme, c }) => {
|
|
7
|
+
const { packageVersion } = c.buildConfig?.common;
|
|
8
|
+
const envName = (0, resolveBuildEnvName_1.resolveBuildEnvName)(scheme);
|
|
9
|
+
switch (scheme) {
|
|
10
|
+
case constants_1.BuildSchemes.DEV_LATEST:
|
|
11
|
+
return `${baseUrl}/latest/dev`;
|
|
12
|
+
case constants_1.BuildSchemes.RC_STAGING_LATEST:
|
|
13
|
+
case constants_1.BuildSchemes.RC_PROD_LATEST:
|
|
14
|
+
return `${baseUrl}/latest/rc/${envName}`;
|
|
15
|
+
case constants_1.BuildSchemes.RELEASE_STAGING_LATEST:
|
|
16
|
+
case constants_1.BuildSchemes.RELEASE_PROD_LATEST:
|
|
17
|
+
return `${baseUrl}/latest/release/${envName}`;
|
|
18
|
+
case constants_1.BuildSchemes.RELEASE_STAGING_DIST:
|
|
19
|
+
case constants_1.BuildSchemes.RELEASE_PROD_DIST:
|
|
20
|
+
return `${baseUrl}/dist/v${packageVersion}/${envName}`;
|
|
21
|
+
default:
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.constructFullUrl = constructFullUrl;
|
|
@@ -25,12 +25,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.deployProductionPackagesToAppCenter = void 0;
|
|
27
27
|
const child_process_1 = require("child_process");
|
|
28
|
+
const path = __importStar(require("path"));
|
|
28
29
|
const fs = __importStar(require("fs"));
|
|
29
30
|
const constants_1 = require("../../../constants");
|
|
30
31
|
const buildProductionPackages_1 = require("../../../constants/buildProductionPackages");
|
|
31
32
|
const resolvers_1 = require("../../../resolvers");
|
|
32
33
|
const appCenter_1 = require("./appCenter");
|
|
34
|
+
const ENV_APPCENTER_TOKEN_PRODUCTION_PACKAGES = 'APPCENTER_TOKEN_PRODUCTION_PACKAGES';
|
|
33
35
|
const newLine = '\r\n';
|
|
36
|
+
const formatDateTime = (date) => {
|
|
37
|
+
const year = date.getFullYear();
|
|
38
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
39
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
40
|
+
const h = String(date.getHours()).padStart(2, '0');
|
|
41
|
+
const m = String(date.getMinutes()).padStart(2, '0');
|
|
42
|
+
const s = String(date.getSeconds()).padStart(2, '0');
|
|
43
|
+
return `${year}-${month}-${day}T${h}-${m}-${s}`;
|
|
44
|
+
};
|
|
34
45
|
const getAppCenterConfig = (c) => {
|
|
35
46
|
try {
|
|
36
47
|
return c.buildConfig.common.deploy?.productionPackages?.appCenter || null;
|
|
@@ -64,7 +75,7 @@ const getPlatformPackagesList = (c) => {
|
|
|
64
75
|
return packagesList;
|
|
65
76
|
};
|
|
66
77
|
const getAppCenterToken = () => {
|
|
67
|
-
return process.env[
|
|
78
|
+
return process.env[ENV_APPCENTER_TOKEN_PRODUCTION_PACKAGES] || '';
|
|
68
79
|
};
|
|
69
80
|
const deployProductionPackagesToAppCenter = (c) => {
|
|
70
81
|
console.log('deployProductionPackagesToAppCenter');
|
|
@@ -74,16 +85,15 @@ const deployProductionPackagesToAppCenter = (c) => {
|
|
|
74
85
|
}
|
|
75
86
|
const { appName: centerAppName } = appCenterConfig;
|
|
76
87
|
const token = getAppCenterToken();
|
|
77
|
-
const
|
|
78
|
-
const { appName, packageVersion } = c.buildConfig.common;
|
|
88
|
+
const { appName } = c.buildConfig.common;
|
|
79
89
|
if (!centerAppName)
|
|
80
|
-
throw new Error('Missing
|
|
90
|
+
throw new Error('Missing AppName in appCenterConfig');
|
|
81
91
|
if (!token)
|
|
82
|
-
throw new Error(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
throw new Error(`Missing App Center Token. To fix it, set "${ENV_APPCENTER_TOKEN_PRODUCTION_PACKAGES}" env variable`);
|
|
93
|
+
const originalZipPath = (0, resolvers_1.getProductionZipFileRelativePath)(c);
|
|
94
|
+
const { dir, name } = path.parse(originalZipPath);
|
|
95
|
+
const zipPath = path.join(dir, `${name}_${formatDateTime(new Date())}.zip`);
|
|
96
|
+
fs.renameSync(originalZipPath, zipPath);
|
|
87
97
|
const tempReleaseNotesPath = `RELEASE_NOTES_APPCENTER_PRODUCTION_PACKAGES.md`;
|
|
88
98
|
if (fs.existsSync(tempReleaseNotesPath)) {
|
|
89
99
|
fs.unlinkSync(tempReleaseNotesPath);
|
|
@@ -108,7 +118,7 @@ const deployProductionPackagesToAppCenter = (c) => {
|
|
|
108
118
|
console.log(`Deploying Production packages to AppCenter.ms...`);
|
|
109
119
|
(0, appCenter_1.appCenterRelease)({
|
|
110
120
|
projectName: centerAppName,
|
|
111
|
-
buildVersion:
|
|
121
|
+
buildVersion: '0',
|
|
112
122
|
filePath: zipPath,
|
|
113
123
|
releaseNotesPath: tempReleaseNotesPath,
|
|
114
124
|
token,
|
|
@@ -29,6 +29,7 @@ const beautifyPlatformName = (platformName) => {
|
|
|
29
29
|
case constants_1.Platforms.SAPHI: return 'Saphi (Philips)';
|
|
30
30
|
case constants_1.Platforms.TIZEN: return 'Tizen (Samsung)';
|
|
31
31
|
case constants_1.Platforms.VIDAA: return 'VIDAA (Hisense)';
|
|
32
|
+
case constants_1.Platforms.SMARTCAST: return 'SmartCast (VIZIO)';
|
|
32
33
|
case constants_1.Platforms.WEBOS: return 'webOS (LG)';
|
|
33
34
|
case constants_1.Platforms.WEBTV: return 'WebTV';
|
|
34
35
|
case constants_1.Platforms.XBOX: return 'Xbox';
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.deployToS3 =
|
|
26
|
+
exports.deployToS3 = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
const rnv_1 = require("rnv");
|
|
29
29
|
const aws = __importStar(require("./aws"));
|
|
@@ -45,27 +45,20 @@ const uploadPublicDir = (sourcePath, uploadPath) => {
|
|
|
45
45
|
rnv_1.Logger.logDebug(`uploadPublicDir: src: ${publicDirLocalPath}, dest: ${publicDirRemotePath}`);
|
|
46
46
|
aws.cp(publicDirLocalPath, publicDirRemotePath);
|
|
47
47
|
};
|
|
48
|
-
const urlToS3Protocol = (url) => {
|
|
49
|
-
const hostWithPath = url.split('://')[1];
|
|
50
|
-
const bucketHostnameAwsPostfix = '.s3.amazonaws.com';
|
|
51
|
-
return hostWithPath.replace(bucketHostnameAwsPostfix, '');
|
|
52
|
-
};
|
|
53
|
-
exports.urlToS3Protocol = urlToS3Protocol;
|
|
54
48
|
const deployToS3 = async (c) => {
|
|
55
49
|
rnv_1.Logger.logTask(`deployToS3`);
|
|
56
50
|
const { platform, runtime } = c;
|
|
57
51
|
const schemeDirName = c.program.schemeFolder ? (0, getSafeSchemeString_1.getSafeSchemeString)(runtime.scheme) : '';
|
|
58
52
|
const sourcePath = path.join(c.paths.project.builds.dir, schemeDirName, `${runtime.appId}_${platform}`);
|
|
59
53
|
const { isBuildHosted } = getConfigProp(c, platform, 'webpackConfig', {});
|
|
60
|
-
const
|
|
54
|
+
const uploadPath = (0, resolvers_1.resolveS3BucketAppPath)({
|
|
61
55
|
platform,
|
|
62
56
|
scheme: runtime.scheme || '',
|
|
63
57
|
flavour: runtime.appId,
|
|
64
58
|
});
|
|
65
|
-
if (!
|
|
59
|
+
if (!uploadPath) {
|
|
66
60
|
return false;
|
|
67
61
|
}
|
|
68
|
-
const uploadPath = urlToS3Protocol(baseUrl);
|
|
69
62
|
aws.rm(`${uploadPath}/`);
|
|
70
63
|
uploadPackage(c, sourcePath, uploadPath);
|
|
71
64
|
if (platform === constants_1.Platforms.HBBTV) {
|
|
@@ -24,17 +24,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.checkAWSAuth = exports.checkDistVersionAvailability = exports.distToLiveS3 = void 0;
|
|
27
|
-
const
|
|
27
|
+
const resolvers_1 = require("../../../resolvers");
|
|
28
28
|
const resolveGenericRnvConfig_1 = require("../../../resolvers/resolveGenericRnvConfig");
|
|
29
|
-
const deployS3_1 = require("./deployS3");
|
|
30
29
|
const aws = __importStar(require("./aws"));
|
|
31
30
|
const getUploadPath = (options, version) => {
|
|
32
31
|
const { packageVersion } = (0, resolveGenericRnvConfig_1.getBaseConfig)().buildConfig?.common;
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
32
|
+
const s3BucketAppPath = (0, resolvers_1.resolveS3BucketAppPath)(options);
|
|
33
|
+
if (!s3BucketAppPath) {
|
|
35
34
|
return undefined;
|
|
36
35
|
}
|
|
37
|
-
return
|
|
36
|
+
return s3BucketAppPath.replace(packageVersion, version);
|
|
38
37
|
};
|
|
39
38
|
const checkAWSAuth = () => {
|
|
40
39
|
try {
|
|
@@ -76,6 +76,7 @@ const buildFn = async (c, parentTask, originTask) => {
|
|
|
76
76
|
case constants_1.Platforms.KREATV:
|
|
77
77
|
case constants_1.Platforms.SAPHI:
|
|
78
78
|
case constants_1.Platforms.VIDAA:
|
|
79
|
+
case constants_1.Platforms.SMARTCAST:
|
|
79
80
|
case constants_1.Platforms.WEBTV:
|
|
80
81
|
await sdks_1.SDKWebpack.buildCoreWebpackProject(c);
|
|
81
82
|
makeZipOutput(c);
|
|
@@ -19,6 +19,7 @@ const configureFn = async (c, parentTask, originTask) => {
|
|
|
19
19
|
case constants_1.Platforms.KREATV:
|
|
20
20
|
case constants_1.Platforms.SAPHI:
|
|
21
21
|
case constants_1.Platforms.VIDAA:
|
|
22
|
+
case constants_1.Platforms.SMARTCAST:
|
|
22
23
|
case constants_1.Platforms.WEBTV:
|
|
23
24
|
case constants_1.Platforms.XBOX:
|
|
24
25
|
await sdks_1.SDKWebpack.configureWebProject(c);
|
|
@@ -30,6 +30,7 @@ const deployFn = async (c, parentTask, originTask) => {
|
|
|
30
30
|
case constants_1.Platforms.ENTONE:
|
|
31
31
|
case constants_1.Platforms.KREATV:
|
|
32
32
|
case constants_1.Platforms.SAPHI:
|
|
33
|
+
case constants_1.Platforms.SMARTCAST:
|
|
33
34
|
case constants_1.Platforms.TIZEN:
|
|
34
35
|
case constants_1.Platforms.VIDAA:
|
|
35
36
|
case constants_1.Platforms.WEBOS:
|
|
@@ -24,6 +24,7 @@ const startFn = async (c, parentTask, originTask) => {
|
|
|
24
24
|
case constants_1.Platforms.SAPHI:
|
|
25
25
|
case constants_1.Platforms.TIZEN:
|
|
26
26
|
case constants_1.Platforms.VIDAA:
|
|
27
|
+
case constants_1.Platforms.SMARTCAST:
|
|
27
28
|
case constants_1.Platforms.WEBOS:
|
|
28
29
|
case constants_1.Platforms.WEBTV:
|
|
29
30
|
case constants_1.Platforms.XBOX:
|
|
@@ -42,8 +42,8 @@ const getPlatformBuildsPaths = (c, platformName, scheme) => {
|
|
|
42
42
|
const platformBuildsGlob = `${outputGlob}/*.${(0, index_1.resolveBuildFileExtension)(platformName)}`;
|
|
43
43
|
try {
|
|
44
44
|
const buildsPathsCandidates = glob.sync(platformBuildsGlob) || [];
|
|
45
|
-
const
|
|
46
|
-
return
|
|
45
|
+
const platformBuildsPaths = buildsPathsCandidates.filter((path) => path.includes(platformName));
|
|
46
|
+
return platformBuildsPaths;
|
|
47
47
|
}
|
|
48
48
|
catch (e) {
|
|
49
49
|
return [];
|
|
@@ -104,7 +104,7 @@ const processPlatform = (c, platformName, schemes) => {
|
|
|
104
104
|
(0, fs_1.rmdirSync)(tempPlatformDir, { recursive: true });
|
|
105
105
|
};
|
|
106
106
|
const zipStagingProdBuildsByPlatforms = (c, schemes) => {
|
|
107
|
-
const [
|
|
107
|
+
const [, prodScheme] = schemes;
|
|
108
108
|
if (!prodScheme) {
|
|
109
109
|
throw new Error('Missing production scheme.');
|
|
110
110
|
}
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.generateWebpackProdConfig = exports.generateWebpackDevConfig = void 0;
|
|
27
27
|
const webpack_base_1 = require("./webpack.base");
|
|
28
28
|
const Extend = __importStar(require("./webpack.extend"));
|
|
29
|
+
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
29
30
|
const composeCommonConfig = (config) => {
|
|
30
31
|
const composedConfig = {
|
|
31
32
|
...config,
|
|
@@ -68,6 +69,7 @@ const makeCommonOutput = (config, C) => ({
|
|
|
68
69
|
C.Plugins.harddisk,
|
|
69
70
|
C.Plugins.css,
|
|
70
71
|
C.Plugins.fileManager,
|
|
72
|
+
new BundleAnalyzerPlugin(),
|
|
71
73
|
].filter(Boolean),
|
|
72
74
|
resolve: {
|
|
73
75
|
symlinks: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/smartapps-bigscreen-rnv-build-engine",
|
|
3
|
-
"version": "0.17.6-alpha.
|
|
3
|
+
"version": "0.17.6-alpha.12-analyzer-test",
|
|
4
4
|
"description": "Package with build engine for SmartApps BIGscreen projects...",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -82,7 +82,8 @@
|
|
|
82
82
|
"webpack": "5.72.0",
|
|
83
83
|
"webpack-cli": "4.10.0",
|
|
84
84
|
"webpack-dev-server": "4.9.0",
|
|
85
|
-
"webpack-spritesmith": "1.1.0"
|
|
85
|
+
"webpack-spritesmith": "1.1.0",
|
|
86
|
+
"webpack-bundle-analyzer": "^4.9.0"
|
|
86
87
|
},
|
|
87
88
|
"keywords": [],
|
|
88
89
|
"author": "24i",
|