rnbuilder 0.5.23 → 0.5.25
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 +25 -6
- package/lib/commands/build.js +51 -22
- package/lib/commands/codepush.js +10 -5
- package/lib/commands/match-nuke.js +6 -3
- package/lib/commands/setup.d.ts +12 -0
- package/lib/commands/setup.js +112 -0
- package/lib/commands/sync-udids.js +6 -3
- package/lib/{utils.d.ts → utils/common.d.ts} +3 -0
- package/lib/{utils.js → utils/common.js} +19 -4
- package/lib/utils/env.d.ts +20 -0
- package/lib/utils/env.js +62 -0
- package/lib/utils/setup/app-icon.d.ts +1 -0
- package/lib/utils/setup/app-icon.js +31 -0
- package/lib/utils/setup/apple.d.ts +1 -0
- package/lib/utils/setup/apple.js +37 -0
- package/lib/utils/setup/client.d.ts +3 -0
- package/lib/utils/setup/client.js +35 -0
- package/lib/utils/setup/fastlane.d.ts +4 -0
- package/lib/utils/setup/fastlane.js +43 -0
- package/lib/utils/setup/launch-screen.d.ts +4 -0
- package/lib/utils/setup/launch-screen.js +100 -0
- package/lib/utils/setup/onesignal.d.ts +3 -0
- package/lib/utils/setup/onesignal.js +13 -0
- package/oclif.manifest.json +1 -1
- package/package.json +5 -3
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.5.
|
|
23
|
+
rnbuilder/0.5.25 darwin-arm64 node-v16.19.0
|
|
24
24
|
$ rnbuilder --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ rnbuilder COMMAND
|
|
@@ -34,6 +34,7 @@ USAGE
|
|
|
34
34
|
* [`rnbuilder help [COMMAND]`](#rnbuilder-help-command)
|
|
35
35
|
* [`rnbuilder initialize`](#rnbuilder-initialize)
|
|
36
36
|
* [`rnbuilder match-nuke [BUILD]`](#rnbuilder-match-nuke-build)
|
|
37
|
+
* [`rnbuilder setup [SETUP]`](#rnbuilder-setup-setup)
|
|
37
38
|
* [`rnbuilder sync-udids [BUILD]`](#rnbuilder-sync-udids-build)
|
|
38
39
|
|
|
39
40
|
## `rnbuilder build [BUILD]`
|
|
@@ -58,7 +59,7 @@ EXAMPLE
|
|
|
58
59
|
hello world from ./src/build.ts!
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
62
|
+
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.25/src/commands/build.ts)_
|
|
62
63
|
|
|
63
64
|
## `rnbuilder codepush [BUILD]`
|
|
64
65
|
|
|
@@ -77,7 +78,7 @@ EXAMPLE
|
|
|
77
78
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
81
|
+
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.25/src/commands/codepush.ts)_
|
|
81
82
|
|
|
82
83
|
## `rnbuilder help [COMMAND]`
|
|
83
84
|
|
|
@@ -109,7 +110,7 @@ EXAMPLE
|
|
|
109
110
|
initialize environment for first run from ./src/initialize.ts!
|
|
110
111
|
```
|
|
111
112
|
|
|
112
|
-
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
113
|
+
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.25/src/commands/initialize.ts)_
|
|
113
114
|
|
|
114
115
|
## `rnbuilder match-nuke [BUILD]`
|
|
115
116
|
|
|
@@ -128,7 +129,25 @@ EXAMPLE
|
|
|
128
129
|
Nuke certificates ./src/match-nuke.ts!
|
|
129
130
|
```
|
|
130
131
|
|
|
131
|
-
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
132
|
+
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.25/src/commands/match-nuke.ts)_
|
|
133
|
+
|
|
134
|
+
## `rnbuilder setup [SETUP]`
|
|
135
|
+
|
|
136
|
+
Setup new client
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
USAGE
|
|
140
|
+
$ rnbuilder setup [SETUP]
|
|
141
|
+
|
|
142
|
+
OPTIONS
|
|
143
|
+
-h, --help show CLI help
|
|
144
|
+
|
|
145
|
+
EXAMPLE
|
|
146
|
+
$ rnbuilder build
|
|
147
|
+
hello world from ./src/setup.ts!
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.25/src/commands/setup.ts)_
|
|
132
151
|
|
|
133
152
|
## `rnbuilder sync-udids [BUILD]`
|
|
134
153
|
|
|
@@ -147,5 +166,5 @@ EXAMPLE
|
|
|
147
166
|
Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
|
|
148
167
|
```
|
|
149
168
|
|
|
150
|
-
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
169
|
+
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.25/src/commands/sync-udids.ts)_
|
|
151
170
|
<!-- commandsstop -->
|
package/lib/commands/build.js
CHANGED
|
@@ -6,7 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const command_1 = require("@oclif/command");
|
|
7
7
|
const inquirer = require("inquirer");
|
|
8
8
|
const shell = require("shelljs");
|
|
9
|
-
const
|
|
9
|
+
const common_1 = require("../utils/common");
|
|
10
10
|
inquirer.registerPrompt('checkbox-plus', require('inquirer-checkbox-plus-prompt'));
|
|
11
11
|
class Build extends command_1.Command {
|
|
12
12
|
constructor() {
|
|
@@ -14,7 +14,7 @@ class Build extends command_1.Command {
|
|
|
14
14
|
this.askForMissingFields = async (flags) => {
|
|
15
15
|
let questions = [];
|
|
16
16
|
if (!flags.client) {
|
|
17
|
-
const clients =
|
|
17
|
+
const clients = common_1.getDirectories('./fastlane/clients');
|
|
18
18
|
if (clients.length > 0) {
|
|
19
19
|
questions.push({
|
|
20
20
|
type: 'checkbox-plus',
|
|
@@ -133,33 +133,42 @@ class Build extends command_1.Command {
|
|
|
133
133
|
result = Object.assign(Object.assign({}, result), answers);
|
|
134
134
|
}
|
|
135
135
|
if (result.installr || result.firebase) {
|
|
136
|
-
const testersAnswer = await inquirer.prompt([
|
|
136
|
+
const testersAnswer = await inquirer.prompt([
|
|
137
|
+
{
|
|
137
138
|
type: 'expand',
|
|
138
139
|
name: 'testers',
|
|
139
140
|
message: 'Add testers to download the app?',
|
|
140
|
-
choices: [
|
|
141
|
+
choices: [
|
|
142
|
+
{
|
|
141
143
|
key: 'g',
|
|
142
144
|
name: 'Test groups',
|
|
143
145
|
value: 'groups',
|
|
144
|
-
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
145
148
|
key: 't',
|
|
146
149
|
name: 'Tester emails',
|
|
147
150
|
value: 'testers',
|
|
148
|
-
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
149
153
|
key: 'n',
|
|
150
154
|
name: 'No',
|
|
151
155
|
value: 'no-tester',
|
|
152
|
-
}
|
|
156
|
+
},
|
|
157
|
+
],
|
|
153
158
|
default: 'no-tester',
|
|
154
|
-
}
|
|
159
|
+
},
|
|
160
|
+
]);
|
|
155
161
|
if (testersAnswer.testers) {
|
|
156
162
|
if (testersAnswer.testers !== 'no-tester') {
|
|
157
|
-
const answers = await inquirer.prompt([
|
|
163
|
+
const answers = await inquirer.prompt([
|
|
164
|
+
{
|
|
158
165
|
type: 'input',
|
|
159
166
|
name: 'testers',
|
|
160
|
-
message: 'Please enter tester ' +
|
|
167
|
+
message: 'Please enter tester ' +
|
|
168
|
+
(testersAnswer.testers === 'groups' ? 'group(s)' : 'email(s)'),
|
|
161
169
|
suffix: ' (separated by commas)',
|
|
162
|
-
}
|
|
170
|
+
},
|
|
171
|
+
]);
|
|
163
172
|
result = Object.assign(Object.assign({}, result), { [testersAnswer.testers]: answers.testers });
|
|
164
173
|
}
|
|
165
174
|
}
|
|
@@ -187,7 +196,7 @@ class Build extends command_1.Command {
|
|
|
187
196
|
const params = await this.askForMissingFields(flags);
|
|
188
197
|
const { client, target } = params, otherParams = tslib_1.__rest(params, ["client", "target"]);
|
|
189
198
|
const jsonFile = this.getJsonFile(otherParams.env);
|
|
190
|
-
const parameters =
|
|
199
|
+
const parameters = common_1.buildKeyValuePairs(Object.assign(Object.assign({}, otherParams), { json_file: jsonFile }));
|
|
191
200
|
shell.exec(`git reset --hard && git checkout ${params.branch} && git pull`);
|
|
192
201
|
shell.cd('fastlane');
|
|
193
202
|
shell.exec('bundle update --bundler');
|
|
@@ -195,6 +204,9 @@ class Build extends command_1.Command {
|
|
|
195
204
|
shell.exec('bundle update fastlane');
|
|
196
205
|
shell.exec('bundle update cocoapods');
|
|
197
206
|
shell.cd('../');
|
|
207
|
+
shell.exec('yarn install && npx pod-install');
|
|
208
|
+
// Clean fastlane builds
|
|
209
|
+
shell.exec('rm -rf fastlane/builds');
|
|
198
210
|
// Clean android if any
|
|
199
211
|
if (target.includes('android')) {
|
|
200
212
|
shell.cd('./android');
|
|
@@ -205,10 +217,7 @@ class Build extends command_1.Command {
|
|
|
205
217
|
client.forEach((c) => {
|
|
206
218
|
shell.cd(`fastlane/clients/${c}`);
|
|
207
219
|
shell.exec('pwd');
|
|
208
|
-
this.runPlatforms(target, [
|
|
209
|
-
...parameters,
|
|
210
|
-
`client:${c}`,
|
|
211
|
-
], otherParams);
|
|
220
|
+
this.runPlatforms(target, [...parameters, `client:${c}`], otherParams);
|
|
212
221
|
shell.cd('../../..');
|
|
213
222
|
shell.exec('pwd');
|
|
214
223
|
});
|
|
@@ -228,11 +237,31 @@ hello world from ./src/build.ts!
|
|
|
228
237
|
];
|
|
229
238
|
Build.flags = {
|
|
230
239
|
help: command_1.flags.help({ char: 'h' }),
|
|
231
|
-
client: command_1.flags.string({
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
240
|
+
client: command_1.flags.string({
|
|
241
|
+
char: 'c',
|
|
242
|
+
description: 'Set client that you want to build app',
|
|
243
|
+
}),
|
|
244
|
+
target: command_1.flags.string({
|
|
245
|
+
char: 't',
|
|
246
|
+
description: 'Set the build target: android, ios or both',
|
|
247
|
+
options: ['android', 'ios'],
|
|
248
|
+
}),
|
|
249
|
+
env: command_1.flags.string({
|
|
250
|
+
char: 'e',
|
|
251
|
+
description: 'Set the environment: prod, adhoc, staging',
|
|
252
|
+
options: ['staging', 'adhoc', 'prod'],
|
|
253
|
+
}),
|
|
254
|
+
branch: command_1.flags.string({
|
|
255
|
+
char: 'b',
|
|
256
|
+
description: 'Set the source branch used to build the app',
|
|
257
|
+
}),
|
|
258
|
+
version: command_1.flags.string({
|
|
259
|
+
char: 'v',
|
|
260
|
+
description: 'Set the version number for this build',
|
|
261
|
+
}),
|
|
262
|
+
installr: command_1.flags.string({
|
|
263
|
+
char: 'i',
|
|
264
|
+
description: 'If enabled, the build will be uploaded to installR',
|
|
265
|
+
}),
|
|
237
266
|
};
|
|
238
267
|
Build.args = [{ name: 'build' }];
|
package/lib/commands/codepush.js
CHANGED
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const command_1 = require("@oclif/command");
|
|
5
5
|
const shell = require("shelljs");
|
|
6
6
|
const inquirer = require("inquirer");
|
|
7
|
-
const
|
|
7
|
+
const common_1 = require("../utils/common");
|
|
8
8
|
class CodePush extends command_1.Command {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.askForMissingFields = async (flags) => {
|
|
12
12
|
const questions = [];
|
|
13
13
|
if (!flags.client) {
|
|
14
|
-
const clients =
|
|
14
|
+
const clients = common_1.getDirectories('./fastlane/clients');
|
|
15
15
|
if (clients.length > 0) {
|
|
16
16
|
questions.push({
|
|
17
17
|
type: 'list',
|
|
@@ -58,9 +58,11 @@ class CodePush extends command_1.Command {
|
|
|
58
58
|
if (client) {
|
|
59
59
|
envPath += `/clients/${client}/fastlane`;
|
|
60
60
|
}
|
|
61
|
-
const appVersion =
|
|
61
|
+
const appVersion = common_1.getAppVersion(env, client, target);
|
|
62
62
|
require('dotenv').config({ path: process.cwd() + '/' + envPath + '/.env' });
|
|
63
|
-
const project = target === 'ios'
|
|
63
|
+
const project = target === 'ios'
|
|
64
|
+
? process.env.CODE_PUSH_IOS_PROJECT
|
|
65
|
+
: process.env.CODE_PUSH_ANDROID_PROJECT;
|
|
64
66
|
shell.exec(`appcenter codepush release-react -a ${project} -d ${env === 'staging' ? 'Staging' : 'Production'} --target-binary-version ${appVersion.version} --token ${process.env.CODE_PUSH_TOKEN}`);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -73,6 +75,9 @@ CodePush.examples = [
|
|
|
73
75
|
];
|
|
74
76
|
CodePush.flags = {
|
|
75
77
|
help: command_1.flags.help({ char: 'h' }),
|
|
76
|
-
client: command_1.flags.string({
|
|
78
|
+
client: command_1.flags.string({
|
|
79
|
+
char: 'c',
|
|
80
|
+
description: 'Select client that you want to push update',
|
|
81
|
+
}),
|
|
77
82
|
};
|
|
78
83
|
CodePush.args = [{ name: 'build' }];
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const command_1 = require("@oclif/command");
|
|
5
5
|
const shell = require("shelljs");
|
|
6
6
|
const inquirer = require("inquirer");
|
|
7
|
-
const
|
|
7
|
+
const common_1 = require("../utils/common");
|
|
8
8
|
class MatchNuke extends command_1.Command {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.askForMissingFields = async (flags) => {
|
|
12
12
|
const questions = [];
|
|
13
13
|
if (!flags.client) {
|
|
14
|
-
const clients =
|
|
14
|
+
const clients = common_1.getDirectories('./fastlane/clients');
|
|
15
15
|
if (clients.length > 0) {
|
|
16
16
|
questions.push({
|
|
17
17
|
type: 'list',
|
|
@@ -52,6 +52,9 @@ MatchNuke.examples = [
|
|
|
52
52
|
];
|
|
53
53
|
MatchNuke.flags = {
|
|
54
54
|
help: command_1.flags.help({ char: 'h' }),
|
|
55
|
-
client: command_1.flags.string({
|
|
55
|
+
client: command_1.flags.string({
|
|
56
|
+
char: 'c',
|
|
57
|
+
description: 'Select client that you want to sync udids',
|
|
58
|
+
}),
|
|
56
59
|
};
|
|
57
60
|
MatchNuke.args = [{ name: 'build' }];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@oclif/command';
|
|
2
|
+
export default class Setup extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
7
|
+
};
|
|
8
|
+
static args: {
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable complexity */
|
|
4
|
+
/* eslint-disable no-negated-condition */
|
|
5
|
+
const command_1 = require("@oclif/command");
|
|
6
|
+
const inquirer = require("inquirer");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const app_icon_1 = require("../utils/setup/app-icon");
|
|
9
|
+
const launch_screen_1 = require("../utils/setup/launch-screen");
|
|
10
|
+
const client_1 = require("../utils/setup/client");
|
|
11
|
+
const env_1 = require("../utils/env");
|
|
12
|
+
const apple_1 = require("../utils/setup/apple");
|
|
13
|
+
const onesignal_1 = require("../utils/setup/onesignal");
|
|
14
|
+
const common_1 = require("../utils/common");
|
|
15
|
+
const fastlane_1 = require("../utils/setup/fastlane");
|
|
16
|
+
class Setup extends command_1.Command {
|
|
17
|
+
async run() {
|
|
18
|
+
const envVars = env_1.readEnvVars(path.join(process.cwd(), 'template/env.template'));
|
|
19
|
+
const questions = [
|
|
20
|
+
{
|
|
21
|
+
type: 'input',
|
|
22
|
+
name: 'client',
|
|
23
|
+
message: 'What is client name (slug)?',
|
|
24
|
+
validate: (input) => {
|
|
25
|
+
return new Promise(resolve => {
|
|
26
|
+
if (!input) {
|
|
27
|
+
resolve('You need to input client');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
resolve(true);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
const { client } = await inquirer.prompt(questions);
|
|
37
|
+
const { bundleId, applicationId, appName } = await client_1.createClientConfig(client);
|
|
38
|
+
env_1.setEnvValue('CLIENT', client, envVars);
|
|
39
|
+
env_1.setEnvValue('BUNDLE_ID', bundleId, envVars);
|
|
40
|
+
env_1.setEnvValue('APPLICATION_ID', applicationId, envVars);
|
|
41
|
+
const deeplinkHost = envVars.DEEP_LINK_HOST.value.replace('[client]', client);
|
|
42
|
+
env_1.setEnvValue('DEEP_LINK_HOST', deeplinkHost, envVars);
|
|
43
|
+
const { appleTeamId, itcTeamId } = await apple_1.getAppleTeam();
|
|
44
|
+
if (appleTeamId) {
|
|
45
|
+
env_1.setEnvValue('APPLE_TEAM_ID', appleTeamId, envVars);
|
|
46
|
+
}
|
|
47
|
+
const iosAssetFolder = path.join(process.cwd(), `/ios/edular/assets/${client}`);
|
|
48
|
+
const androidAssetFolder = path.join(process.cwd(), `/android/app/src/${client}/res`);
|
|
49
|
+
// Create client env files
|
|
50
|
+
// shell.exec(`mkdir configs/${client}`);
|
|
51
|
+
await app_icon_1.prepareAppIcon({
|
|
52
|
+
iosAssetFolder,
|
|
53
|
+
});
|
|
54
|
+
const { launchScreen, launchScreenColor } = await launch_screen_1.prepareLaunchScreen({
|
|
55
|
+
iosAssetFolder,
|
|
56
|
+
androidAssetFolder,
|
|
57
|
+
});
|
|
58
|
+
if (launchScreen) {
|
|
59
|
+
env_1.setEnvValue('LAUNCH_SCREEN', launchScreen === 'icon' ? 'IconBootSplash' : 'FullScreenBootSplash', envVars);
|
|
60
|
+
}
|
|
61
|
+
if (launchScreenColor) {
|
|
62
|
+
env_1.setEnvValue('LAUNCH_SCREEN_BACKGROUND_COLOR', launchScreenColor, envVars);
|
|
63
|
+
}
|
|
64
|
+
// Onesignal
|
|
65
|
+
const { onesignal } = await onesignal_1.prepareOneSignal();
|
|
66
|
+
if (onesignal) {
|
|
67
|
+
env_1.setEnvValue('ONESIGNAL_APP_ID', onesignal, envVars);
|
|
68
|
+
}
|
|
69
|
+
// Store dev env
|
|
70
|
+
env_1.setEnvValue('ENV', 'dev', envVars);
|
|
71
|
+
const devEnvVars = env_1.updateServiceDomain(envVars, 'app');
|
|
72
|
+
env_1.setEnvValue('APP_NAME', `${appName} Dev`, devEnvVars);
|
|
73
|
+
env_1.saveEnvValues(devEnvVars, path.join(process.cwd(), `/configs/${client}/.env.dev`));
|
|
74
|
+
// Store staging env
|
|
75
|
+
env_1.setEnvValue('ENV', 'staging', envVars);
|
|
76
|
+
const stagingEnvVars = env_1.updateServiceDomain(envVars, 'app');
|
|
77
|
+
env_1.setEnvValue('APP_NAME', `${appName} Staging`, stagingEnvVars);
|
|
78
|
+
env_1.saveEnvValues(stagingEnvVars, path.join(process.cwd(), `/configs/${client}/.env.staging`));
|
|
79
|
+
// Store prod env
|
|
80
|
+
env_1.setEnvValue('ENV', 'prod', envVars);
|
|
81
|
+
const prodEnvVars = env_1.updateServiceDomain(envVars, 'app');
|
|
82
|
+
env_1.setEnvValue('APP_NAME', appName, prodEnvVars);
|
|
83
|
+
env_1.saveEnvValues(prodEnvVars, path.join(process.cwd(), `/configs/${client}/.env.prod`));
|
|
84
|
+
// Setup fastlane
|
|
85
|
+
const { firebaseIosApp, firebaseAndroidApp } = await fastlane_1.setupFastlane({
|
|
86
|
+
client,
|
|
87
|
+
});
|
|
88
|
+
const fastlaneDir = path.join(process.cwd(), `fastlane/${client}/fastlane`);
|
|
89
|
+
const fastlaneEnvVars = env_1.readEnvVars(path.join(fastlaneDir, '/.env'));
|
|
90
|
+
env_1.setEnvValue('CLIENT', client, fastlaneEnvVars);
|
|
91
|
+
env_1.setEnvValue('APP_IDENTIFIER', bundleId, fastlaneEnvVars);
|
|
92
|
+
env_1.setEnvValue('APP_NAME', appName, fastlaneEnvVars);
|
|
93
|
+
env_1.setEnvValue('XCODEPROJ_SCHEME', `${client} prod`, fastlaneEnvVars);
|
|
94
|
+
env_1.setEnvValue('APPLE_TEAM_ID', appleTeamId, fastlaneEnvVars);
|
|
95
|
+
env_1.setEnvValue('ITC_TEAM_ID', itcTeamId, fastlaneEnvVars);
|
|
96
|
+
env_1.setEnvValue('FLAVOR', common_1.capitalize(client), fastlaneEnvVars);
|
|
97
|
+
env_1.setEnvValue('FIREBASE_IOS_APP', firebaseIosApp, fastlaneEnvVars);
|
|
98
|
+
env_1.setEnvValue('FIREBASE_ANDROID_APP', firebaseAndroidApp, fastlaneEnvVars);
|
|
99
|
+
env_1.saveEnvValues(fastlaneEnvVars, fastlaneDir + '/.env');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.default = Setup;
|
|
103
|
+
Setup.description = 'Setup new client';
|
|
104
|
+
Setup.examples = [
|
|
105
|
+
`$ rnbuilder build
|
|
106
|
+
hello world from ./src/setup.ts!
|
|
107
|
+
`,
|
|
108
|
+
];
|
|
109
|
+
Setup.flags = {
|
|
110
|
+
help: command_1.flags.help({ char: 'h' }),
|
|
111
|
+
};
|
|
112
|
+
Setup.args = [{ name: 'setup' }];
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const command_1 = require("@oclif/command");
|
|
5
5
|
const shell = require("shelljs");
|
|
6
6
|
const inquirer = require("inquirer");
|
|
7
|
-
const
|
|
7
|
+
const common_1 = require("../utils/common");
|
|
8
8
|
class FirebaseSyncUDIDs extends command_1.Command {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.askForMissingFields = async (flags) => {
|
|
12
12
|
const questions = [];
|
|
13
13
|
if (!flags.client) {
|
|
14
|
-
const clients =
|
|
14
|
+
const clients = common_1.getDirectories('./fastlane/clients');
|
|
15
15
|
if (clients.length > 0) {
|
|
16
16
|
questions.push({
|
|
17
17
|
type: 'list',
|
|
@@ -50,6 +50,9 @@ FirebaseSyncUDIDs.examples = [
|
|
|
50
50
|
];
|
|
51
51
|
FirebaseSyncUDIDs.flags = {
|
|
52
52
|
help: command_1.flags.help({ char: 'h' }),
|
|
53
|
-
client: command_1.flags.string({
|
|
53
|
+
client: command_1.flags.string({
|
|
54
|
+
char: 'c',
|
|
55
|
+
description: 'Select client that you want to sync udids',
|
|
56
|
+
}),
|
|
54
57
|
};
|
|
55
58
|
FirebaseSyncUDIDs.args = [{ name: 'build' }];
|
|
@@ -4,3 +4,6 @@ export declare const getAppVersion: (env: string, client?: string | undefined, t
|
|
|
4
4
|
version: string;
|
|
5
5
|
build: number;
|
|
6
6
|
};
|
|
7
|
+
export declare const copyDir: (src: string, dest: string) => Promise<unknown>;
|
|
8
|
+
export declare const normalise: (input: string) => string;
|
|
9
|
+
export declare const capitalize: (string: string) => string;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAppVersion = exports.getDirectories = exports.buildKeyValuePairs = void 0;
|
|
3
|
+
exports.capitalize = exports.normalise = exports.copyDir = exports.getAppVersion = exports.getDirectories = exports.buildKeyValuePairs = void 0;
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
exports.buildKeyValuePairs = (params) => Object.keys(params).map(key => `${key}:${params[key]}`);
|
|
6
6
|
exports.getDirectories = (path) => {
|
|
7
7
|
try {
|
|
8
|
-
const directories = fs
|
|
8
|
+
const directories = fs
|
|
9
|
+
.readdirSync(path)
|
|
10
|
+
.filter(file => fs.statSync(`${path}/${file}`).isDirectory());
|
|
9
11
|
return directories;
|
|
10
12
|
}
|
|
11
|
-
catch (error) {
|
|
12
|
-
}
|
|
13
|
+
catch (error) { }
|
|
13
14
|
return [];
|
|
14
15
|
};
|
|
15
16
|
const defaultVersion = {
|
|
@@ -34,3 +35,17 @@ exports.getAppVersion = (env, client, target = 'ios') => {
|
|
|
34
35
|
}
|
|
35
36
|
return version;
|
|
36
37
|
};
|
|
38
|
+
exports.copyDir = (src, dest) => new Promise((resolve, reject) => {
|
|
39
|
+
fs.cp(src, dest, { recursive: true }, (err) => {
|
|
40
|
+
if (err) {
|
|
41
|
+
reject(err);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
resolve(true);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
exports.normalise = (input) => input.replace(/'/g, '').trim();
|
|
49
|
+
exports.capitalize = (string) => {
|
|
50
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
51
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const readEnvVars: (envFilePath: string) => any;
|
|
2
|
+
/**
|
|
3
|
+
* Updates value for existing key or creates a new key=value line
|
|
4
|
+
*
|
|
5
|
+
* This function is a modified version of https://stackoverflow.com/a/65001580/3153583
|
|
6
|
+
*
|
|
7
|
+
* @param {string} key Key to update/insert
|
|
8
|
+
* @param {string} value Value to update/insert
|
|
9
|
+
*/
|
|
10
|
+
export declare const saveEnvValues: (newValues: any, destFilePath: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Updates value for existing key or creates a new key=value line
|
|
13
|
+
*
|
|
14
|
+
* This function is a modified version of https://stackoverflow.com/a/65001580/3153583
|
|
15
|
+
*
|
|
16
|
+
* @param {string} key Key to update/insert
|
|
17
|
+
* @param {string} value Value to update/insert
|
|
18
|
+
*/
|
|
19
|
+
export declare const setEnvValue: (key: string, value: string, envVars: any) => void;
|
|
20
|
+
export declare const updateServiceDomain: (envVars: any, domain: string) => any[];
|
package/lib/utils/env.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateServiceDomain = exports.setEnvValue = exports.saveEnvValues = exports.readEnvVars = void 0;
|
|
4
|
+
/* eslint-disable no-negated-condition */
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const os = require("os");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
// read .env file & convert to array
|
|
9
|
+
exports.readEnvVars = (envFilePath) => {
|
|
10
|
+
const envVars = fs.readFileSync(envFilePath, 'utf-8').split(os.EOL);
|
|
11
|
+
const envObject = {};
|
|
12
|
+
envVars.forEach((line, index) => {
|
|
13
|
+
if (!line) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const result = line.split('=');
|
|
17
|
+
envObject[result[0]] = {
|
|
18
|
+
key: result[0],
|
|
19
|
+
value: result[1],
|
|
20
|
+
order: index,
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
return envObject;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Updates value for existing key or creates a new key=value line
|
|
27
|
+
*
|
|
28
|
+
* This function is a modified version of https://stackoverflow.com/a/65001580/3153583
|
|
29
|
+
*
|
|
30
|
+
* @param {string} key Key to update/insert
|
|
31
|
+
* @param {string} value Value to update/insert
|
|
32
|
+
*/
|
|
33
|
+
exports.saveEnvValues = (newValues, destFilePath) => {
|
|
34
|
+
const payload = Object.values(newValues)
|
|
35
|
+
.sort((a, b) => a.order - b.order)
|
|
36
|
+
.map((data) => `${data.key}=${data.value}`);
|
|
37
|
+
// write everything back to the file system
|
|
38
|
+
const dirname = path.dirname(destFilePath);
|
|
39
|
+
fs.mkdirSync(dirname, { recursive: true });
|
|
40
|
+
fs.writeFileSync(destFilePath, payload.join(os.EOL));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Updates value for existing key or creates a new key=value line
|
|
44
|
+
*
|
|
45
|
+
* This function is a modified version of https://stackoverflow.com/a/65001580/3153583
|
|
46
|
+
*
|
|
47
|
+
* @param {string} key Key to update/insert
|
|
48
|
+
* @param {string} value Value to update/insert
|
|
49
|
+
*/
|
|
50
|
+
exports.setEnvValue = (key, value, envVars) => {
|
|
51
|
+
envVars[key] = Object.assign(Object.assign({}, envVars[key]), { value });
|
|
52
|
+
};
|
|
53
|
+
exports.updateServiceDomain = (envVars, domain) => {
|
|
54
|
+
return Object.keys(envVars).map(key => {
|
|
55
|
+
var _a;
|
|
56
|
+
const data = envVars[key];
|
|
57
|
+
if ((_a = data.value) === null || _a === void 0 ? void 0 : _a.includes('[domain]')) {
|
|
58
|
+
return Object.assign(Object.assign({}, data), { value: data.value.replace('[domain]', domain) });
|
|
59
|
+
}
|
|
60
|
+
return data;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const prepareAppIcon: ({ iosAssetFolder }: any) => Promise<void>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareAppIcon = void 0;
|
|
4
|
+
const inquirer = require("inquirer");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const sharp = require("sharp");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
exports.prepareAppIcon = async ({ iosAssetFolder }) => {
|
|
9
|
+
const questions = [
|
|
10
|
+
{
|
|
11
|
+
type: 'confirm',
|
|
12
|
+
name: 'android-icon',
|
|
13
|
+
message: 'It is recommend to use Android Studio to create App icon and notification icon for android',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: 'input',
|
|
17
|
+
name: 'appIconFile',
|
|
18
|
+
message: 'App Icon file for iOS?',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
const { appIconFile } = await inquirer.prompt(questions);
|
|
22
|
+
if (appIconFile) {
|
|
23
|
+
// Generate app icon for ios
|
|
24
|
+
// Copy template files
|
|
25
|
+
await common_1.copyDir('./template/AppIcon.appiconset', path.join(iosAssetFolder, 'AppIcon.appiconset'));
|
|
26
|
+
await sharp(common_1.normalise(appIconFile))
|
|
27
|
+
.resize(1024, 1024)
|
|
28
|
+
.png()
|
|
29
|
+
.toFile(path.join(iosAssetFolder, 'AppIcon.appiconset/ItunesArtwork@2x.png'));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getAppleTeam: () => Promise<any>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAppleTeam = void 0;
|
|
4
|
+
const inquirer = require("inquirer");
|
|
5
|
+
const shell = require("shelljs");
|
|
6
|
+
exports.getAppleTeam = async () => {
|
|
7
|
+
const { account } = await inquirer.prompt([
|
|
8
|
+
{
|
|
9
|
+
type: 'input',
|
|
10
|
+
name: 'account',
|
|
11
|
+
message: 'What is Apple account?',
|
|
12
|
+
},
|
|
13
|
+
]);
|
|
14
|
+
if (!account) {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
const { team } = await inquirer.prompt([
|
|
18
|
+
{
|
|
19
|
+
type: 'input',
|
|
20
|
+
name: 'team',
|
|
21
|
+
message: 'What is Apple team name?',
|
|
22
|
+
},
|
|
23
|
+
]);
|
|
24
|
+
shell.exec(`fastlane get_team_names search:${team} id:${account}`);
|
|
25
|
+
return inquirer.prompt([
|
|
26
|
+
{
|
|
27
|
+
type: 'input',
|
|
28
|
+
name: 'appleTeamId',
|
|
29
|
+
message: 'What is Developer Team Id?',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'input',
|
|
33
|
+
name: 'itcTeamId',
|
|
34
|
+
message: 'What is Appstore Connect Team Id?',
|
|
35
|
+
},
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createClientConfig = void 0;
|
|
4
|
+
const inquirer = require("inquirer");
|
|
5
|
+
exports.createClientConfig = (client) => {
|
|
6
|
+
return inquirer.prompt([
|
|
7
|
+
{
|
|
8
|
+
type: 'confirm',
|
|
9
|
+
name: 'android-client',
|
|
10
|
+
message: `Please add **${client}** to **productFlavors** in android>app>build.gradle`,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: 'confirm',
|
|
14
|
+
name: 'ios-client',
|
|
15
|
+
message: `Please add **${client} prod** scheme and config`,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: 'input',
|
|
19
|
+
name: 'appName',
|
|
20
|
+
message: 'What is app name?',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'input',
|
|
24
|
+
name: 'bundleId',
|
|
25
|
+
message: 'What is bundle id?',
|
|
26
|
+
default: `com.edular.${client}`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: 'input',
|
|
30
|
+
name: 'applicationId',
|
|
31
|
+
message: 'What is application id (this is for android in case you need difference id for platforms)?',
|
|
32
|
+
default: `com.edular.${client}`,
|
|
33
|
+
},
|
|
34
|
+
]);
|
|
35
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupFastlane = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const inquirer = require("inquirer");
|
|
7
|
+
exports.setupFastlane = async ({ client }) => {
|
|
8
|
+
const fastlaneDir = path.join(process.cwd(), `fastlane/${client}/fastlane`);
|
|
9
|
+
// Copy template folders
|
|
10
|
+
await common_1.copyDir(path.join(process.cwd(), 'template/fastlane'), fastlaneDir);
|
|
11
|
+
const { firebaseServiceAccountFile, firebaseIosApp, firebaseAndroidApp, jsonKeyFile, } = inquirer.prompt([
|
|
12
|
+
{
|
|
13
|
+
type: 'input',
|
|
14
|
+
name: 'firebaseServiceAccountFile',
|
|
15
|
+
message: 'Firebase Service Account file?',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: 'input',
|
|
19
|
+
name: 'firebaseIosApp',
|
|
20
|
+
message: 'What is Firebase iOS App Id?',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'input',
|
|
24
|
+
name: 'firebaseAndroidApp',
|
|
25
|
+
message: 'What is Firebase Android App Id?',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'input',
|
|
29
|
+
name: 'jsonKeyFile',
|
|
30
|
+
message: 'Path to json file? See https://docs.fastlane.tools/actions/supply/#setup',
|
|
31
|
+
},
|
|
32
|
+
]);
|
|
33
|
+
if (firebaseServiceAccountFile) {
|
|
34
|
+
await common_1.copyDir(common_1.normalise(firebaseServiceAccountFile), path.join(fastlaneDir, 'firebase.json'));
|
|
35
|
+
}
|
|
36
|
+
if (jsonKeyFile) {
|
|
37
|
+
await common_1.copyDir(common_1.normalise(jsonKeyFile), path.join(fastlaneDir, '../key.json'));
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
firebaseIosApp,
|
|
41
|
+
firebaseAndroidApp,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareLaunchScreen = void 0;
|
|
4
|
+
const sharp = require("sharp");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const inquirer = require("inquirer");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
exports.prepareLaunchScreen = async ({ iosAssetFolder, androidAssetFolder, }) => {
|
|
9
|
+
const questions = [
|
|
10
|
+
{
|
|
11
|
+
type: 'list',
|
|
12
|
+
name: 'launchScreen',
|
|
13
|
+
message: 'What is the launch screen?',
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
choices: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Icon in the middle',
|
|
18
|
+
value: 'icon',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Image fullscreen',
|
|
22
|
+
value: 'fullscreen',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'input',
|
|
28
|
+
name: 'launchScreenFile',
|
|
29
|
+
message: 'Launch screen file (1400 x1867 for fullscreen)?',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'input',
|
|
33
|
+
name: 'launchScreenColor',
|
|
34
|
+
message: 'Launch screen background hex color?',
|
|
35
|
+
default: '#ffffff',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
const { launchScreen, launchScreenFile, launchScreenColor } = await inquirer.prompt(questions);
|
|
39
|
+
const inputFile = common_1.normalise(launchScreenFile);
|
|
40
|
+
// Copy template files
|
|
41
|
+
if (launchScreen === 'icon') {
|
|
42
|
+
await common_1.copyDir('./template/BootSplashLogo.imageset', path.join(iosAssetFolder, 'BootSplashLogo.imageset'));
|
|
43
|
+
if (inputFile) {
|
|
44
|
+
await sharp(inputFile)
|
|
45
|
+
.resize(512, 512)
|
|
46
|
+
.png()
|
|
47
|
+
.toFile(path.join(iosAssetFolder, 'BootSplashLogo.imageset/bootsplash_logo.png'));
|
|
48
|
+
// iOS
|
|
49
|
+
await sharp(inputFile)
|
|
50
|
+
.resize({
|
|
51
|
+
width: 512,
|
|
52
|
+
})
|
|
53
|
+
.png()
|
|
54
|
+
.toFile(path.join(iosAssetFolder, 'BootSplashLogo.imageset/bootsplash_logo.png'));
|
|
55
|
+
// Android
|
|
56
|
+
await Promise.all([
|
|
57
|
+
sharp(inputFile)
|
|
58
|
+
.resize({
|
|
59
|
+
width: 1024,
|
|
60
|
+
})
|
|
61
|
+
.png()
|
|
62
|
+
.toFile(path.join(androidAssetFolder, 'mipmap-xxxhdpi/bootsplash_logo.png')),
|
|
63
|
+
sharp(inputFile)
|
|
64
|
+
.resize({
|
|
65
|
+
width: 768,
|
|
66
|
+
})
|
|
67
|
+
.png()
|
|
68
|
+
.toFile(path.join(androidAssetFolder, 'mipmap-xxhdpi/bootsplash_logo.png')),
|
|
69
|
+
sharp(inputFile)
|
|
70
|
+
.resize({
|
|
71
|
+
width: 512,
|
|
72
|
+
})
|
|
73
|
+
.png()
|
|
74
|
+
.toFile(path.join(androidAssetFolder, 'mipmap-xhdpi/bootsplash_logo.png')),
|
|
75
|
+
sharp(inputFile)
|
|
76
|
+
.resize({
|
|
77
|
+
width: 384,
|
|
78
|
+
})
|
|
79
|
+
.png()
|
|
80
|
+
.toFile(path.join(androidAssetFolder, 'mipmap-hdpi/bootsplash_logo.png')),
|
|
81
|
+
sharp(inputFile)
|
|
82
|
+
.resize({
|
|
83
|
+
width: 341,
|
|
84
|
+
})
|
|
85
|
+
.png()
|
|
86
|
+
.toFile(path.join(androidAssetFolder, 'mipmap-mdpi/bootsplash_logo.png')),
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else if (launchScreen === 'fullscreen') {
|
|
91
|
+
await common_1.copyDir('./template/BootSplashImage.imageset', path.join(iosAssetFolder, 'BootSplashImage.imageset'));
|
|
92
|
+
if (inputFile) {
|
|
93
|
+
await sharp(inputFile)
|
|
94
|
+
.resize(512, 512)
|
|
95
|
+
.png()
|
|
96
|
+
.toFile(path.join(iosAssetFolder, 'BootSplashImage.imageset/splashTablet.png'));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return { launchScreen, launchScreenColor };
|
|
100
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareOneSignal = void 0;
|
|
4
|
+
const inquirer = require("inquirer");
|
|
5
|
+
exports.prepareOneSignal = () => {
|
|
6
|
+
return inquirer.prompt([
|
|
7
|
+
{
|
|
8
|
+
type: 'input',
|
|
9
|
+
name: 'onesignal',
|
|
10
|
+
message: 'What is OneSignal App Id?',
|
|
11
|
+
},
|
|
12
|
+
]);
|
|
13
|
+
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.5.
|
|
1
|
+
{"version":"0.5.25","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"}]},"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"}]},"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-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"}]},"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"}]},"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.5.
|
|
4
|
+
"version": "0.5.25",
|
|
5
5
|
"author": "Tuan Luong @r0b0t3d",
|
|
6
6
|
"bin": {
|
|
7
7
|
"rnbuilder": "./bin/run"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dotenv": "^10.0.0",
|
|
15
15
|
"inquirer": "^8.0.0",
|
|
16
16
|
"inquirer-checkbox-plus-prompt": "^1.4.1",
|
|
17
|
+
"sharp": "^0.31.3",
|
|
17
18
|
"shelljs": "^0.8.4",
|
|
18
19
|
"tslib": "^1"
|
|
19
20
|
},
|
|
@@ -23,7 +24,8 @@
|
|
|
23
24
|
"@types/chai": "^4",
|
|
24
25
|
"@types/inquirer": "^7.3.1",
|
|
25
26
|
"@types/mocha": "^5",
|
|
26
|
-
"@types/node": "
|
|
27
|
+
"@types/node": "18.11.18",
|
|
28
|
+
"@types/sharp": "^0.31.1",
|
|
27
29
|
"@types/shelljs": "^0.8.8",
|
|
28
30
|
"chai": "^4",
|
|
29
31
|
"eslint": "^5.13",
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"typescript": "^3.3"
|
|
37
39
|
},
|
|
38
40
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
41
|
+
"node": ">=16.7.0"
|
|
40
42
|
},
|
|
41
43
|
"files": [
|
|
42
44
|
"/bin",
|