@revopush/code-push-cli 0.0.1 → 0.0.3

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/bin/script/cli.js CHANGED
File without changes
@@ -27,7 +27,7 @@ const sign_1 = require("./sign");
27
27
  const xcode = require("xcode");
28
28
  const react_native_utils_1 = require("./react-native-utils");
29
29
  const file_utils_1 = require("./utils/file-utils");
30
- const configFilePath = path.join(process.env.LOCALAPPDATA || process.env.HOME, ".code-push.config");
30
+ const configFilePath = path.join(process.env.LOCALAPPDATA || process.env.HOME, ".revopush.config");
31
31
  const emailValidator = require("email-validator");
32
32
  const packageJson = require("../../package.json");
33
33
  const parseXml = Q.denodeify(require("xml2js").parseString);
@@ -210,7 +210,7 @@ function deleteFolder(folderPath) {
210
210
  });
211
211
  }
212
212
  function deploymentAdd(command) {
213
- return exports.sdk.addDeployment(command.appName, command.deploymentName).then((deployment) => {
213
+ return exports.sdk.addDeployment(command.appName, command.deploymentName, command.key).then((deployment) => {
214
214
  (0, exports.log)('Successfully added the "' +
215
215
  command.deploymentName +
216
216
  '" deployment with key "' +
@@ -350,7 +350,7 @@ function execute(command) {
350
350
  if (!!exports.sdk)
351
351
  break; // Used by unit tests to skip authentication
352
352
  if (!connectionInfo) {
353
- throw new Error("You are not currently logged in. Run the 'code-push-standalone login' command to authenticate with the CodePush server.");
353
+ throw new Error("You are not currently logged in. Run the 'revopush login' command to authenticate with the CodePush server.");
354
354
  }
355
355
  exports.sdk = getSdk(connectionInfo.accessKey, CLI_HEADERS, connectionInfo.customServerUrl);
356
356
  break;
@@ -433,11 +433,10 @@ function getTotalActiveFromDeploymentMetrics(metrics) {
433
433
  return totalActive;
434
434
  }
435
435
  function initiateExternalAuthenticationAsync(action, serverUrl) {
436
- const message = `A browser is being launched to authenticate your account. Follow the instructions ` +
437
- `it displays to complete your ${action === "register" ? "registration" : action}.`;
438
- (0, exports.log)(message);
439
436
  const hostname = os.hostname();
440
- const url = `${serverUrl || AccountManager.SERVER_URL}/auth/${action}?hostname=${hostname}`;
437
+ const url = `${serverUrl || AccountManager.APP_SERVER_URL}/cli-login?hostname=${hostname}`;
438
+ (0, exports.log)("Opening your browser...");
439
+ (0, exports.log)(`Visit ${url} and enter the code`);
441
440
  opener(url);
442
441
  }
443
442
  function link(command) {
@@ -447,10 +446,10 @@ function link(command) {
447
446
  function login(command) {
448
447
  // Check if one of the flags were provided.
449
448
  if (command.accessKey) {
450
- exports.sdk = getSdk(command.accessKey, CLI_HEADERS, command.serverUrl);
449
+ exports.sdk = getSdk(command.accessKey, CLI_HEADERS, command.apiServerUrl);
451
450
  return exports.sdk.isAuthenticated().then((isAuthenticated) => {
452
451
  if (isAuthenticated) {
453
- serializeConnectionInfo(command.accessKey, /*preserveAccessKeyOnLogout*/ true, command.serverUrl);
452
+ serializeConnectionInfo(command.accessKey, /*preserveAccessKeyOnLogout*/ true, command.apiServerUrl);
454
453
  }
455
454
  else {
456
455
  throw new Error("Invalid access key.");
@@ -458,21 +457,21 @@ function login(command) {
458
457
  });
459
458
  }
460
459
  else {
461
- return loginWithExternalAuthentication("login", command.serverUrl);
460
+ return loginWithExternalAuthentication("login", command.apiServerUrl, command.appServerUrl);
462
461
  }
463
462
  }
464
- function loginWithExternalAuthentication(action, serverUrl) {
465
- initiateExternalAuthenticationAsync(action, serverUrl);
463
+ function loginWithExternalAuthentication(action, apiServerUrl, appServerUrl) {
464
+ initiateExternalAuthenticationAsync(action, appServerUrl);
466
465
  (0, exports.log)(""); // Insert newline
467
466
  return requestAccessKey().then((accessKey) => {
468
467
  if (accessKey === null) {
469
468
  // The user has aborted the synchronous prompt (e.g.: via [CTRL]+[C]).
470
469
  return;
471
470
  }
472
- exports.sdk = getSdk(accessKey, CLI_HEADERS, serverUrl);
471
+ exports.sdk = getSdk(accessKey, CLI_HEADERS, apiServerUrl);
473
472
  return exports.sdk.isAuthenticated().then((isAuthenticated) => {
474
473
  if (isAuthenticated) {
475
- serializeConnectionInfo(accessKey, /*preserveAccessKeyOnLogout*/ false, serverUrl);
474
+ serializeConnectionInfo(accessKey, /*preserveAccessKeyOnLogout*/ false, apiServerUrl);
476
475
  }
477
476
  else {
478
477
  throw new Error("Invalid access key.");
@@ -1212,7 +1211,7 @@ function sessionList(command) {
1212
1211
  }
1213
1212
  function sessionRemove(command) {
1214
1213
  if (os.hostname() === command.machineName) {
1215
- throw new Error("Cannot remove the current login session via this command. Please run 'code-push-standalone logout' instead.");
1214
+ throw new Error("Cannot remove the current login session via this command. Please run 'revopush logout' instead.");
1216
1215
  }
1217
1216
  else {
1218
1217
  return (0, exports.confirm)().then((wasConfirmed) => {
@@ -10,7 +10,7 @@ const backslash = require("backslash");
10
10
  const parseDuration = require("parse-duration");
11
11
  const packageJson = require("../../package.json");
12
12
  const ROLLOUT_PERCENTAGE_REGEX = /^(100|[1-9][0-9]|[1-9])%?$/;
13
- const USAGE_PREFIX = "Usage: code-push-standalone";
13
+ const USAGE_PREFIX = "Usage: revopush";
14
14
  // Command categories are: access-key, app, release, deployment, deployment-key, login, logout, register
15
15
  let isValidCommandCategory = false;
16
16
  // Commands are the verb following the command category (e.g.: "add" in "app add").
@@ -19,13 +19,15 @@ let wasHelpShown = false;
19
19
  function showHelp(showRootDescription) {
20
20
  if (!wasHelpShown) {
21
21
  if (showRootDescription) {
22
- console.log(chalk.cyan(" _____ __ " + chalk.green(" ___ __ ")));
23
- console.log(chalk.cyan(" / ___/__ ___/ /__" + chalk.green(" / _ \\__ _____ / / ")));
24
- console.log(chalk.cyan("/ /__/ _ \\/ _ / -_)" + chalk.green(" ___/ // (_-</ _ \\")));
25
- console.log(chalk.cyan("\\___/\\___/\\_,_/\\__/" + chalk.green("_/ \\_,_/___/_//_/")) + " CLI v" + packageJson.version);
26
- console.log(chalk.cyan("======================================"));
27
- console.log("");
28
- console.log("CodePush is a service that enables you to deploy mobile app updates directly to your users' devices.\n");
22
+ console.log(chalk.blue(`
23
+ ____ ____ _
24
+ | _ \\ _____ _____ | _ \\ _ _ ___| |__
25
+ | |_) / _ \\ \\ / / _ \\| |_) | | | / __| '_ \\
26
+ | _ < __/\\ V / (_) | __/| |_| \\__ \\ | | |
27
+ |_| \\_\\___| \\_/ \\___/|_| \\__,_|___/_| |_| CLI v${packageJson.version}
28
+ ============================================`));
29
+ console.log("Revopush is a service that enables you to deploy mobile app updates directly to your users' devices. " +
30
+ "Visit our website https://revopush.org/ \n");
29
31
  }
30
32
  yargs.showHelp();
31
33
  wasHelpShown = true;
@@ -269,6 +271,7 @@ yargs
269
271
  .command("list", "Lists the apps associated with your account", (yargs) => appList("list", yargs))
270
272
  .command("ls", "Lists the apps associated with your account", (yargs) => appList("ls", yargs))
271
273
  .command("transfer", "Transfer the ownership of an app to another account", (yargs) => {
274
+ isValidCommand = true;
272
275
  yargs
273
276
  .usage(USAGE_PREFIX + " app transfer <appName> <email>")
274
277
  .demand(/*count*/ 2, /*max*/ 2) // Require exactly two non-option arguments
@@ -318,7 +321,14 @@ yargs
318
321
  yargs
319
322
  .usage(USAGE_PREFIX + " deployment add <appName> <deploymentName>")
320
323
  .demand(/*count*/ 2, /*max*/ 2) // Require exactly two non-option arguments
321
- .example("deployment add MyApp MyDeployment", 'Adds deployment "MyDeployment" to app "MyApp"');
324
+ .example("deployment add MyApp MyDeployment", 'Adds deployment "MyDeployment" to app "MyApp"')
325
+ .example("deployment add MyApp MyDeployment -k abc123", 'Adds deployment key "abc123"')
326
+ .option("key", {
327
+ alias: "k",
328
+ demand: false,
329
+ description: "Specify deployment key",
330
+ type: "string",
331
+ });
322
332
  addCommonConfiguration(yargs);
323
333
  })
324
334
  .command("clear", "Clear the release history associated with a deployment", (yargs) => deploymentHistoryClear("clear", yargs))
@@ -339,22 +349,23 @@ yargs
339
349
  .check((argv, aliases) => isValidCommand); // Report unrecognized, non-hyphenated command category.
340
350
  addCommonConfiguration(yargs);
341
351
  })
342
- .command("link", "Link an additional authentication provider (e.g. GitHub) to an existing CodePush account", (yargs) => {
343
- isValidCommandCategory = true;
344
- isValidCommand = true;
345
- yargs
346
- .usage(USAGE_PREFIX + " link")
347
- .demand(/*count*/ 0, /*max*/ 1) //set 'max' to one to allow usage of serverUrl undocument parameter for testing
348
- .example("link", "Links an account on the CodePush server")
349
- .check((argv, aliases) => isValidCommand); // Report unrecognized, non-hyphenated command category.
350
- addCommonConfiguration(yargs);
351
- })
352
+ /* .command("link", "Link an additional authentication provider (e.g. GitHub) to an existing CodePush account", (yargs: yargs.Argv) => {
353
+ isValidCommandCategory = true;
354
+ isValidCommand = true;
355
+ yargs
356
+ .usage(USAGE_PREFIX + " link")
357
+ .demand(/!*count*!/ 0, /!*max*!/ 1) //set 'max' to one to allow usage of serverUrl undocument parameter for testing
358
+ .example("link", "Links an account on the CodePush server")
359
+ .check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommand); // Report unrecognized, non-hyphenated command category.
360
+
361
+ addCommonConfiguration(yargs);
362
+ })*/
352
363
  .command("login", "Authenticate with the CodePush server in order to begin managing your apps", (yargs) => {
353
364
  isValidCommandCategory = true;
354
365
  isValidCommand = true;
355
366
  yargs
356
367
  .usage(USAGE_PREFIX + " login [options]")
357
- .demand(/*count*/ 0, /*max*/ 1) //set 'max' to one to allow usage of serverUrl undocument parameter for testing
368
+ .demand(/*count*/ 0, /*max*/ 2) //set 'max' to one to allow usage of serverUrl undocument parameter for testing
358
369
  .example("login", "Logs in to the CodePush server")
359
370
  .example("login --accessKey mykey", 'Logs in on behalf of the user who owns and created the access key "mykey"')
360
371
  .option("accessKey", {
@@ -885,6 +896,9 @@ function createCommand() {
885
896
  const deploymentAddCommand = cmd;
886
897
  deploymentAddCommand.appName = arg2;
887
898
  deploymentAddCommand.deploymentName = arg3;
899
+ if (argv["key"]) {
900
+ deploymentAddCommand.key = argv["key"];
901
+ }
888
902
  }
889
903
  break;
890
904
  case "clear":
@@ -936,16 +950,17 @@ function createCommand() {
936
950
  break;
937
951
  }
938
952
  break;
939
- case "link":
940
- cmd = {
941
- type: cli.CommandType.link,
942
- serverUrl: getServerUrl(arg1),
943
- };
944
- break;
953
+ /* case "link":
954
+ cmd = <cli.ILinkCommand>{
955
+ type: cli.CommandType.link,
956
+ serverUrl: getServerUrl(arg1),
957
+ };
958
+ break;*/
945
959
  case "login":
946
960
  cmd = { type: cli.CommandType.login };
947
961
  const loginCommand = cmd;
948
- loginCommand.serverUrl = getServerUrl(arg1);
962
+ loginCommand.apiServerUrl = getServerUrl(arg1);
963
+ loginCommand.appServerUrl = getServerUrl(arg2);
949
964
  loginCommand.accessKey = argv["accessKey"];
950
965
  break;
951
966
  case "logout":
@@ -27,7 +27,8 @@ class AccountManager {
27
27
  OWNER: "Owner",
28
28
  COLLABORATOR: "Collaborator",
29
29
  };
30
- static SERVER_URL = "http://localhost:3000";
30
+ static API_SERVER_URL = "https://api.revopush.org";
31
+ static APP_SERVER_URL = "https://app.revopush.org";
31
32
  static API_VERSION = 2;
32
33
  static ERROR_GATEWAY_TIMEOUT = 504; // Used if there is a network error
33
34
  static ERROR_INTERNAL_SERVER = 500;
@@ -42,7 +43,7 @@ class AccountManager {
42
43
  throw new Error("An access key must be specified.");
43
44
  this._accessKey = accessKey;
44
45
  this._customHeaders = customHeaders;
45
- this._serverUrl = serverUrl || AccountManager.SERVER_URL;
46
+ this._serverUrl = serverUrl || AccountManager.API_SERVER_URL;
46
47
  }
47
48
  get accessKey() {
48
49
  return this._accessKey;
@@ -181,8 +182,8 @@ class AccountManager {
181
182
  return this.del(urlEncode([`/apps/${appName}/collaborators/${email}`])).then(() => null);
182
183
  }
183
184
  // Deployments
184
- addDeployment(appName, deploymentName) {
185
- const deployment = { name: deploymentName };
185
+ addDeployment(appName, deploymentName, deploymentKey) {
186
+ const deployment = { name: deploymentName, key: deploymentKey };
186
187
  return this.post(urlEncode([`/apps/${appName}/deployments/`]), JSON.stringify(deployment), /*expectResponseBody=*/ true).then((res) => res.body.deployment);
187
188
  }
188
189
  clearDeploymentHistory(appName, deploymentName) {
package/guied.md ADDED
@@ -0,0 +1,351 @@
1
+ Improving the readability and simplicity of your guide will make it more accessible to new users, ensuring they can easily follow the steps to install the CLI and understand its functionality from the outset. Here are several suggestions to enhance your article:
2
+
3
+ ### 1. **Clarify the Introduction**
4
+ - **Simplify Language:** Use straightforward language to explain what the CLI does and how to install it right from the beginning.
5
+ - **Highlight Key Points Early:** Mention the installation process and the primary functions of the CLI within the first few sentences.
6
+
7
+ **Revised Introduction Example:**
8
+ ```markdown
9
+ ### 1. Introduction
10
+
11
+ Welcome! This guide will help you migrate your Over-the-Air (OTA) updates from Appcenter to Revopush. With Revopush's Command Line Interface (CLI), you can easily push updates directly to your users' devices without needing to go through app stores.
12
+
13
+ **What You'll Learn:**
14
+ - How to install the Revopush CLI
15
+ - Migrating your existing OTA updates from Appcenter
16
+ - Setting up and managing your applications and deployments in Revopush
17
+ - Updating your React Native app to use Revopush for OTA updates
18
+
19
+ Let’s get started!
20
+ ```
21
+
22
+ ### 2. **Streamline the Table of Contents**
23
+ - **Use Clear Headings:** Ensure each section title clearly reflects its content.
24
+ - **Simplify Navigation:** Number sections sequentially and use consistent terminology.
25
+
26
+ **Revised Table of Contents Example:**
27
+ ```markdown
28
+ **Guide Overview:**
29
+ 1. Introduction
30
+ 2. Prerequisites
31
+ - 2.1 Installing Required Tools
32
+ - 2.2 Setting Up Revopush CLI
33
+ 3. Migrating from Appcenter to Revopush
34
+ - 3.1 Logging In
35
+ - 3.2 Migrating Applications and Deployments
36
+ 4. Setting Up Revopush from Scratch
37
+ - 4.1 Logging In
38
+ - 4.2 Creating Applications
39
+ - 4.3 Creating Deployments
40
+ 5. Updating Your React Native App
41
+ - 5.1 iOS Configuration
42
+ - 5.2 Android Configuration
43
+ 6. Releasing Updates
44
+ - 6.1 For iOS
45
+ - 6.2 For Android
46
+ 7. Summary and Resources
47
+ ```
48
+
49
+ ### 3. **Enhance Prerequisites Section**
50
+ - **Break Down Information:** Separate tool installations and account setups for clarity.
51
+ - **Use Bullet Points:** Make requirements easy to scan.
52
+
53
+ **Revised Prerequisites Example:**
54
+ ```markdown
55
+ ### 2. Prerequisites
56
+
57
+ Before you begin, ensure you have the following:
58
+
59
+ - **Developer Tools Installed:**
60
+ - [Node.js](https://nodejs.org/)
61
+ - npm or Yarn
62
+ - npx
63
+ - [Android Studio](https://developer.android.com/studio)
64
+ - [Xcode](https://developer.apple.com/xcode/)
65
+ - [Visual Studio Code](https://code.visualstudio.com/)
66
+
67
+ - **Permissions:**
68
+ - Ability to install npm packages globally.
69
+
70
+ - **Revopush Account:**
71
+ - Sign up at [Revopush](https://revopush.org/) using GitHub or Google for authentication.
72
+
73
+ - **(If Migrating) Appcenter Access:**
74
+ - Ensure you have access to your existing Appcenter account and its CLI.
75
+ ```
76
+
77
+ ### 4. **Improve CLI Installation Instructions**
78
+ - **Highlight Commands:** Use code blocks for commands to differentiate them from the text.
79
+ - **Add Explanations:** Briefly explain what each command does.
80
+
81
+ **Revised CLI Installation Example:**
82
+ ```markdown
83
+ #### 2.2 Setting Up Revopush CLI
84
+
85
+ **Install Revopush CLI:**
86
+ ```bash
87
+ npm install -g @revopush/code-push-cli
88
+ ```
89
+
90
+ **Update Revopush CLI to the Latest Version:**
91
+ ```bash
92
+ npm update -g @revopush/code-push-cli
93
+ ```
94
+
95
+ **Verify Installation:**
96
+ ```bash
97
+ revopush -h
98
+ ```
99
+ This command displays the Revopush CLI version and available commands.
100
+ ```
101
+
102
+ ### 5. **Use Visual Aids and Formatting**
103
+ - **Add Screenshots:** Visual representations of CLI outputs or UI steps can help users follow along.
104
+ - **Consistent Formatting:** Use headings, subheadings, bullet points, and numbered lists consistently to organize information.
105
+
106
+ ### 6. **Simplify Migration Steps**
107
+ - **Combine Similar Steps:** Merge sections that have overlapping instructions to reduce redundancy.
108
+ - **Provide Clear Examples:** Use consistent naming conventions in examples to avoid confusion.
109
+
110
+ **Revised Migration Steps Example:**
111
+ ```markdown
112
+ ### 3. Migrating from Appcenter to Revopush
113
+
114
+ Follow these steps if you're moving your OTA updates from Appcenter to Revopush.
115
+
116
+ #### 3.1 Logging In
117
+
118
+ **Log in to Appcenter CLI:**
119
+ ```bash
120
+ appcenter login
121
+ ```
122
+
123
+ **Log in to Revopush CLI:**
124
+ ```bash
125
+ revopush login
126
+ ```
127
+
128
+ #### 3.2 Migrating Applications and Deployments
129
+
130
+ 1. **List Your Appcenter Apps:**
131
+ ```bash
132
+ appcenter apps list
133
+ ```
134
+ Example Output:
135
+ ```
136
+ johndoe/rn2_android
137
+ johndoe/rn2_ios
138
+ ```
139
+
140
+ 2. **Create Corresponding Revopush Apps:**
141
+ - Remove the username prefix when creating apps in Revopush.
142
+ ```bash
143
+ revopush app add rn2_ios
144
+ revopush app add rn2_android
145
+ ```
146
+
147
+ 3. **Replicate Deployments:**
148
+ - List Appcenter deployments:
149
+ ```bash
150
+ appcenter codepush deployment list -k -a johndoe/rn2_ios
151
+ ```
152
+ - Add the same deployments in Revopush with identical keys:
153
+ ```bash
154
+ revopush deployment add rn2_ios appcenter_Staging -k <Staging_Key>
155
+ revopush deployment add rn2_ios appcenter_Production -k <Production_Key>
156
+ ```
157
+ - Repeat for Android:
158
+ ```bash
159
+ appcenter codepush deployment list -k -a johndoe/rn2_android
160
+ revopush deployment add rn2_android appcenter_Staging -k <Staging_Key>
161
+ revopush deployment add rn2_android appcenter_Production -k <Production_Key>
162
+ ```
163
+ ```
164
+
165
+ ### 7. **Provide Clear Instructions for New Setups**
166
+ - **Separate New Users and Migrators:** Clearly differentiate steps for users starting fresh versus those migrating.
167
+ - **Use Step-by-Step Guides:** Break down each action into simple, numbered steps.
168
+
169
+ **Revised New Setup Example:**
170
+ ```markdown
171
+ ### 4. Setting Up Revopush from Scratch
172
+
173
+ If you're new to Revopush and want to set up OTA updates for your app, follow these steps.
174
+
175
+ #### 4.1 Logging In
176
+
177
+ ```bash
178
+ revopush login
179
+ ```
180
+
181
+ #### 4.2 Creating Your Application
182
+
183
+ **For iOS:**
184
+ ```bash
185
+ revopush app add myAmazingApp_ios
186
+ ```
187
+
188
+ **For Android:**
189
+ ```bash
190
+ revopush app add myAmazingApp_android
191
+ ```
192
+
193
+ This will create your app along with default **Staging** and **Production** deployments.
194
+
195
+ #### 4.3 Creating Additional Deployments
196
+
197
+ If you need more deployments (e.g., Development, Testing), use:
198
+
199
+ ```bash
200
+ revopush deployment add myAmazingApp_android Development
201
+ ```
202
+
203
+ **List All Deployments:**
204
+ ```bash
205
+ revopush deployment ls myAmazingApp_android -k
206
+ ```
207
+ ```
208
+
209
+ ### 8. **Simplify Configuration Steps**
210
+ - **Use Clear Code Blocks:** Ensure code snippets are correctly formatted and easy to copy.
211
+ - **Explain Each Configuration Change:** Briefly describe why each change is necessary.
212
+
213
+ **Revised Configuration Example:**
214
+ ```markdown
215
+ ### 5. Updating Your React Native App to Use Revopush OTA
216
+
217
+ After setting up Revopush, update your React Native application to point to the Revopush server.
218
+
219
+ #### 5.1 iOS Configuration
220
+
221
+ 1. **Open `Info.plist`:** Add the following entries:
222
+ ```xml
223
+ <key>CodePushDeploymentKey</key>
224
+ <string>Your_Deployment_Key</string>
225
+ <key>CodePushServerURL</key>
226
+ <string>https://api.revopush.org</string>
227
+ ```
228
+
229
+ 2. **Dynamic Deployment Key (Optional):** To switch deployments dynamically in your JavaScript code, use Code-Push options.
230
+
231
+ #### 5.2 Android Configuration
232
+
233
+ 1. **Open `strings.xml`:** Add the following entries:
234
+ ```xml
235
+ <string moduleConfig="true" name="CodePushDeploymentKey">Your_Deployment_Key</string>
236
+ <string moduleConfig="true" name="CodePushServerUrl">https://api.revopush.org</string>
237
+ ```
238
+
239
+ 2. **Dynamic Deployment Key (Optional):** Override the deployment key in your JavaScript code using Code-Push options.
240
+ ```
241
+
242
+ ### 9. **Enhance the Release Process Section**
243
+ - **Consistent Instructions:** Ensure steps for iOS and Android are parallel for easier comparison.
244
+ - **Highlight Important Notes:** Use callouts or italics to emphasize crucial information.
245
+
246
+ **Revised Release Process Example:**
247
+ ```markdown
248
+ ### 6. Releasing Updates
249
+
250
+ Once your app is configured, you can release updates to your users.
251
+
252
+ #### 6.1 Releasing for iOS
253
+
254
+ ```bash
255
+ revopush release-react rn2_ios ios -d Staging
256
+ ```
257
+
258
+ **What Happens:**
259
+ - Bundles your JavaScript code.
260
+ - Uploads the bundle and assets to Revopush.
261
+ - Releases the update to the **Staging** deployment of **rn2_ios**.
262
+
263
+ **Success Message:**
264
+ ```
265
+ Successfully released an update to the "Staging" deployment of the "rn2_ios" app.
266
+ ```
267
+
268
+ #### 6.2 Releasing for Android
269
+
270
+ ```bash
271
+ revopush release-react rn2_android android -d appcenter-Staging
272
+ ```
273
+
274
+ **What Happens:**
275
+ - Bundles your JavaScript code.
276
+ - Uploads the bundle and assets to Revopush.
277
+ - Releases the update to the **appcenter-Staging** deployment of **rn2_android**.
278
+
279
+ **Success Message:**
280
+ ```
281
+ Successfully released an update to the "appcenter-Staging" deployment of the "rn2_android" app.
282
+ ```
283
+
284
+ **Additional Options:**
285
+ For more customization, view all options:
286
+ ```bash
287
+ revopush release-react -h
288
+ ```
289
+ ```
290
+
291
+ ### 10. **Consolidate Summary and Resources**
292
+ - **Recap Key Points:** Briefly summarize the migration or setup process.
293
+ - **Provide Clear Resource Links:** Ensure all resources are easily accessible and clearly labeled.
294
+
295
+ **Revised Summary Example:**
296
+ ```markdown
297
+ ### 7. Summary
298
+
299
+ Migrating your OTA updates from Appcenter to Revopush is straightforward with our CLI tools. Whether you're migrating existing applications or setting up new ones, Revopush offers a seamless experience with familiar commands and robust features.
300
+
301
+ **Quick Command Reference:**
302
+
303
+ | Appcenter Command | Revopush Command | Description |
304
+ |---------------------------------------|---------------------------------------|------------------------------------------------|
305
+ | `appcenter login` | `revopush login` | Log in to the CLI |
306
+ | `appcenter codepush deployment` | `revopush deployment` | Manage app deployments |
307
+ | `appcenter apps` | `revopush app` | Manage your applications |
308
+ | `appcenter codepush release-react` | `revopush release-react` | Release a React Native update |
309
+ | `appcenter logout` | `revopush logout` | Log out of the CLI |
310
+
311
+ **Helpful Resources:**
312
+ - [React Native CodePush GitHub](https://github.com/microsoft/react-native-code-push)
313
+ - [React Native Client SDK Documentation](https://docs.revopush.org/client-sdk)
314
+ - [Best Practices for Multi-Deployment Testing](https://docs.revopush.org/multi-deployment-testing)
315
+ - **Support:** Reach out to us at [support@revopush.org](mailto:support@revopush.org) for any questions or feedback.
316
+ ```
317
+
318
+ ### 11. **General Style Improvements**
319
+ - **Consistent Terminology:** Ensure terms like "deployments," "applications," and "CLI" are used consistently.
320
+ - **Active Voice:** Use active voice to make instructions clearer (e.g., "Run this command" instead of "This command should be run").
321
+ - **Avoid Redundancy:** Remove repetitive information to keep the guide concise.
322
+
323
+ ### 12. **Add a Troubleshooting Section**
324
+ - **Common Issues:** Address frequent problems users might encounter during migration or setup.
325
+ - **Solutions and Tips:** Provide clear solutions or point to resources where users can get help.
326
+
327
+ **Example Troubleshooting Section:**
328
+ ```markdown
329
+ ### 8. Troubleshooting
330
+
331
+ **Issue:** Unable to install Revopush CLI.
332
+ - **Solution:** Ensure you have the latest version of npm installed. Run `npm install -g npm@latest` and try installing the CLI again.
333
+
334
+ **Issue:** Deployment keys not recognized.
335
+ - **Solution:** Double-check that you've copied the correct keys from Appcenter and added them to Revopush. Use `revopush deployment ls <app_name> -k` to verify.
336
+
337
+ **Need More Help?**
338
+ Contact our support team at [support@revopush.org](mailto:support@revopush.org) or visit our [documentation](https://docs.revopush.org).
339
+ ```
340
+
341
+ ### 13. **Ensure Accessibility**
342
+ - **Readable Fonts and Colors:** If presenting this guide on a website, ensure the text is easily readable with appropriate font sizes and color contrasts.
343
+ - **Alt Text for Images:** If adding screenshots, include descriptive alt text for accessibility.
344
+
345
+ ### 14. **Test the Guide**
346
+ - **User Feedback:** Have someone unfamiliar with the process follow the guide to identify confusing sections.
347
+ - **Iterate Based on Feedback:** Use the feedback to make necessary adjustments for clarity and simplicity.
348
+
349
+ ---
350
+
351
+ Implementing these suggestions will make your guide more user-friendly, ensuring that new users can effortlessly understand and follow the process of installing the Revopush CLI and migrating their OTA updates from Appcenter.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revopush/code-push-cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Management CLI for the CodePush service",
5
5
  "main": "./script/cli.js",
6
6
  "scripts": {
@@ -11,13 +11,17 @@
11
11
  "lint:fix": "npx eslint ./script/**/*.ts --fix"
12
12
  },
13
13
  "bin": {
14
- "code-push-standalone": "./bin/script/cli.js"
14
+ "revopush": "./bin/script/cli.js"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "https://github.com/microsoft/code-push-server"
18
+ "url": "https://github.com/revopush/code-push-cli"
19
19
  },
20
20
  "author": "Microsoft",
21
+ "contributors": [
22
+ "Microsoft",
23
+ "Revopush"
24
+ ],
21
25
  "dependencies": {
22
26
  "backslash": "^0.2.0",
23
27
  "chalk": "^4.1.2",