rnbuilder 0.6.82 → 0.6.83

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.82 darwin-arm64 node-v24.13.0
43
+ rnbuilder/0.6.83 darwin-arm64 node-v24.13.0
44
44
  $ rnbuilder --help [COMMAND]
45
45
  USAGE
46
46
  $ rnbuilder COMMAND
@@ -97,7 +97,7 @@ EXAMPLE
97
97
  hello world from ./src/build.ts!
98
98
  ```
99
99
 
100
- _See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/build.ts)_
100
+ _See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/build.ts)_
101
101
 
102
102
  ## `rnbuilder check-version [MATCH-CHECK]`
103
103
 
@@ -116,7 +116,7 @@ EXAMPLE
116
116
  Nuke certificates ./src/match-check.ts!
117
117
  ```
118
118
 
119
- _See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/check-version.ts)_
119
+ _See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/check-version.ts)_
120
120
 
121
121
  ## `rnbuilder codepush [BUILD]`
122
122
 
@@ -135,7 +135,7 @@ EXAMPLE
135
135
  Push changes to existing apps ./src/firebase-sync-udids.ts!
136
136
  ```
137
137
 
138
- _See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/codepush.ts)_
138
+ _See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/codepush.ts)_
139
139
 
140
140
  ## `rnbuilder google-key [MATCH-CHECK]`
141
141
 
@@ -154,7 +154,7 @@ EXAMPLE
154
154
  Nuke certificates ./src/match-check.ts!
155
155
  ```
156
156
 
157
- _See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/google-key.ts)_
157
+ _See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/google-key.ts)_
158
158
 
159
159
  ## `rnbuilder help [COMMAND]`
160
160
 
@@ -186,7 +186,7 @@ EXAMPLE
186
186
  initialize environment for first run from ./src/initialize.ts!
187
187
  ```
188
188
 
189
- _See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/initialize.ts)_
189
+ _See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/initialize.ts)_
190
190
 
191
191
  ## `rnbuilder match-check [MATCH-CHECK]`
192
192
 
@@ -205,7 +205,7 @@ EXAMPLE
205
205
  Check match certificates ./src/match-check.ts!
206
206
  ```
207
207
 
208
- _See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/match-check.ts)_
208
+ _See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/match-check.ts)_
209
209
 
210
210
  ## `rnbuilder match-nuke [BUILD]`
211
211
 
@@ -224,7 +224,7 @@ EXAMPLE
224
224
  Nuke certificates ./src/match-nuke.ts!
225
225
  ```
226
226
 
227
- _See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/match-nuke.ts)_
227
+ _See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/match-nuke.ts)_
228
228
 
229
229
  ## `rnbuilder reject-review [REJECT-REVIEW]`
230
230
 
@@ -242,7 +242,7 @@ EXAMPLE
242
242
  $ rnbuilder reject-review
243
243
  ```
244
244
 
245
- _See code: [src/commands/reject-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/reject-review.ts)_
245
+ _See code: [src/commands/reject-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/reject-review.ts)_
246
246
 
247
247
  ## `rnbuilder setup [SETUP]`
248
248
 
@@ -260,7 +260,7 @@ EXAMPLE
260
260
  hello world from ./src/setup.ts!
261
261
  ```
262
262
 
263
- _See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/setup.ts)_
263
+ _See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/setup.ts)_
264
264
 
265
265
  ## `rnbuilder setup-gcp`
266
266
 
@@ -274,7 +274,7 @@ OPTIONS
274
274
  -h, --help show CLI help
275
275
  ```
276
276
 
277
- _See code: [src/commands/setup-gcp.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/setup-gcp.ts)_
277
+ _See code: [src/commands/setup-gcp.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/setup-gcp.ts)_
278
278
 
279
279
  ## `rnbuilder submit-review [SUBMIT-REVIEW]`
280
280
 
@@ -293,7 +293,7 @@ EXAMPLE
293
293
  Push changes to existing apps ./src/firebase-sync-udids.ts!
294
294
  ```
295
295
 
296
- _See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/submit-review.ts)_
296
+ _See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/submit-review.ts)_
297
297
 
298
298
  ## `rnbuilder sync-udids [BUILD]`
299
299
 
@@ -312,5 +312,5 @@ EXAMPLE
312
312
  Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
313
313
  ```
314
314
 
315
- _See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.82/src/commands/sync-udids.ts)_
315
+ _See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.83/src/commands/sync-udids.ts)_
316
316
  <!-- commandsstop -->
@@ -1,21 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
- const child_process_1 = require("child_process");
5
- const path = require("path");
6
- const common_1 = require("../utils/common");
4
+ const gcp_1 = require("../utils/setup/gcp");
7
5
  class SetupGcp extends command_1.Command {
8
6
  async run() {
9
- var _a, _b, _c, _d, _e;
10
- const configs = common_1.getFastlaneConfigs();
11
- const gcp = (_a = configs.gcp) !== null && _a !== void 0 ? _a : {};
12
- const scriptPath = path.join(__dirname, '../../scripts/setup_gcp_impersonation.sh');
13
- const result = child_process_1.spawnSync('bash', [scriptPath], {
14
- stdio: 'inherit',
15
- env: Object.assign(Object.assign({}, process.env), { GCP_PROJECT_ID: (_b = gcp.projectId) !== null && _b !== void 0 ? _b : '', GCP_USER_EMAIL: (_c = gcp.userEmail) !== null && _c !== void 0 ? _c : '', GCP_SERVICE_ACCOUNTS: ((_d = gcp.serviceAccounts) !== null && _d !== void 0 ? _d : []).join(',') }),
16
- });
17
- if (result.status !== 0) {
18
- this.exit((_e = result.status) !== null && _e !== void 0 ? _e : 1);
7
+ const status = gcp_1.runGcpSetup();
8
+ if (status !== 0) {
9
+ this.exit(status !== null && status !== void 0 ? status : 1);
19
10
  }
20
11
  }
21
12
  }
@@ -7,13 +7,13 @@ const fs = require("fs");
7
7
  const inquirer = require("inquirer");
8
8
  const path = require("path");
9
9
  const app_icon_1 = require("../utils/setup/app-icon");
10
+ const applinks_1 = require("../utils/setup/applinks");
10
11
  const android_keystore_1 = require("../utils/setup/android-keystore");
11
12
  const launch_screen_1 = require("../utils/setup/launch-screen");
12
13
  const client_1 = require("../utils/setup/client");
13
14
  const env_1 = require("../utils/env");
14
15
  const apple_1 = require("../utils/setup/apple");
15
16
  const common_1 = require("../utils/common");
16
- const fastlane_1 = require("../utils/setup/fastlane");
17
17
  const firebase_1 = require("../utils/setup/firebase");
18
18
  function addAppJsonEntry({ client, appName }) {
19
19
  const appJsonPath = path.join(process.cwd(), 'app.json');
@@ -30,6 +30,7 @@ function addAppJsonEntry({ client, appName }) {
30
30
  }
31
31
  class Setup extends command_1.Command {
32
32
  async run() {
33
+ var _a;
33
34
  const questions = [
34
35
  {
35
36
  type: 'input',
@@ -49,11 +50,12 @@ class Setup extends command_1.Command {
49
50
  ];
50
51
  const { client } = await inquirer.prompt(questions);
51
52
  let envPath = path.join(process.cwd(), `configs/${client}/.env.prod`);
52
- if (!common_1.checkFileExists(envPath)) {
53
+ const isExistingClient = common_1.checkFileExists(envPath);
54
+ if (!isExistingClient) {
53
55
  envPath = path.join(process.cwd(), 'template/env.template');
54
56
  }
55
57
  const envVars = env_1.readEnvVars(envPath);
56
- const { bundleId, applicationId, appName } = await client_1.createClientConfig(client);
58
+ const { bundleId, applicationId, appName } = await client_1.createClientConfig(client, isExistingClient ? (_a = envVars.APP_NAME) === null || _a === void 0 ? void 0 : _a.value : undefined);
57
59
  env_1.setEnvValue('CLIENT', client, envVars);
58
60
  const deeplinkHost = envVars.DEEP_LINK_HOST.value.replace('[client]', client);
59
61
  env_1.setEnvValue('DEEP_LINK_HOST', deeplinkHost, envVars);
@@ -70,6 +72,11 @@ class Setup extends command_1.Command {
70
72
  androidAssetFolder,
71
73
  });
72
74
  await android_keystore_1.prepareAndroidKeystore({ client, appName, configFolder: iosAssetFolder });
75
+ await applinks_1.addApplinksEntry({
76
+ client,
77
+ packageName: applicationId || bundleId,
78
+ configFolder: iosAssetFolder,
79
+ });
73
80
  const { launchScreen, launchScreenColor } = await launch_screen_1.prepareLaunchScreen({
74
81
  iosAssetFolder,
75
82
  androidAssetFolder,
@@ -112,7 +119,7 @@ class Setup extends command_1.Command {
112
119
  env_1.setEnvValue('APPLICATION_ID', applicationId, prodEnvVars);
113
120
  env_1.saveEnvValues(prodEnvVars, prodEnvPath);
114
121
  // Setup fastlane
115
- await fastlane_1.setupFastlane({ client });
122
+ const { googleApplicationCredentials } = await firebase_1.setupFastlane({ client });
116
123
  const fastlaneDir = path.join(process.cwd(), `fastlane/clients/${client}/fastlane`);
117
124
  const fastlaneEnvVars = env_1.readEnvVars(path.join(fastlaneDir, '/.env'));
118
125
  env_1.setEnvValue('CLIENT', client, fastlaneEnvVars);
@@ -133,6 +140,9 @@ class Setup extends command_1.Command {
133
140
  env_1.setEnvValue('ITC_TEAM_ID', itcTeamId, fastlaneEnvVars);
134
141
  }
135
142
  env_1.setEnvValue('FLAVOR', common_1.capitalize(client), fastlaneEnvVars);
143
+ if (googleApplicationCredentials) {
144
+ env_1.setEnvValue('GOOGLE_APPLICATION_CREDENTIALS', googleApplicationCredentials, fastlaneEnvVars);
145
+ }
136
146
  env_1.saveEnvValues(fastlaneEnvVars, fastlaneDir + '/.env');
137
147
  // Firebase apps + config files; needs the env files and fastlane .env written above.
138
148
  await firebase_1.provisionFirebase({ client, fastlaneDir });
@@ -0,0 +1,5 @@
1
+ export declare const addApplinksEntry: ({ client, packageName, configFolder, }: {
2
+ client: string;
3
+ packageName: string;
4
+ configFolder: string;
5
+ }) => Promise<void>;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addApplinksEntry = void 0;
4
+ const fs = require("fs");
5
+ const inquirer = require("inquirer");
6
+ const path = require("path");
7
+ const shell = require("shelljs");
8
+ const common_1 = require("../common");
9
+ const DEFAULT_APPLINKS = '../../edular/edular-web/applinks.js';
10
+ const TABLE_END = '\n}\n\nmodule.exports';
11
+ const readKeystoreInfo = (infoPath) => {
12
+ const info = {};
13
+ fs.readFileSync(infoPath, 'utf-8')
14
+ .split('\n')
15
+ .forEach(line => {
16
+ const index = line.indexOf('=');
17
+ if (index !== -1) {
18
+ info[line.slice(0, index)] = line.slice(index + 1);
19
+ }
20
+ });
21
+ return info;
22
+ };
23
+ const getKeystoreSha256 = (configFolder) => {
24
+ var _a;
25
+ const keystorePath = path.join(configFolder, 'prod.keystore');
26
+ const infoPath = path.join(configFolder, 'keystore.info');
27
+ if (!fs.existsSync(keystorePath) || !fs.existsSync(infoPath)) {
28
+ return undefined;
29
+ }
30
+ const { storePassword, keyAlias } = readKeystoreInfo(infoPath);
31
+ const result = shell.exec(`keytool -list -v -keystore "${keystorePath}" -storepass "${storePassword}" -alias "${keyAlias}"`, { silent: true });
32
+ return (_a = /SHA256:\s*([0-9A-F:]+)/.exec(result.stdout)) === null || _a === void 0 ? void 0 : _a[1];
33
+ };
34
+ // The Play App Signing fingerprint is not known yet; add it by hand after the first upload.
35
+ exports.addApplinksEntry = async ({ client, packageName, configFolder, }) => {
36
+ const sha256 = getKeystoreSha256(configFolder);
37
+ if (!sha256) {
38
+ console.warn('No readable prod.keystore and keystore.info; skipping applinks.js update.');
39
+ return;
40
+ }
41
+ const { applinksPath } = await inquirer.prompt([
42
+ {
43
+ type: 'input',
44
+ name: 'applinksPath',
45
+ message: 'Path to edular-web applinks.js (empty to skip)?',
46
+ default: path.resolve(process.cwd(), DEFAULT_APPLINKS),
47
+ filter: common_1.normalise,
48
+ },
49
+ ]);
50
+ if (!applinksPath) {
51
+ return;
52
+ }
53
+ if (!fs.existsSync(applinksPath)) {
54
+ console.warn(`${applinksPath} not found; skipping applinks.js update.`);
55
+ return;
56
+ }
57
+ const source = fs.readFileSync(applinksPath, 'utf-8');
58
+ const tableStart = source.indexOf('const androidTargetParams');
59
+ const tableEnd = source.indexOf(TABLE_END);
60
+ if (tableStart === -1 || tableEnd === -1) {
61
+ console.warn('Unexpected applinks.js layout; skipping applinks.js update.');
62
+ return;
63
+ }
64
+ if (new RegExp(`\\n ${client}: \\{`).test(source.slice(tableStart))) {
65
+ console.log(`${client} already in applinks.js; add fingerprints by hand.`);
66
+ return;
67
+ }
68
+ const entry = [
69
+ ` ${client}: {`,
70
+ ` package_name: "${packageName}",`,
71
+ ' sha256_cert_fingerprints: [',
72
+ ' ...baseSha256,',
73
+ ` "${sha256}" // prod keystore`,
74
+ ' ]',
75
+ ' }',
76
+ ].join('\n');
77
+ fs.writeFileSync(applinksPath, `${source.slice(0, tableEnd)},\n${entry}${source.slice(tableEnd)}`, 'utf-8');
78
+ console.log(`Added ${client} to ${applinksPath}. Add the Play App Signing SHA-256 after the first Play upload.`);
79
+ };
@@ -1,4 +1,4 @@
1
- export declare const createClientConfig: (client: string) => Promise<{
1
+ export declare const createClientConfig: (client: string, existingAppName?: string | undefined) => Promise<{
2
2
  appName: any;
3
3
  bundleId: any;
4
4
  applicationId: any;
@@ -4,12 +4,13 @@ exports.createClientConfig = void 0;
4
4
  const inquirer = require("inquirer");
5
5
  const android_1 = require("./android");
6
6
  const ios_scheme_1 = require("./ios-scheme");
7
- exports.createClientConfig = async (client) => {
7
+ exports.createClientConfig = async (client, existingAppName) => {
8
8
  const { appName, bundleId, applicationId } = await inquirer.prompt([
9
9
  {
10
10
  type: 'input',
11
11
  name: 'appName',
12
12
  message: 'What is app name?',
13
+ default: existingAppName,
13
14
  },
14
15
  {
15
16
  type: 'input',
@@ -1,3 +1,10 @@
1
+ export declare const setupFastlane: ({ client }: {
2
+ client: string;
3
+ }) => Promise<{
4
+ googleApplicationCredentials: undefined;
5
+ } | {
6
+ googleApplicationCredentials: string;
7
+ }>;
1
8
  export declare const provisionFirebase: ({ client, fastlaneDir, }: {
2
9
  client: string;
3
10
  fastlaneDir: string;
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.provisionFirebase = void 0;
3
+ exports.provisionFirebase = exports.setupFastlane = void 0;
4
4
  const fs = require("fs");
5
5
  const inquirer = require("inquirer");
6
6
  const path = require("path");
7
7
  const shell = require("shelljs");
8
+ const common_1 = require("../common");
9
+ const gcp_1 = require("./gcp");
10
+ const env_1 = require("../env");
8
11
  // Firebase apps are provisioned by the project's own script with the operator's
9
12
  // `firebase login`. The client → Firebase project mapping lives in the project too.
10
13
  const CLIENTS_FILE = 'scripts/firebase-clients.json';
@@ -27,6 +30,37 @@ const pickProject = async (clients) => {
27
30
  ]);
28
31
  return project;
29
32
  };
33
+ exports.setupFastlane = async ({ client }) => {
34
+ const fastlaneDir = path.join(process.cwd(), `fastlane/clients/${client}/fastlane`);
35
+ // Merge template files in without overwriting existing client files —
36
+ // fills gaps left by a partial/previous setup run (e.g. missing .env).
37
+ await common_1.copyDir(path.join(process.cwd(), 'template/fastlane'), fastlaneDir, false);
38
+ const adcFiles = gcp_1.listAdcFiles();
39
+ if (!adcFiles.length) {
40
+ console.warn('No impersonated ADC file found in ~/.config/gcloud. Run the setup-gcp command, then set GOOGLE_APPLICATION_CREDENTIALS in the client fastlane .env.');
41
+ return { googleApplicationCredentials: undefined };
42
+ }
43
+ const { googleApplicationCredentials } = await inquirer.prompt([
44
+ {
45
+ type: 'list',
46
+ name: 'googleApplicationCredentials',
47
+ message: 'Impersonated ADC file for Google Play?',
48
+ choices: adcFiles,
49
+ default: '~/.config/gcloud/adc_fastlane.json',
50
+ },
51
+ ]);
52
+ return { googleApplicationCredentials: googleApplicationCredentials };
53
+ };
54
+ // fastlane/configs.json maps each Firebase project to its service account key
55
+ // under `serviceAccounts`; the key is copied into the client's fastlane dir.
56
+ const copyServiceAccountFile = async (project, fastlaneDir) => {
57
+ var _a;
58
+ const file = (_a = common_1.getFastlaneConfigs().serviceAccounts) === null || _a === void 0 ? void 0 : _a[project];
59
+ if (!file) {
60
+ throw new Error(`No service account key for ${project}; add it under serviceAccounts in fastlane/configs.json`);
61
+ }
62
+ await common_1.copyFile(path.resolve(process.cwd(), file), path.join(fastlaneDir, 'firebase.json'));
63
+ };
30
64
  // Needs configs/<client>/.env.prod and fastlane/clients/<client>/fastlane/.env written:
31
65
  // the script reads the package / bundle IDs and writes FIREBASE_ANDROID_APP / FIREBASE_IOS_APP.
32
66
  exports.provisionFirebase = async ({ client, fastlaneDir, }) => {
@@ -53,6 +87,11 @@ exports.provisionFirebase = async ({ client, fastlaneDir, }) => {
53
87
  if (result.code !== 0) {
54
88
  console.warn(`Firebase provisioning failed; fix the error above and re-run: node ${PROVISION_SCRIPT} ${client}`);
55
89
  }
90
+ const fastlaneEnvPath = path.join(fastlaneDir, '.env');
91
+ const fastlaneEnvVars = env_1.readEnvVars(fastlaneEnvPath);
92
+ await copyServiceAccountFile(clients[client].project, fastlaneDir);
93
+ env_1.setEnvValue('FIREBASE_SERVICE_ACCOUNT_FILE', 'firebase.json', fastlaneEnvVars);
94
+ env_1.saveEnvValues(fastlaneEnvVars, fastlaneEnvPath);
56
95
  const { apnsKey } = await inquirer.prompt([
57
96
  {
58
97
  type: 'confirm',
@@ -0,0 +1,2 @@
1
+ export declare const listAdcFiles: () => string[];
2
+ export declare const runGcpSetup: () => number | null;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runGcpSetup = exports.listAdcFiles = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const fs = require("fs");
6
+ const os = require("os");
7
+ const path = require("path");
8
+ const common_1 = require("../common");
9
+ const ADC_DIR = path.join(os.homedir(), '.config/gcloud');
10
+ // Impersonated ADC files created by scripts/setup_gcp_impersonation.sh
11
+ exports.listAdcFiles = () => fs.existsSync(ADC_DIR)
12
+ ? fs
13
+ .readdirSync(ADC_DIR)
14
+ .filter(file => /^adc_.+\.json$/.test(file))
15
+ .sort()
16
+ .map(file => `~/.config/gcloud/${file}`)
17
+ : [];
18
+ exports.runGcpSetup = () => {
19
+ var _a, _b, _c, _d;
20
+ const gcp = (_a = common_1.getFastlaneConfigs().gcp) !== null && _a !== void 0 ? _a : {};
21
+ const scriptPath = path.join(__dirname, '../../../scripts/setup_gcp_impersonation.sh');
22
+ return child_process_1.spawnSync('bash', [scriptPath], {
23
+ stdio: 'inherit',
24
+ env: Object.assign(Object.assign({}, process.env), { GCP_PROJECT_ID: (_b = gcp.projectId) !== null && _b !== void 0 ? _b : '', GCP_USER_EMAIL: (_c = gcp.userEmail) !== null && _c !== void 0 ? _c : '', GCP_SERVICE_ACCOUNTS: ((_d = gcp.serviceAccounts) !== null && _d !== void 0 ? _d : []).join(',') }),
25
+ }).status;
26
+ };
@@ -1 +1 @@
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"}]}}}
1
+ {"version":"0.6.83","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.82",
4
+ "version": "0.6.83",
5
5
  "author": "Tuan Luong @r0b0t3d",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/r0b0t3d/rnbuilder/issues",
@@ -1,3 +0,0 @@
1
- export declare const setupFastlane: ({ client }: {
2
- client: string;
3
- }) => Promise<void>;
@@ -1,32 +0,0 @@
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 clientDir = path.join(process.cwd(), `fastlane/clients/${client}`);
9
- const fastlaneDir = path.join(clientDir, 'fastlane');
10
- // Merge template files in without overwriting existing client files —
11
- // fills gaps left by a partial/previous setup run (e.g. missing .env).
12
- await common_1.copyDir(path.join(process.cwd(), 'template/fastlane'), fastlaneDir, false);
13
- const { firebaseServiceAccountFile, jsonKeyFile } = await inquirer.prompt([
14
- {
15
- type: 'input',
16
- name: 'firebaseServiceAccountFile',
17
- message: 'Firebase Service Account file (for App Distribution)?',
18
- default: process.env.FIREBASE_SERVICE_ACCOUNT_FILE,
19
- },
20
- {
21
- type: 'input',
22
- name: 'jsonKeyFile',
23
- message: 'Path to Google json file? See https://docs.fastlane.tools/actions/supply/#setup',
24
- },
25
- ]);
26
- if (firebaseServiceAccountFile) {
27
- await common_1.copyFile(common_1.normalise(firebaseServiceAccountFile), path.join(fastlaneDir, 'firebase.json'));
28
- }
29
- if (jsonKeyFile) {
30
- await common_1.copyFile(common_1.normalise(jsonKeyFile), path.join(clientDir, 'key.json'));
31
- }
32
- };