rnbuilder 0.6.81 → 0.6.82

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
@@ -40,7 +40,7 @@ $ npm install -g rnbuilder
40
40
  $ rnbuilder COMMAND
41
41
  running command...
42
42
  $ rnbuilder (-v|--version|version)
43
- rnbuilder/0.6.81 darwin-arm64 node-v24.13.0
43
+ rnbuilder/0.6.82 darwin-arm64 node-v24.13.0
44
44
  $ rnbuilder --help [COMMAND]
45
45
  USAGE
46
46
  $ rnbuilder COMMAND
@@ -59,7 +59,6 @@ USAGE
59
59
  * [`rnbuilder initialize`](#rnbuilder-initialize)
60
60
  * [`rnbuilder match-check [MATCH-CHECK]`](#rnbuilder-match-check-match-check)
61
61
  * [`rnbuilder match-nuke [BUILD]`](#rnbuilder-match-nuke-build)
62
- * [`rnbuilder onesignal [BUILD]`](#rnbuilder-onesignal-build)
63
62
  * [`rnbuilder reject-review [REJECT-REVIEW]`](#rnbuilder-reject-review-reject-review)
64
63
  * [`rnbuilder setup [SETUP]`](#rnbuilder-setup-setup)
65
64
  * [`rnbuilder setup-gcp`](#rnbuilder-setup-gcp)
@@ -98,7 +97,7 @@ EXAMPLE
98
97
  hello world from ./src/build.ts!
99
98
  ```
100
99
 
101
- _See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/build.ts)_
100
+ _See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/build.ts)_
102
101
 
103
102
  ## `rnbuilder check-version [MATCH-CHECK]`
104
103
 
@@ -117,7 +116,7 @@ EXAMPLE
117
116
  Nuke certificates ./src/match-check.ts!
118
117
  ```
119
118
 
120
- _See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/check-version.ts)_
119
+ _See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/check-version.ts)_
121
120
 
122
121
  ## `rnbuilder codepush [BUILD]`
123
122
 
@@ -136,7 +135,7 @@ EXAMPLE
136
135
  Push changes to existing apps ./src/firebase-sync-udids.ts!
137
136
  ```
138
137
 
139
- _See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/codepush.ts)_
138
+ _See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/codepush.ts)_
140
139
 
141
140
  ## `rnbuilder google-key [MATCH-CHECK]`
142
141
 
@@ -155,7 +154,7 @@ EXAMPLE
155
154
  Nuke certificates ./src/match-check.ts!
156
155
  ```
157
156
 
158
- _See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/google-key.ts)_
157
+ _See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/google-key.ts)_
159
158
 
160
159
  ## `rnbuilder help [COMMAND]`
161
160
 
@@ -187,7 +186,7 @@ EXAMPLE
187
186
  initialize environment for first run from ./src/initialize.ts!
188
187
  ```
189
188
 
190
- _See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/initialize.ts)_
189
+ _See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/initialize.ts)_
191
190
 
192
191
  ## `rnbuilder match-check [MATCH-CHECK]`
193
192
 
@@ -206,7 +205,7 @@ EXAMPLE
206
205
  Check match certificates ./src/match-check.ts!
207
206
  ```
208
207
 
209
- _See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/match-check.ts)_
208
+ _See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/match-check.ts)_
210
209
 
211
210
  ## `rnbuilder match-nuke [BUILD]`
212
211
 
@@ -225,29 +224,7 @@ EXAMPLE
225
224
  Nuke certificates ./src/match-nuke.ts!
226
225
  ```
227
226
 
228
- _See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/match-nuke.ts)_
229
-
230
- ## `rnbuilder onesignal [BUILD]`
231
-
232
- Create and upload push cerfiticate to One Signal
233
-
234
- ```
235
- USAGE
236
- $ rnbuilder onesignal [BUILD]
237
-
238
- OPTIONS
239
- -c, --client=client Select client that you want to sync udids
240
- -h, --help show CLI help
241
- --android_gcm_sender_id=android_gcm_sender_id
242
- --android_token=android_token
243
- --auth_token=auth_token Auth token for OneSignal
244
-
245
- EXAMPLE
246
- $ rnbuilder onesignal
247
- Create and upload push certificate to One Signal from ./src/commands/onesignal.ts!
248
- ```
249
-
250
- _See code: [src/commands/onesignal.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/onesignal.ts)_
227
+ _See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/match-nuke.ts)_
251
228
 
252
229
  ## `rnbuilder reject-review [REJECT-REVIEW]`
253
230
 
@@ -265,7 +242,7 @@ EXAMPLE
265
242
  $ rnbuilder reject-review
266
243
  ```
267
244
 
268
- _See code: [src/commands/reject-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/reject-review.ts)_
245
+ _See code: [src/commands/reject-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/reject-review.ts)_
269
246
 
270
247
  ## `rnbuilder setup [SETUP]`
271
248
 
@@ -283,7 +260,7 @@ EXAMPLE
283
260
  hello world from ./src/setup.ts!
284
261
  ```
285
262
 
286
- _See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/setup.ts)_
263
+ _See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/setup.ts)_
287
264
 
288
265
  ## `rnbuilder setup-gcp`
289
266
 
@@ -297,7 +274,7 @@ OPTIONS
297
274
  -h, --help show CLI help
298
275
  ```
299
276
 
300
- _See code: [src/commands/setup-gcp.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/setup-gcp.ts)_
277
+ _See code: [src/commands/setup-gcp.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/setup-gcp.ts)_
301
278
 
302
279
  ## `rnbuilder submit-review [SUBMIT-REVIEW]`
303
280
 
@@ -316,7 +293,7 @@ EXAMPLE
316
293
  Push changes to existing apps ./src/firebase-sync-udids.ts!
317
294
  ```
318
295
 
319
- _See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/submit-review.ts)_
296
+ _See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/submit-review.ts)_
320
297
 
321
298
  ## `rnbuilder sync-udids [BUILD]`
322
299
 
@@ -335,5 +312,5 @@ EXAMPLE
335
312
  Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
336
313
  ```
337
314
 
338
- _See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.81/src/commands/sync-udids.ts)_
315
+ _See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/sync-udids.ts)_
339
316
  <!-- commandsstop -->
@@ -1 +1 @@
1
- {"version":"0.6.81","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","android,ios"]},"env":{"name":"env","type":"option","char":"e","description":"Set the environment: prod, staging, dev"},"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"},"distribute":{"name":"distribute","type":"option","char":"d","description":"Specify where to distribute app"},"firebase":{"name":"firebase","type":"boolean","char":"f","description":"If enabled, the build will be uploaded to firebase","allowNo":false},"testersIos":{"name":"testersIos","type":"option","char":"t","description":"Tester ids for iOS distribution"},"testersAndroid":{"name":"testersAndroid","type":"option","char":"u","description":"Tester ids for Android distribution"},"gitReset":{"name":"gitReset","type":"boolean","char":"g","description":"Do git reset when building","allowNo":false},"cleanup":{"name":"cleanup","type":"boolean","char":"s","description":"Do cleanup when building","allowNo":false},"groupsIos":{"name":"groupsIos","type":"option","description":"Groups ids for iOS distribution"},"groupsAndroid":{"name":"groupsAndroid","type":"option","description":"Groups ids for Android distribution"},"skipCheckVersion":{"name":"skipCheckVersion","type":"boolean","description":"Skip checking current version on stores","allowNo":false},"install":{"name":"install","type":"boolean","char":"n","description":"Install dependencies before building","allowNo":false}},"args":[{"name":"build"}]},"check-version":{"id":"check-version","description":"Check live versions","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder check-version\n Nuke certificates ./src/match-check.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":"match-check"}]},"codepush":{"id":"codepush","description":"Push changes to existing apps","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder codepush\n Push changes to existing apps ./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 push update"}},"args":[{"name":"build"}]},"google-key":{"id":"google-key","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-check\n Nuke certificates ./src/match-check.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":"match-check"}]},"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":[]},"match-check":{"id":"match-check","description":"Check match certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-check\n Check match certificates ./src/match-check.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 check match certificates"}},"args":[{"name":"match-check"}]},"match-nuke":{"id":"match-nuke","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-nuke\n Nuke certificates ./src/match-nuke.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"}]},"onesignal":{"id":"onesignal","description":"Create and upload push cerfiticate to One Signal","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder onesignal\n Create and upload push certificate to One Signal from ./src/commands/onesignal.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"},"auth_token":{"name":"auth_token","type":"option","description":"Auth token for OneSignal"},"android_token":{"name":"android_token","type":"option"},"android_gcm_sender_id":{"name":"android_gcm_sender_id","type":"option"}},"args":[{"name":"build"}]},"reject-review":{"id":"reject-review","description":"Reject current App Store review version (In Review or Pending Developer Release)","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder reject-review\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 to reject App Store review version"}},"args":[{"name":"reject-review"}]},"setup-gcp":{"id":"setup-gcp","description":"Setup GCP service account impersonation","pluginName":"rnbuilder","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"setup":{"id":"setup","description":"Setup new client","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder build\nhello world from ./src/setup.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"setup"}]},"submit-review":{"id":"submit-review","description":"Submit ios for review","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder submit-review\n Push changes to existing apps ./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 push update"}},"args":[{"name":"submit-review"}]},"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"}]}}}
1
+ {"version":"0.6.82","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","android,ios"]},"env":{"name":"env","type":"option","char":"e","description":"Set the environment: prod, staging, dev"},"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"},"distribute":{"name":"distribute","type":"option","char":"d","description":"Specify where to distribute app"},"firebase":{"name":"firebase","type":"boolean","char":"f","description":"If enabled, the build will be uploaded to firebase","allowNo":false},"testersIos":{"name":"testersIos","type":"option","char":"t","description":"Tester ids for iOS distribution"},"testersAndroid":{"name":"testersAndroid","type":"option","char":"u","description":"Tester ids for Android distribution"},"gitReset":{"name":"gitReset","type":"boolean","char":"g","description":"Do git reset when building","allowNo":false},"cleanup":{"name":"cleanup","type":"boolean","char":"s","description":"Do cleanup when building","allowNo":false},"groupsIos":{"name":"groupsIos","type":"option","description":"Groups ids for iOS distribution"},"groupsAndroid":{"name":"groupsAndroid","type":"option","description":"Groups ids for Android distribution"},"skipCheckVersion":{"name":"skipCheckVersion","type":"boolean","description":"Skip checking current version on stores","allowNo":false},"install":{"name":"install","type":"boolean","char":"n","description":"Install dependencies before building","allowNo":false}},"args":[{"name":"build"}]},"check-version":{"id":"check-version","description":"Check live versions","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder check-version\n Nuke certificates ./src/match-check.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":"match-check"}]},"codepush":{"id":"codepush","description":"Push changes to existing apps","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder codepush\n Push changes to existing apps ./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 push update"}},"args":[{"name":"build"}]},"google-key":{"id":"google-key","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-check\n Nuke certificates ./src/match-check.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":"match-check"}]},"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":[]},"match-check":{"id":"match-check","description":"Check match certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-check\n Check match certificates ./src/match-check.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 check match certificates"}},"args":[{"name":"match-check"}]},"match-nuke":{"id":"match-nuke","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-nuke\n Nuke certificates ./src/match-nuke.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"}]},"reject-review":{"id":"reject-review","description":"Reject current App Store review version (In Review or Pending Developer Release)","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder reject-review\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 to reject App Store review version"}},"args":[{"name":"reject-review"}]},"setup-gcp":{"id":"setup-gcp","description":"Setup GCP service account impersonation","pluginName":"rnbuilder","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"setup":{"id":"setup","description":"Setup new client","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder build\nhello world from ./src/setup.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"setup"}]},"submit-review":{"id":"submit-review","description":"Submit ios for review","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder submit-review\n Push changes to existing apps ./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 push update"}},"args":[{"name":"submit-review"}]},"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.6.81",
4
+ "version": "0.6.82",
5
5
  "author": "Tuan Luong @r0b0t3d",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/r0b0t3d/rnbuilder/issues",
@@ -1,17 +0,0 @@
1
- import { Command, flags } from '@oclif/command';
2
- export default class OneSignalCertificate 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
- auth_token: flags.IOptionFlag<string | undefined>;
9
- android_token: flags.IOptionFlag<string | undefined>;
10
- android_gcm_sender_id: flags.IOptionFlag<string | undefined>;
11
- };
12
- static args: {
13
- name: string;
14
- }[];
15
- askForMissingFields: (flags: any) => Promise<any>;
16
- run(): Promise<void>;
17
- }
@@ -1,85 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /* eslint-disable no-negated-condition */
5
- const command_1 = require("@oclif/command");
6
- const shell = require("shelljs");
7
- const inquirer = require("inquirer");
8
- const common_1 = require("../utils/common");
9
- inquirer.registerPrompt('checkbox-plus', require('inquirer-checkbox-plus-prompt'));
10
- class OneSignalCertificate extends command_1.Command {
11
- constructor() {
12
- super(...arguments);
13
- this.askForMissingFields = async (flags) => {
14
- const questions = [];
15
- if (!flags.client) {
16
- const clients = common_1.getDirectories('./fastlane/clients');
17
- if (clients.length > 0) {
18
- questions.push({
19
- type: 'checkbox-plus',
20
- name: 'client',
21
- message: 'What is the client?',
22
- pageSize: 100,
23
- highlight: true,
24
- searchable: true,
25
- default: [],
26
- source: (answersSoFar, input) => {
27
- input = input || '';
28
- return new Promise(resolve => {
29
- const result = clients.filter(client => client.includes(input.toLowerCase()));
30
- resolve(result);
31
- });
32
- },
33
- validate: (input) => {
34
- return new Promise(resolve => {
35
- if (input.length === 0) {
36
- resolve('You need to select at least 1 client');
37
- }
38
- else {
39
- resolve(true);
40
- }
41
- });
42
- },
43
- });
44
- }
45
- }
46
- let result = flags;
47
- if (questions.length > 0) {
48
- const answers = await inquirer.prompt(questions);
49
- result = Object.assign(Object.assign({}, flags), answers);
50
- }
51
- return result;
52
- };
53
- }
54
- async run() {
55
- const { flags } = this.parse(OneSignalCertificate);
56
- const params = await this.askForMissingFields(flags);
57
- const { client } = params, otherParams = tslib_1.__rest(params, ["client"]);
58
- const parameters = common_1.buildKeyValuePairs(otherParams);
59
- shell.exec('bundle install');
60
- if (client) {
61
- shell.cd(`fastlane/clients/${client}`);
62
- }
63
- shell.exec(`bundle exec fastlane sync_onesignal ${parameters.join(' ')}`);
64
- }
65
- }
66
- exports.default = OneSignalCertificate;
67
- OneSignalCertificate.description = 'Create and upload push cerfiticate to One Signal';
68
- OneSignalCertificate.examples = [
69
- `$ rnbuilder onesignal
70
- Create and upload push certificate to One Signal from ./src/commands/onesignal.ts!
71
- `,
72
- ];
73
- OneSignalCertificate.flags = {
74
- help: command_1.flags.help({ char: 'h' }),
75
- client: command_1.flags.string({
76
- char: 'c',
77
- description: 'Select client that you want to sync udids',
78
- }),
79
- auth_token: command_1.flags.string({
80
- description: 'Auth token for OneSignal',
81
- }),
82
- android_token: command_1.flags.string(),
83
- android_gcm_sender_id: command_1.flags.string(),
84
- };
85
- OneSignalCertificate.args = [{ name: 'build' }];