@applicaster/zapplicaster-cli 14.0.12-alpha.1551424843 → 14.0.12-alpha.5204615553
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 +5 -5
- package/src/commands/index.js +4 -0
- package/src/commands/publishPlugin/__tests__/__snapshots__/configurator.test.js.snap +3 -0
- package/src/commands/publishPlugin/__tests__/configurator.test.js +2 -3
- package/src/commands/publishPlugin/configurator.js +6 -0
- package/src/commands/publishPlugin/generateManifest.js +5 -3
- package/src/commands/publishPlugin/zappifestPublish.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapplicaster-cli",
|
|
3
|
-
"version": "14.0.12-alpha.
|
|
3
|
+
"version": "14.0.12-alpha.5204615553",
|
|
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": "14.0.12-alpha.
|
|
32
|
-
"@applicaster/zapp-react-native-android-tv-cli-template": "14.0.12-alpha.
|
|
33
|
-
"@applicaster/zapp-react-native-cli-template": "14.0.12-alpha.
|
|
34
|
-
"@applicaster/zapp-react-native-tvos-cli-template": "14.0.12-alpha.
|
|
31
|
+
"@applicaster/zapp-react-dom-cli-template": "14.0.12-alpha.5204615553",
|
|
32
|
+
"@applicaster/zapp-react-native-android-tv-cli-template": "14.0.12-alpha.5204615553",
|
|
33
|
+
"@applicaster/zapp-react-native-cli-template": "14.0.12-alpha.5204615553",
|
|
34
|
+
"@applicaster/zapp-react-native-tvos-cli-template": "14.0.12-alpha.5204615553",
|
|
35
35
|
"axios": "^0.28.0",
|
|
36
36
|
"camelize": "^1.0.0",
|
|
37
37
|
"chalk": "^2.3.2",
|
package/src/commands/index.js
CHANGED
|
@@ -123,6 +123,10 @@ const commands = [
|
|
|
123
123
|
"-m, --manifest-only",
|
|
124
124
|
"Only generates the manifest file, doesn't publish the plugin",
|
|
125
125
|
],
|
|
126
|
+
[
|
|
127
|
+
"-t, --targets [targets]",
|
|
128
|
+
"Comma-separated list of targets (e.g., 'tv,mobile,tablet') for iterative releases",
|
|
129
|
+
],
|
|
126
130
|
],
|
|
127
131
|
action: publishPlugin,
|
|
128
132
|
},
|
|
@@ -10,6 +10,7 @@ const getOptions = (opts = {}) => ({
|
|
|
10
10
|
version: "1.5.0",
|
|
11
11
|
singlePlatform: "",
|
|
12
12
|
skipGit: false,
|
|
13
|
+
targets: "tv",
|
|
13
14
|
...opts,
|
|
14
15
|
},
|
|
15
16
|
});
|
|
@@ -102,9 +103,7 @@ describe("publish plugin configurator", () => {
|
|
|
102
103
|
|
|
103
104
|
it("returns the configuration", async () => {
|
|
104
105
|
const options = getOptions();
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
expect(config).toMatchSnapshot();
|
|
106
|
+
expect(await configurator(options)).toMatchSnapshot();
|
|
108
107
|
expect(logger.log.mock.calls).toMatchSnapshot();
|
|
109
108
|
});
|
|
110
109
|
|
|
@@ -74,6 +74,7 @@ async function configurator({ cliArgs, cliOptions }) {
|
|
|
74
74
|
singlePlatform: platform = "",
|
|
75
75
|
skipGit = false,
|
|
76
76
|
manifestOnly = false,
|
|
77
|
+
targets,
|
|
77
78
|
} = cliOptions;
|
|
78
79
|
|
|
79
80
|
if (!version || !semver.valid(version)) {
|
|
@@ -121,6 +122,10 @@ async function configurator({ cliArgs, cliOptions }) {
|
|
|
121
122
|
);
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
const parsedTargets = targets
|
|
126
|
+
? targets.split(",").map((t) => t.trim())
|
|
127
|
+
: undefined;
|
|
128
|
+
|
|
124
129
|
const config = {
|
|
125
130
|
pluginPath: resolvedPluginPath,
|
|
126
131
|
pluginPackageJson,
|
|
@@ -133,6 +138,7 @@ async function configurator({ cliArgs, cliOptions }) {
|
|
|
133
138
|
skipGit,
|
|
134
139
|
zappOwnerAccountId,
|
|
135
140
|
manifestOnly,
|
|
141
|
+
targets: parsedTargets,
|
|
136
142
|
};
|
|
137
143
|
|
|
138
144
|
return config;
|
|
@@ -27,9 +27,10 @@ function renderManifest({
|
|
|
27
27
|
pluginPath,
|
|
28
28
|
version,
|
|
29
29
|
dryRun,
|
|
30
|
+
targets,
|
|
30
31
|
}) {
|
|
31
32
|
return async function (platform) {
|
|
32
|
-
const manifest = manifestConfig({ platform, version });
|
|
33
|
+
const manifest = manifestConfig({ platform, version, targets });
|
|
33
34
|
|
|
34
35
|
const enrichedManifest = enrichManifest({ manifest, packageJson });
|
|
35
36
|
|
|
@@ -49,10 +50,10 @@ function renderManifest({
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
async function generateManifest(configuration) {
|
|
52
|
-
const { pluginPath, platforms, version, dryRun } = configuration;
|
|
53
|
+
const { pluginPath, platforms, version, dryRun, targets } = configuration;
|
|
53
54
|
|
|
54
55
|
if (!platforms) {
|
|
55
|
-
logger.log("Manifest does not
|
|
56
|
+
logger.log("Manifest does not exsist, Skipping generation");
|
|
56
57
|
|
|
57
58
|
return true;
|
|
58
59
|
}
|
|
@@ -70,6 +71,7 @@ async function generateManifest(configuration) {
|
|
|
70
71
|
packageJson,
|
|
71
72
|
version,
|
|
72
73
|
dryRun,
|
|
74
|
+
targets,
|
|
73
75
|
});
|
|
74
76
|
|
|
75
77
|
return Promise.all(R.map(manifestRenderer, platforms));
|