airborne-devkit 0.9.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,59 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
3
+
4
+ - - -
5
+ ## airborne_cli-v0.1.0 - 2025-10-16
6
+ #### Bug Fixes
7
+ - node module dependancies corrected for npmjs - (0bb90db) - george.james
8
+ #### Features
9
+ - added airborne cli - (545c8a7) - yash.rajput.001
10
+
11
+ - - -
12
+
13
+ ## v0.7.0 - 2025-10-16
14
+ #### Miscellaneous Chores
15
+ - **(version)** v0.7.0 [skip ci] - (2107c1b) - Airborne Bot
16
+
17
+ - - -
18
+
19
+ ## v0.6.0 - 2025-10-16
20
+ #### Miscellaneous Chores
21
+ - **(version)** v0.6.0 [skip ci] - (e227b97) - Airborne Bot
22
+
23
+ - - -
24
+
25
+ ## v0.5.0 - 2025-10-16
26
+ #### Miscellaneous Chores
27
+ - **(version)** v0.5.0 [skip ci] - (04079d4) - Airborne Bot
28
+
29
+ - - -
30
+
31
+ ## v0.4.1 - 2025-10-16
32
+ #### Miscellaneous Chores
33
+ - **(version)** v0.4.1 [skip ci] - (8b6e744) - Airborne Bot
34
+
35
+ - - -
36
+
37
+ ## v0.4.0 - 2025-10-16
38
+ #### Miscellaneous Chores
39
+ - **(version)** v0.4.0 [skip ci] - (acd7a73) - Airborne Bot
40
+
41
+ - - -
42
+
43
+ ## airborne_cli_react_native-v0.0.1 - 2025-10-04
44
+ #### Bug Fixes
45
+ - node module dependancies corrected for npmjs - (0bb90db) - george.james
46
+
47
+ - - -
48
+
49
+ ## airborne_cli-v0.0.1 - 2025-09-24
50
+ #### Bug Fixes
51
+ - Reading release config from namespace folder/bundle ad fetching indexpath from release config - (75df672) - Yaswanth
52
+ - release_config in namespace.bundle in ios - (31a2dfd) - Yaswanth
53
+ - release config in namespace folder - (8d28490) - Yaswanth
54
+ #### Documentation
55
+ - Added docs for cli + release-it - (8c63c20) - Yaswanth
56
+
57
+ - - -
58
+
59
+ Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto).
package/README.md ADDED
@@ -0,0 +1,289 @@
1
+ # Airborne CLI for React Native
2
+
3
+ A command-line interface for managing Over-The-Air (OTA) updates in React Native applications using the Airborne platform. This tool streamlines the process of creating, configuring, and deploying OTA updates for both Android and iOS platforms.
4
+
5
+ ## 🚀 Features
6
+
7
+ - **Configuration Management**: Set up Airborne configurations for React Native projects
8
+ - **Platform Support**: Full support for Android and iOS platforms
9
+ - **OTA Updates**: Create and deploy Over-The-Air updates seamlessly
10
+ - **File Management**: Upload files directly or use external URLs
11
+ - **Package Creation**: Build deployable packages from local configurations
12
+ - **Authentication**: Secure login with client credentials
13
+ - **Interactive CLI**: User-friendly prompts and validations
14
+
15
+ ## 🏁 Quick Start
16
+
17
+ ### 1. Initialize Airborne Configuration
18
+
19
+ ```bash
20
+ node airborne_cli/src/index.js create-local-airborne-config airborne-react-native/example
21
+ ```
22
+
23
+ This creates an `airborne-config.json` file with your project settings.
24
+
25
+ ### 2. Create Release Configuration
26
+
27
+ ```bash
28
+ node airborne_cli/src/index.js create-local-release-config airborne-react-native/example
29
+ ```
30
+
31
+ ### 3. Authenticate with Airborne Server
32
+
33
+ ```bash
34
+ node airborne_cli/src/index.js login --client_id YOUR_CLIENT_ID --client_secret YOUR_CLIENT_SECRET
35
+ ```
36
+
37
+ ### 4. Upload Files and Create Package
38
+
39
+ ```bash
40
+ # Upload files to Airborne server
41
+ node airborne_cli/src/index.js create-remote-files -u airborne-react-native/example
42
+
43
+ # Create package
44
+ node airborne_cli/src/index.js create-remote-package airborne-react-native/example
45
+ ```
46
+
47
+ ## 🔐 Authentication
48
+
49
+ Before using remote operations, you need to authenticate with the Airborne server:
50
+
51
+ ```bash
52
+ node airborne_cli/src/index.js login --client_id <your-client-id> --client_secret <your-client-secret>
53
+ ```
54
+
55
+ **Security Note**: Store your credentials securely and avoid committing them to version control. Consider using environment variables:
56
+
57
+ ```bash
58
+ node airborne_cli/src/index.jslogin --client_id "$AIRBORNE_CLIENT_ID" --client_secret "$AIRBORNE_CLIENT_SECRET"
59
+ ```
60
+
61
+ ## ⚙️ Configuration
62
+
63
+ ### Airborne Configuration (`airborne-config.json`)
64
+
65
+ Created by `create-local-airborne-config` command:
66
+
67
+ ```json
68
+ {
69
+ "organisation": "your-org-name",
70
+ "namespace": "your-app-namespace",
71
+ "js_entry_file": "index.js",
72
+ "android": {
73
+ "index_file_path": "android/app/build/generated/assets/react/release/index.android.bundle"
74
+ },
75
+ "ios": {
76
+ "index_file_path": "ios/main.jsbundle"
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### Release Configuration
82
+
83
+ Platform-specific release configurations are created automatically with appropriate timeouts and file paths.
84
+
85
+ ## 📚 Commands Reference
86
+
87
+ ### Configuration Commands
88
+
89
+ #### `create-local-airborne-config [directoryPath]`
90
+
91
+ Initialize Airborne configuration for React Native projects.
92
+
93
+ **Options:**
94
+
95
+ - `-o, --organisation <org>` - Organisation name
96
+ - `-n, --namespace <namespace>` - Application namespace
97
+ - `-j, --js-entry-file <path>` - JavaScript entry file path
98
+ - `-a, --android-index-file <path>` - Android bundle output file
99
+ - `-i, --ios-index-file <path>` - iOS bundle output file
100
+
101
+ **Examples:**
102
+
103
+ ```bash
104
+ # Interactive mode
105
+ node airborne_cli/src/index.js
106
+
107
+ # With options
108
+ node airborne_cli/src/index.js -o "MyCompany" -n "MyApp"
109
+ ```
110
+
111
+ #### `create-local-release-config [directoryPath]`
112
+
113
+ Create platform-specific release configuration files.
114
+
115
+ **Options:**
116
+
117
+ - `-p, --platform <platform>` - Target platform (android | ios)
118
+ - `-b, --boot-timeout <timeout>` - Boot timeout in milliseconds
119
+ - `-r, --release-timeout <timeout>` - Release timeout in milliseconds
120
+
121
+ **Examples:**
122
+
123
+ ```bash
124
+ # Interactive mode
125
+ node airborne_cli/src/index.js create-local-release-config
126
+
127
+ # Specific platform
128
+ node airborne_cli/src/index.js create-local-release-config -p android
129
+
130
+ # With timeouts
131
+ node airborne_cli/src/index.js create-local-release-config -p ios -b 30000 -r 60000
132
+ ```
133
+
134
+ #### `update-local-release-config [directoryPath]`
135
+
136
+ Update existing release configuration files.
137
+
138
+ **Options:**
139
+
140
+ - `-p, --platform <platform>` - Target platform (android | ios)
141
+ - `-b, --boot-timeout <timeout>` - New boot timeout in milliseconds
142
+ - `-r, --release-timeout <timeout>` - New release timeout in milliseconds
143
+
144
+ ### Remote Operations
145
+
146
+ #### `login [directoryPath]`
147
+
148
+ Authenticate with the Airborne server.
149
+
150
+ **Options:**
151
+
152
+ - `--client_id <clientId>` - Client ID (required)
153
+ - `--client_secret <clientSecret>` - Client Secret (required)
154
+
155
+ #### `create-remote-files [directoryPath]`
156
+
157
+ Process local files and create remote file records.
158
+
159
+ **Options:**
160
+
161
+ - `-p, --platform <platform>` - Target platform (android | ios) (required)
162
+ - `-t, --tag <tag>` - Tag for file identification
163
+ - `-u, --upload` - Upload files directly to Airborne server
164
+
165
+ **Examples:**
166
+
167
+ ```bash
168
+ # Create file records with external URLs
169
+ node airborne_cli/src/index.js create-remote-files -p android
170
+
171
+ # Upload files to Airborne server
172
+ node airborne_cli/src/index.js create-remote-files -p ios --upload
173
+
174
+ # With custom tag
175
+ node airborne_cli/src/index.js create-remote-files -p android -t "v1.2.0" --upload
176
+ ```
177
+
178
+ #### `create-remote-package [directoryPath]`
179
+
180
+ Create a deployable package from local release configuration.
181
+
182
+ **Options:**
183
+
184
+ - `-p, --platform <platform>` - Target platform (android | ios) (required)
185
+ - `-t, --tag <tag>` - Package tag for identification
186
+
187
+ **Examples:**
188
+
189
+ ```bash
190
+ # Create package
191
+ node airborne_cli/src/index.js create-remote-package -p android
192
+
193
+ # With version tag
194
+ node airborne_cli/src/index.js create-remote-package -p ios -t "v2.1.0"
195
+ ```
196
+
197
+ ## 🔄 Complete Workflow Example
198
+
199
+ Here's a complete example of setting up OTA updates for a React Native project:
200
+
201
+ ```bash
202
+ # 1. Navigate to your React Native project
203
+ cd my-react-native-app
204
+
205
+ # 2. Initialize Airborne configuration
206
+ node airborne_cli/src/index.js \
207
+ -o "MyCompany" \
208
+ -n "MyApp" \
209
+ -j "index.js"
210
+
211
+ # 3. Create release configurations for both platforms
212
+ node airborne_cli/src/index.js create-local-release-config -p android -b 30000 -r 60000
213
+ node airborne_cli/src/index.js create-local-release-config -p ios -b 30000 -r 60000
214
+
215
+ # 4. Build your React Native bundles (standard RN commands)
216
+ npx react-native bundle --platform android --dev false --entry-file index.js \
217
+ --bundle-output android/app/build/generated/assets/react/release/index.android.bundle \
218
+ --assets-dest android/app/build/generated/res/react/release
219
+
220
+ npx react-native bundle --platform ios --dev false --entry-file index.js \
221
+ --bundle-output ios/main.jsbundle \
222
+ --assets-dest ios
223
+
224
+ # 5. Authenticate with Airborne
225
+ node airborne_cli/src/index.js login --client_id "$AIRBORNE_CLIENT_ID" --client_secret "$AIRBORNE_CLIENT_SECRET"
226
+
227
+ # 6. Upload files and create packages
228
+ node airborne_cli/src/index.js create-remote-files -p android --upload -t "v1.0.0"
229
+ node airborne_cli/src/index.js create-remote-package -p android -t "v1.0.0"
230
+
231
+ node airborne_cli/src/index.js create-remote-files -p ios --upload -t "v1.0.0"
232
+ node airborne_cli/src/index.js create-remote-package -p ios -t "v1.0.0"
233
+ ```
234
+
235
+ ## 📁 File Structure
236
+
237
+ After running the commands, your project will have:
238
+
239
+ ```
240
+ your-project/
241
+ ├── airborne-config.json # Main Airborne configuration
242
+ ├── airborne-release-config-android.json # Android release config
243
+ ├── airborne-release-config-ios.json # iOS release config
244
+ ├── .airborne # Authentication token and other things (keep secure)
245
+ └── ... (your existing React Native files)
246
+ ```
247
+
248
+ ## 🔧 Troubleshooting
249
+
250
+ ### Common Issues
251
+
252
+ **1. "Airborne config already exists" Error**
253
+
254
+ - The configuration file already exists in the directory
255
+ - Use `update-local-release-config` to modify existing configurations
256
+
257
+ **2. Authentication Errors**
258
+
259
+ - Verify your client credentials are correct and active
260
+ - Check network connectivity to Airborne servers
261
+ - Ensure you have write permissions in the target directory
262
+
263
+ **3. Platform Validation Errors**
264
+
265
+ - Platform must be exactly "android" or "ios" (lowercase)
266
+ - Use `-p` option to specify platform explicitly
267
+
268
+ **4. File Upload Issues**
269
+
270
+ - Ensure all referenced files exist in the specified paths
271
+ - Check file permissions and sizes
272
+ - Verify your authentication token is valid
273
+
274
+ ### Getting Help
275
+
276
+ For additional help with any command, use the `--help` flag:
277
+
278
+ ```bash
279
+ node airborne_cli/src/index.js --help
280
+ node airborne_cli/src/index.js --help
281
+ ```
282
+
283
+ ## 🛠️ Development
284
+
285
+ ### Requirements
286
+
287
+ - Node.js 18+
288
+ - React Native CLI
289
+ - Valid Airborne server credentials
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "airborne-devkit",
3
+ "version": "0.9.0",
4
+ "description": "Cli for Airborne",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "airborne-devkit": "src/index.js"
9
+ },
10
+ "scripts": {
11
+ "cli": "node src/index.js",
12
+ "release": "release-it --only-version"
13
+ },
14
+ "keywords": [
15
+ "cli",
16
+ "react",
17
+ "component-generator"
18
+ ],
19
+ "author": "Yaswanth Polisetti",
20
+ "license": "MIT",
21
+ "homepage": "https://github.com/juspay/airborne#readme",
22
+ "publishConfig": {
23
+ "registry": "https://registry.npmjs.org/"
24
+ },
25
+ "dependencies": {
26
+ "commander": "14.0.1",
27
+ "airborne-core-cli": "file:../airborne-core-cli"
28
+ },
29
+ "devDependencies": {
30
+ "release-it": "^17.10.0"
31
+ },
32
+ "release-it": {
33
+ "git": {
34
+ "commitMessage": "chore: release ${version}",
35
+ "tagName": "v${version}"
36
+ },
37
+ "npm": {
38
+ "publish": true
39
+ },
40
+ "github": {
41
+ "release": true
42
+ },
43
+ "plugins": {
44
+ "@release-it/conventional-changelog": {
45
+ "preset": {
46
+ "name": "angular"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,61 @@
1
+ require 'xcodeproj'
2
+
3
+ # Get namespace from command line argument
4
+ namespace = ARGV[0] || 'default'
5
+
6
+ # Define the path to your bundle file
7
+ bundle_file_path = File.join(Dir.pwd, "ios/release_config.json") # Update this path as needed
8
+
9
+ # Find the first Xcode project file
10
+ project_files = Dir[File.join(Dir.pwd, "ios/*.xcodeproj")]
11
+
12
+ if project_files.empty?
13
+ puts "*** No .xcodeproj file found in current directory"
14
+ exit 1
15
+ end
16
+
17
+ project_path = project_files[0]
18
+ puts "Found Xcode project: #{project_path}"
19
+
20
+ # Check if bundle file exists
21
+ unless File.exist?(bundle_file_path)
22
+ puts "*** Bundle file not found: #{bundle_file_path}"
23
+ exit 1
24
+ end
25
+
26
+ begin
27
+ # Open the Xcode project
28
+ project = Xcodeproj::Project.open(project_path)
29
+ target = project.targets[0]
30
+ puts "Using target: #{target.name}"
31
+
32
+ # Add to the root group (main project group)
33
+ main_group = project.main_group
34
+
35
+ bundle_filename = File.basename(bundle_file_path)
36
+
37
+ # Check if the bundle is already added to the root group
38
+ existing_file = main_group.find_file_by_path(bundle_filename)
39
+
40
+ if existing_file
41
+ puts "Bundle '#{bundle_filename}' is already in the project"
42
+ else
43
+ puts "Adding bundle file: #{bundle_filename}"
44
+
45
+ # Add the bundle file to the root group
46
+ file_ref = main_group.new_file(bundle_file_path)
47
+
48
+ # Add the bundle to the target's resources
49
+ target.add_resources([file_ref])
50
+
51
+ # Save the project
52
+ project.save
53
+ puts "Successfully added '#{bundle_filename}' to target '#{target.name}'"
54
+ end
55
+
56
+ rescue => e
57
+ puts "Error: #{e.message}"
58
+ exit 1
59
+ end
60
+
61
+ puts "Done!"