@applicaster/zapplicaster-cli 15.0.0-rc.99 → 15.1.0-alpha.2915689988
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapplicaster-cli",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.1.0-alpha.2915689988",
|
|
4
4
|
"description": "CLI Tool for the zapp app and Quick Brick project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/zapp-react-dom-cli-template": "15.
|
|
32
|
-
"@applicaster/zapp-react-native-android-tv-cli-template": "15.
|
|
33
|
-
"@applicaster/zapp-react-native-cli-template": "15.
|
|
34
|
-
"@applicaster/zapp-react-native-tvos-cli-template": "15.
|
|
31
|
+
"@applicaster/zapp-react-dom-cli-template": "15.1.0-alpha.2915689988",
|
|
32
|
+
"@applicaster/zapp-react-native-android-tv-cli-template": "15.1.0-alpha.2915689988",
|
|
33
|
+
"@applicaster/zapp-react-native-cli-template": "15.1.0-alpha.2915689988",
|
|
34
|
+
"@applicaster/zapp-react-native-tvos-cli-template": "15.1.0-alpha.2915689988",
|
|
35
35
|
"axios": "^0.28.0",
|
|
36
36
|
"camelize": "^1.0.0",
|
|
37
37
|
"chalk": "^2.3.2",
|
package/src/commands/index.js
CHANGED
|
@@ -117,7 +117,7 @@ const commands = [
|
|
|
117
117
|
["-g, --skip-git", "Doesn't commit changes to git"],
|
|
118
118
|
[
|
|
119
119
|
"-s, --single-platform [singlePlatform]",
|
|
120
|
-
"Platform to deploy.
|
|
120
|
+
"Platform to deploy. Ommit to publish for all supported platforms",
|
|
121
121
|
],
|
|
122
122
|
[
|
|
123
123
|
"-m, --manifest-only",
|
|
@@ -42,19 +42,9 @@ function clearMocks() {
|
|
|
42
42
|
describe("generate manifest", () => {
|
|
43
43
|
beforeEach(clearMocks);
|
|
44
44
|
|
|
45
|
-
it("
|
|
46
|
-
const configuration = getConfig({
|
|
47
|
-
platforms: ["android", "invalid_platform"],
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
await expect(generateManifest(configuration)).rejects.toThrow(
|
|
51
|
-
/Invalid platform provided/
|
|
52
|
-
);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it("doesn't create the manifest if there is no platform", async () => {
|
|
45
|
+
it("doesn't create the manifest if there is no platform", () => {
|
|
56
46
|
const configuration = getConfig({ platforms: undefined });
|
|
57
|
-
|
|
47
|
+
expect(generateManifest(configuration)).resolves.toBe(true);
|
|
58
48
|
expect(writeJsonToFile).not.toHaveBeenCalled();
|
|
59
49
|
});
|
|
60
50
|
|
|
@@ -101,11 +91,12 @@ describe("generate manifest", () => {
|
|
|
101
91
|
|
|
102
92
|
it("throws if the config file cannot be found", async () => {
|
|
103
93
|
const configuration = getConfig({ pluginPath: "resolve_error" });
|
|
104
|
-
|
|
94
|
+
|
|
95
|
+
expect(generateManifest(configuration)).rejects.toMatchSnapshot();
|
|
105
96
|
});
|
|
106
97
|
|
|
107
98
|
it("throws if the manifests cannot be written", async () => {
|
|
108
99
|
const configuration = getConfig({ pluginPath: "write_error" });
|
|
109
|
-
|
|
100
|
+
expect(generateManifest(configuration)).rejects.toMatchSnapshot();
|
|
110
101
|
});
|
|
111
102
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const R = require("ramda");
|
|
1
2
|
const { resolve } = require("path");
|
|
2
3
|
const { inspect } = require("util");
|
|
3
4
|
|
|
@@ -47,19 +48,6 @@ function renderManifest({
|
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
const validPlatforms = [
|
|
51
|
-
"lg_tv",
|
|
52
|
-
"samsung_tv",
|
|
53
|
-
"vizio",
|
|
54
|
-
"android_tv_for_quickbrick",
|
|
55
|
-
"amazon_fire_tv_for_quickbrick",
|
|
56
|
-
"tvos_for_quickbrick",
|
|
57
|
-
"android_for_quickbrick",
|
|
58
|
-
"ios_for_quickbrick",
|
|
59
|
-
"ios",
|
|
60
|
-
"android",
|
|
61
|
-
];
|
|
62
|
-
|
|
63
51
|
async function generateManifest(configuration) {
|
|
64
52
|
const { pluginPath, platforms, version, dryRun } = configuration;
|
|
65
53
|
|
|
@@ -69,12 +57,6 @@ async function generateManifest(configuration) {
|
|
|
69
57
|
return true;
|
|
70
58
|
}
|
|
71
59
|
|
|
72
|
-
if (!platforms.every((platform) => validPlatforms.includes(platform))) {
|
|
73
|
-
throw new Error(
|
|
74
|
-
`Invalid platform provided. Valid platforms are: ${validPlatforms.join(", ")}`
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
60
|
try {
|
|
79
61
|
const manifestConfig = require(
|
|
80
62
|
resolve(pluginPath, "manifests/manifest.config.js")
|
|
@@ -90,7 +72,7 @@ async function generateManifest(configuration) {
|
|
|
90
72
|
dryRun,
|
|
91
73
|
});
|
|
92
74
|
|
|
93
|
-
return Promise.all(
|
|
75
|
+
return Promise.all(R.map(manifestRenderer, platforms));
|
|
94
76
|
} catch (e) {
|
|
95
77
|
throw new Error(
|
|
96
78
|
"An error occured when generating the manifest: " + e.message
|