rnbuilder 0.4.1 → 0.4.2

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 CHANGED
@@ -20,7 +20,7 @@ $ npm install -g rnbuilder
20
20
  $ rnbuilder COMMAND
21
21
  running command...
22
22
  $ rnbuilder (-v|--version|version)
23
- rnbuilder/0.4.1 darwin-x64 node-v12.22.4
23
+ rnbuilder/0.4.2 darwin-x64 node-v12.22.4
24
24
  $ rnbuilder --help [COMMAND]
25
25
  USAGE
26
26
  $ rnbuilder COMMAND
@@ -32,6 +32,7 @@ USAGE
32
32
  * [`rnbuilder build [BUILD]`](#rnbuilder-build-build)
33
33
  * [`rnbuilder help [COMMAND]`](#rnbuilder-help-command)
34
34
  * [`rnbuilder initialize`](#rnbuilder-initialize)
35
+ * [`rnbuilder sync-udids [BUILD]`](#rnbuilder-sync-udids-build)
35
36
 
36
37
  ## `rnbuilder build [BUILD]`
37
38
 
@@ -55,7 +56,7 @@ EXAMPLE
55
56
  hello world from ./src/build.ts!
56
57
  ```
57
58
 
58
- _See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.4.1/src/commands/build.ts)_
59
+ _See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.4.2/src/commands/build.ts)_
59
60
 
60
61
  ## `rnbuilder help [COMMAND]`
61
62
 
@@ -87,5 +88,24 @@ EXAMPLE
87
88
  initialize environment for first run from ./src/initialize.ts!
88
89
  ```
89
90
 
90
- _See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.4.1/src/commands/initialize.ts)_
91
+ _See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.4.2/src/commands/initialize.ts)_
92
+
93
+ ## `rnbuilder sync-udids [BUILD]`
94
+
95
+ Sync device UDIDs from firebase
96
+
97
+ ```
98
+ USAGE
99
+ $ rnbuilder sync-udids [BUILD]
100
+
101
+ OPTIONS
102
+ -c, --client=client Select client that you want to sync udids
103
+ -h, --help show CLI help
104
+
105
+ EXAMPLE
106
+ $ rnbuilder sync-udids
107
+ Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
108
+ ```
109
+
110
+ _See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.4.2/src/commands/sync-udids.ts)_
91
111
  <!-- commandsstop -->
@@ -0,0 +1,14 @@
1
+ import { Command, flags } from '@oclif/command';
2
+ export default class FirebaseSyncUDIDs extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
7
+ client: flags.IOptionFlag<string | undefined>;
8
+ };
9
+ static args: {
10
+ name: string;
11
+ }[];
12
+ askForMissingFields: (flags: any) => Promise<any>;
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* eslint-disable no-negated-condition */
4
+ const command_1 = require("@oclif/command");
5
+ const shell = require("shelljs");
6
+ const inquirer = require("inquirer");
7
+ const utils_1 = require("../utils");
8
+ class FirebaseSyncUDIDs extends command_1.Command {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.askForMissingFields = async (flags) => {
12
+ const questions = [];
13
+ if (!flags.client) {
14
+ const clients = utils_1.getDirectories('./fastlane/clients');
15
+ if (clients.length > 0) {
16
+ questions.push({
17
+ type: 'list',
18
+ name: 'client',
19
+ message: 'What is the client?',
20
+ choices: clients,
21
+ });
22
+ }
23
+ }
24
+ let result = flags;
25
+ if (questions.length > 0) {
26
+ const answers = await inquirer.prompt(questions);
27
+ result = Object.assign(Object.assign({}, flags), answers);
28
+ }
29
+ return result;
30
+ };
31
+ }
32
+ async run() {
33
+ const { flags } = this.parse(FirebaseSyncUDIDs);
34
+ const params = await this.askForMissingFields(flags);
35
+ const { client } = params;
36
+ shell.cd('fastlane');
37
+ shell.exec('bundle install');
38
+ if (client) {
39
+ shell.cd(`clients/${client}`);
40
+ }
41
+ shell.exec('bundle exec fastlane sync_udids');
42
+ }
43
+ }
44
+ exports.default = FirebaseSyncUDIDs;
45
+ FirebaseSyncUDIDs.description = 'Sync device UDIDs from firebase';
46
+ FirebaseSyncUDIDs.examples = [
47
+ `$ rnbuilder sync-udids
48
+ Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
49
+ `,
50
+ ];
51
+ FirebaseSyncUDIDs.flags = {
52
+ help: command_1.flags.help({ char: 'h' }),
53
+ client: command_1.flags.string({ char: 'c', description: 'Select client that you want to sync udids' }),
54
+ };
55
+ FirebaseSyncUDIDs.args = [{ name: 'build' }];
@@ -1 +1 @@
1
- {"version":"0.4.1","commands":{"build":{"id":"build","description":"Build react native apps","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder build\nhello world from ./src/build.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Set client that you want to build app"},"target":{"name":"target","type":"option","char":"t","description":"Set the build target: android, ios or both","options":["android","ios"]},"env":{"name":"env","type":"option","char":"e","description":"Set the environment: prod, adhoc, staging","options":["staging","adhoc","prod"]},"branch":{"name":"branch","type":"option","char":"b","description":"Set the source branch used to build the app"},"version":{"name":"version","type":"option","char":"v","description":"Set the version number for this build"},"installr":{"name":"installr","type":"option","char":"i","description":"If enabled, the build will be uploaded to installR"}},"args":[{"name":"build"}]},"initialize":{"id":"initialize","description":"Initialize the environment for first run","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder initialize\ninitialize environment for first run from ./src/initialize.ts!\n"],"flags":{},"args":[]}}}
1
+ {"version":"0.4.2","commands":{"build":{"id":"build","description":"Build react native apps","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder build\nhello world from ./src/build.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Set client that you want to build app"},"target":{"name":"target","type":"option","char":"t","description":"Set the build target: android, ios or both","options":["android","ios"]},"env":{"name":"env","type":"option","char":"e","description":"Set the environment: prod, adhoc, staging","options":["staging","adhoc","prod"]},"branch":{"name":"branch","type":"option","char":"b","description":"Set the source branch used to build the app"},"version":{"name":"version","type":"option","char":"v","description":"Set the version number for this build"},"installr":{"name":"installr","type":"option","char":"i","description":"If enabled, the build will be uploaded to installR"}},"args":[{"name":"build"}]},"initialize":{"id":"initialize","description":"Initialize the environment for first run","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder initialize\ninitialize environment for first run from ./src/initialize.ts!\n"],"flags":{},"args":[]},"sync-udids":{"id":"sync-udids","description":"Sync device UDIDs from firebase","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder sync-udids\n Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"}},"args":[{"name":"build"}]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rnbuilder",
3
3
  "description": "React Native builder tool",
4
- "version": "0.4.1",
4
+ "version": "0.4.2",
5
5
  "author": "Tuan Luong @r0b0t3d",
6
6
  "bin": {
7
7
  "rnbuilder": "./bin/run"