rnbuilder 0.6.83 → 0.6.85
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 +13 -13
- package/lib/commands/setup.js +2 -0
- package/lib/utils/setup/applinks.d.ts +3 -1
- package/lib/utils/setup/applinks.js +37 -27
- package/lib/utils/setup/firebase.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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.
|
|
43
|
+
rnbuilder/0.6.85 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.
|
|
100
|
+
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
119
|
+
_See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
138
|
+
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
157
|
+
_See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
189
|
+
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
208
|
+
_See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
227
|
+
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
245
|
+
_See code: [src/commands/reject-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
263
|
+
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
277
|
+
_See code: [src/commands/setup-gcp.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
296
|
+
_See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/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.
|
|
315
|
+
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.85/src/commands/sync-udids.ts)_
|
|
316
316
|
<!-- commandsstop -->
|
package/lib/commands/setup.js
CHANGED
|
@@ -75,6 +75,8 @@ class Setup extends command_1.Command {
|
|
|
75
75
|
await applinks_1.addApplinksEntry({
|
|
76
76
|
client,
|
|
77
77
|
packageName: applicationId || bundleId,
|
|
78
|
+
bundleId,
|
|
79
|
+
appleTeamId,
|
|
78
80
|
configFolder: iosAssetFolder,
|
|
79
81
|
});
|
|
80
82
|
const { launchScreen, launchScreenColor } = await launch_screen_1.prepareLaunchScreen({
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export declare const addApplinksEntry: ({ client, packageName, configFolder, }: {
|
|
1
|
+
export declare const addApplinksEntry: ({ client, packageName, bundleId, appleTeamId, configFolder, }: {
|
|
2
2
|
client: string;
|
|
3
3
|
packageName: string;
|
|
4
|
+
bundleId: string;
|
|
5
|
+
appleTeamId?: string | undefined;
|
|
4
6
|
configFolder: string;
|
|
5
7
|
}) => Promise<void>;
|
|
@@ -7,7 +7,6 @@ const path = require("path");
|
|
|
7
7
|
const shell = require("shelljs");
|
|
8
8
|
const common_1 = require("../common");
|
|
9
9
|
const DEFAULT_APPLINKS = '../../edular/edular-web/applinks.js';
|
|
10
|
-
const TABLE_END = '\n}\n\nmodule.exports';
|
|
11
10
|
const readKeystoreInfo = (infoPath) => {
|
|
12
11
|
const info = {};
|
|
13
12
|
fs.readFileSync(infoPath, 'utf-8')
|
|
@@ -31,13 +30,22 @@ const getKeystoreSha256 = (configFolder) => {
|
|
|
31
30
|
const result = shell.exec(`keytool -list -v -keystore "${keystorePath}" -storepass "${storePassword}" -alias "${keyAlias}"`, { silent: true });
|
|
32
31
|
return (_a = /SHA256:\s*([0-9A-F:]+)/.exec(result.stdout)) === null || _a === void 0 ? void 0 : _a[1];
|
|
33
32
|
};
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
// Appends `client` to the top-level table `const <table> = {...}` unless it is already there.
|
|
34
|
+
const addTableEntry = (source, table, client, entry) => {
|
|
35
|
+
const tableStart = source.indexOf(`const ${table}`);
|
|
36
|
+
const tableEnd = source.indexOf('\n}\n', tableStart);
|
|
37
|
+
if (tableStart === -1 || tableEnd === -1) {
|
|
38
|
+
console.warn(`Unexpected applinks.js layout; skipping ${table}.`);
|
|
39
|
+
return source;
|
|
40
40
|
}
|
|
41
|
+
if (new RegExp(`\\n ${client}: \\{`).test(source.slice(tableStart, tableEnd))) {
|
|
42
|
+
console.log(`${client} already in ${table}; edit it by hand.`);
|
|
43
|
+
return source;
|
|
44
|
+
}
|
|
45
|
+
return `${source.slice(0, tableEnd)},\n${entry}${source.slice(tableEnd)}`;
|
|
46
|
+
};
|
|
47
|
+
// The Play App Signing fingerprint is not known yet; add it by hand after the first upload.
|
|
48
|
+
exports.addApplinksEntry = async ({ client, packageName, bundleId, appleTeamId, configFolder, }) => {
|
|
41
49
|
const { applinksPath } = await inquirer.prompt([
|
|
42
50
|
{
|
|
43
51
|
type: 'input',
|
|
@@ -54,26 +62,28 @@ exports.addApplinksEntry = async ({ client, packageName, configFolder, }) => {
|
|
|
54
62
|
console.warn(`${applinksPath} not found; skipping applinks.js update.`);
|
|
55
63
|
return;
|
|
56
64
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (tableStart === -1 || tableEnd === -1) {
|
|
61
|
-
console.warn('Unexpected applinks.js layout; skipping applinks.js update.');
|
|
62
|
-
return;
|
|
65
|
+
let source = fs.readFileSync(applinksPath, 'utf-8');
|
|
66
|
+
if (appleTeamId) {
|
|
67
|
+
source = addTableEntry(source, 'appleConfigs', client, ` ${client}: { production: "${appleTeamId}.${bundleId}" }`);
|
|
63
68
|
}
|
|
64
|
-
|
|
65
|
-
console.
|
|
66
|
-
|
|
69
|
+
else {
|
|
70
|
+
console.warn('No Apple team ID; skipping appleConfigs.');
|
|
71
|
+
}
|
|
72
|
+
const sha256 = getKeystoreSha256(configFolder);
|
|
73
|
+
if (sha256) {
|
|
74
|
+
source = addTableEntry(source, 'androidTargetParams', client, [
|
|
75
|
+
` ${client}: {`,
|
|
76
|
+
` package_name: "${packageName}",`,
|
|
77
|
+
' sha256_cert_fingerprints: [',
|
|
78
|
+
' ...baseSha256,',
|
|
79
|
+
` "${sha256}" // prod keystore`,
|
|
80
|
+
' ]',
|
|
81
|
+
' }',
|
|
82
|
+
].join('\n'));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
console.warn('No readable prod.keystore and keystore.info; skipping androidTargetParams.');
|
|
67
86
|
}
|
|
68
|
-
|
|
69
|
-
|
|
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.`);
|
|
87
|
+
fs.writeFileSync(applinksPath, source, 'utf-8');
|
|
88
|
+
console.log(`Updated ${applinksPath}. Add the Play App Signing SHA-256 after the first Play upload.`);
|
|
79
89
|
};
|
|
@@ -90,7 +90,7 @@ exports.provisionFirebase = async ({ client, fastlaneDir, }) => {
|
|
|
90
90
|
const fastlaneEnvPath = path.join(fastlaneDir, '.env');
|
|
91
91
|
const fastlaneEnvVars = env_1.readEnvVars(fastlaneEnvPath);
|
|
92
92
|
await copyServiceAccountFile(clients[client].project, fastlaneDir);
|
|
93
|
-
env_1.setEnvValue('FIREBASE_SERVICE_ACCOUNT_FILE', 'firebase.json', fastlaneEnvVars);
|
|
93
|
+
env_1.setEnvValue('FIREBASE_SERVICE_ACCOUNT_FILE', 'fastlane/firebase.json', fastlaneEnvVars);
|
|
94
94
|
env_1.saveEnvValues(fastlaneEnvVars, fastlaneEnvPath);
|
|
95
95
|
const { apnsKey } = await inquirer.prompt([
|
|
96
96
|
{
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.6.
|
|
1
|
+
{"version":"0.6.85","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"}]}}}
|