@algocare/react-native-code-push 12.3.0 → 12.4.0

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.
@@ -31,7 +31,7 @@ program
31
31
  type: 'list',
32
32
  name: 'app',
33
33
  message: 'Select the target app',
34
- choices: ['user', 'device'],
34
+ choices: ['user', 'device', 'b2c-device', 'home-device'],
35
35
  },
36
36
  {
37
37
  type: 'list',
@@ -8,7 +8,7 @@ async function getAppValue() {
8
8
  type: 'list',
9
9
  name: 'app',
10
10
  message: 'Select the target app',
11
- choices: ['user', 'device', 'b2c-device'],
11
+ choices: ['user', 'device', 'b2c-device', 'home-device'],
12
12
  },
13
13
  ])
14
14
  return app
@@ -13,7 +13,7 @@ const {
13
13
  program
14
14
  .command('create-history')
15
15
  .description('Creates a new release history for the binary app.')
16
- .option('-a, --app <string>', 'target app (user/device/b2c-device)')
16
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
17
17
  .option('-p, --platform <string>', 'target platform (ios/android)')
18
18
  .option('-i, --identifier <string>', 'target env identifier (dev/stg/prd)')
19
19
  .option('-b, --binary-version <string>', 'target binary version (x.y.z)')
@@ -25,9 +25,9 @@ program
25
25
  .action(async (options) => {
26
26
  if (
27
27
  options.app &&
28
- !['user', 'device', 'b2c-device'].includes(options.app)
28
+ !['user', 'device', 'b2c-device', 'home-device'].includes(options.app)
29
29
  ) {
30
- throw new Error('App must be either "user" or "device" or "b2c-device"')
30
+ throw new Error('App must be either "user" or "device" or "b2c-device" or "home-device"')
31
31
  }
32
32
 
33
33
  if (options.platform && !['ios', 'android'].includes(options.platform)) {
@@ -6,7 +6,7 @@ const { createPullRequestHistory } = require('./createPullRequestHistory')
6
6
  program
7
7
  .command('create-pr-history')
8
8
  .description('Creates a new pull request history.')
9
- .option('-a, --app <string>', 'target app (user/device)')
9
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
10
10
  .option('-p, --platform <string>', 'target platform (ios/android)')
11
11
  .option('-b, --binary-version <string>', 'target binary version (x.y.z)')
12
12
  .option(
@@ -11,7 +11,7 @@ const { createPullRequestRelease } = require('./createPullRequestRelease')
11
11
  program
12
12
  .command('create-pr-release')
13
13
  .description('Creates a new pull request release.')
14
- .option('-a, --app <string>', 'target app (user/device)')
14
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
15
15
  .option('-p, --platform <string>', 'target platform (ios/android)')
16
16
  .option('-b, --binary-version <string>', 'target binary version (x.y.z)')
17
17
  .option('-r, --pr-number <number>', 'pull request number')
@@ -20,7 +20,7 @@ program
20
20
  .description(
21
21
  'Deploys a new CodePush update for a target binary app.\nAfter creating the CodePush bundle, it uploads the file and updates the ReleaseHistory information.\n`bundleUploader`, `getReleaseHistory`, and `setReleaseHistory` functions should be implemented in the config file.'
22
22
  )
23
- .option('-a, --app <string>', 'target app (user/device/b2c-device)')
23
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
24
24
  .option('-p, --platform <string>', 'target platform (ios/android)')
25
25
  .option('-i, --identifier <string>', 'target env identifier (dev/stg/prd)')
26
26
  .option('-b, --binary-version <string>', 'target binary version (x.y.z)')
@@ -57,9 +57,9 @@ program
57
57
  .action(async (options) => {
58
58
  if (
59
59
  options.app &&
60
- !['user', 'device', 'b2c-device'].includes(options.app)
60
+ !['user', 'device', 'b2c-device', 'home-device'].includes(options.app)
61
61
  ) {
62
- throw new Error('App must be either "user" or "device" or "b2c-device"')
62
+ throw new Error('App must be either "user" or "device" or "b2c-device" or "home-device"')
63
63
  }
64
64
 
65
65
  if (options.platform && !['ios', 'android'].includes(options.platform)) {
@@ -6,7 +6,7 @@ const { removePullRequestHistory } = require('./removePullRequestHistory')
6
6
  program
7
7
  .command('remove-pr-history')
8
8
  .description('Removes a pull request history.')
9
- .option('-a, --app <string>', 'target app (user/device)')
9
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
10
10
  .option('-p, --platform <string>', 'target platform (ios/android)')
11
11
  .option('-r, --pr-number <number>', 'pull request number')
12
12
  .option(
@@ -13,7 +13,7 @@ program
13
13
  .description(
14
14
  'Retrieves and prints the release history of a specific binary version.\n`getReleaseHistory` function should be implemented in the config file.'
15
15
  )
16
- .option('-a, --app <string>', 'target app (user/device/b2c-device)')
16
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
17
17
  .option('-p, --platform <string>', 'target platform (ios/android)')
18
18
  .option('-i, --identifier <string>', 'target env identifier (dev/stg/prd)')
19
19
  .option('-b, --binary-version <string>', 'target binary version (x.y.z)')
@@ -25,9 +25,9 @@ program
25
25
  .action(async (options) => {
26
26
  if (
27
27
  options.app &&
28
- !['user', 'device', 'b2c-device'].includes(options.app)
28
+ !['user', 'device', 'b2c-device', 'home-device'].includes(options.app)
29
29
  ) {
30
- throw new Error('App must be either "user" or "device" or "b2c-device"')
30
+ throw new Error('App must be either "user" or "device" or "b2c-device" or "home-device"')
31
31
  }
32
32
 
33
33
  if (options.platform && !['ios', 'android'].includes(options.platform)) {
@@ -15,7 +15,7 @@ program
15
15
  .description(
16
16
  'Updates the release history for a specific binary version.\n`getReleaseHistory`, `setReleaseHistory` functions should be implemented in the config file.'
17
17
  )
18
- .option('-a, --app <string>', 'target app (user/device/b2c-device)')
18
+ .option('-a, --app <string>', 'target app (user/device/b2c-device/home-device)')
19
19
  .option('-p, --platform <string>', 'target platform (ios/android)')
20
20
  .option('-i, --identifier <string>', 'target env identifier (dev/stg/prd)')
21
21
  .option('-b, --binary-version <string>', 'target binary version (x.y.z)')
@@ -35,9 +35,9 @@ program
35
35
  .action(async (options) => {
36
36
  if (
37
37
  options.app &&
38
- !['user', 'device', 'b2c-device'].includes(options.app)
38
+ !['user', 'device', 'b2c-device', 'home-device'].includes(options.app)
39
39
  ) {
40
- throw new Error('App must be either "user" or "device" or "b2c-device"')
40
+ throw new Error('App must be either "user" or "device" or "b2c-device" or "home-device"')
41
41
  }
42
42
 
43
43
  if (options.platform && !['ios', 'android'].includes(options.platform)) {
@@ -31,7 +31,7 @@ function getCDNUrl(identifier: 'stg' | 'prd') {
31
31
  }
32
32
 
33
33
  function historyJsonFileRemotePath(
34
- app: 'user' | 'device',
34
+ app: 'user' | 'device' | 'b2c-device' | 'home-device',
35
35
  platform: 'ios' | 'android',
36
36
  binaryVersion: string
37
37
  ) {
@@ -39,7 +39,7 @@ function historyJsonFileRemotePath(
39
39
  }
40
40
 
41
41
  function bundleFileRemotePath(
42
- app: 'user' | 'device',
42
+ app: 'user' | 'device' | 'b2c-device' | 'home-device',
43
43
  platform: 'ios' | 'android',
44
44
  fileName: string
45
45
  ) {
@@ -49,7 +49,7 @@ function bundleFileRemotePath(
49
49
  const Config: CliConfigInterface = {
50
50
  bundleUploader: async (
51
51
  source: string,
52
- app: 'user' | 'device',
52
+ app: 'user' | 'device' | 'b2c-device' | 'home-device',
53
53
  platform: 'ios' | 'android',
54
54
  identifier: 'stg' | 'prd'
55
55
  ): Promise<{ downloadUrl: string }> => {
@@ -81,7 +81,7 @@ const Config: CliConfigInterface = {
81
81
  },
82
82
 
83
83
  getReleaseHistory: async (
84
- app: 'user' | 'device',
84
+ app: 'user' | 'device' | 'b2c-device' | 'home-device',
85
85
  targetBinaryVersion: string,
86
86
  platform: 'ios' | 'android',
87
87
  identifier: 'stg' | 'prd'
@@ -101,7 +101,7 @@ const Config: CliConfigInterface = {
101
101
  targetBinaryVersion: string,
102
102
  jsonFilePath: string,
103
103
  releaseInfo: ReleaseHistoryInterface,
104
- app: 'user' | 'device',
104
+ app: 'user' | 'device' | 'b2c-device' | 'home-device',
105
105
  platform: 'ios' | 'android',
106
106
  identifier: 'stg' | 'prd'
107
107
  ): Promise<void> => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algocare/react-native-code-push",
3
- "version": "12.3.0",
3
+ "version": "12.4.0",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "main": "CodePush.js",
6
6
  "typings": "typings/react-native-code-push.d.ts",