airborne-devkit 0.22.2 → 0.23.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 +60 -0
- package/package.json +1 -1
- package/src/index.js +14 -2
- package/src/utils/common.js +34 -18
- package/src/utils/release.js +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,66 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
|
3
3
|
|
|
4
4
|
- - -
|
|
5
|
+
## airborne_cli-v0.2.0 - 2026-02-05
|
|
6
|
+
#### Features
|
|
7
|
+
- add Expo project support in cli - (751a4f5) - Yash Rajput
|
|
8
|
+
|
|
9
|
+
- - -
|
|
10
|
+
|
|
11
|
+
## v0.22.2 - 2026-02-05
|
|
12
|
+
#### Miscellaneous Chores
|
|
13
|
+
- **(version)** v0.22.2 [skip ci] - (8a99832) - Airborne Bot
|
|
14
|
+
|
|
15
|
+
- - -
|
|
16
|
+
|
|
17
|
+
## v0.22.1 - 2026-02-05
|
|
18
|
+
#### Miscellaneous Chores
|
|
19
|
+
- **(version)** v0.22.1 [skip ci] - (ad0c79b) - Airborne Bot
|
|
20
|
+
|
|
21
|
+
- - -
|
|
22
|
+
|
|
23
|
+
## v0.22.0 - 2026-02-05
|
|
24
|
+
#### Miscellaneous Chores
|
|
25
|
+
- **(version)** v0.22.0 [skip ci] - (2caa013) - Airborne Bot
|
|
26
|
+
|
|
27
|
+
- - -
|
|
28
|
+
|
|
29
|
+
## v0.21.0 - 2026-02-05
|
|
30
|
+
#### Miscellaneous Chores
|
|
31
|
+
- **(version)** v0.21.0 [skip ci] - (62d2ed4) - Airborne Bot
|
|
32
|
+
|
|
33
|
+
- - -
|
|
34
|
+
|
|
35
|
+
## v0.20.1 - 2026-02-05
|
|
36
|
+
#### Miscellaneous Chores
|
|
37
|
+
- **(version)** v0.20.1 [skip ci] - (4c34176) - Airborne Bot
|
|
38
|
+
|
|
39
|
+
- - -
|
|
40
|
+
|
|
41
|
+
## v0.20.0 - 2026-02-05
|
|
42
|
+
#### Miscellaneous Chores
|
|
43
|
+
- **(version)** v0.20.0 [skip ci] - (ea2c83e) - Airborne Bot
|
|
44
|
+
|
|
45
|
+
- - -
|
|
46
|
+
|
|
47
|
+
## v0.19.1 - 2026-02-05
|
|
48
|
+
#### Miscellaneous Chores
|
|
49
|
+
- **(version)** v0.19.1 [skip ci] - (39ef9bf) - Airborne Bot
|
|
50
|
+
|
|
51
|
+
- - -
|
|
52
|
+
|
|
53
|
+
## v0.19.0 - 2026-02-05
|
|
54
|
+
#### Miscellaneous Chores
|
|
55
|
+
- **(version)** v0.19.0 [skip ci] - (e5ade3a) - Airborne Bot
|
|
56
|
+
|
|
57
|
+
- - -
|
|
58
|
+
|
|
59
|
+
## v0.18.3 - 2026-02-05
|
|
60
|
+
#### Miscellaneous Chores
|
|
61
|
+
- **(version)** v0.18.3 [skip ci] - (9114fb9) - Airborne Bot
|
|
62
|
+
|
|
63
|
+
- - -
|
|
64
|
+
|
|
5
65
|
## airborne_cli-v0.1.8 - 2026-01-06
|
|
6
66
|
#### Bug Fixes
|
|
7
67
|
- support Google OAuth in personal access token flow - (4737bd0) - Yash Rajput
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -26,7 +26,7 @@ const program = new Command();
|
|
|
26
26
|
program
|
|
27
27
|
.name("airborne-devkit")
|
|
28
28
|
.description("Command-line interface for Airborne operations")
|
|
29
|
-
.version("0.
|
|
29
|
+
.version("0.23.0");
|
|
30
30
|
|
|
31
31
|
coreCli.commands.forEach((cmd, i) => {
|
|
32
32
|
if (cmd._name !== "PostLogin") {
|
|
@@ -52,7 +52,8 @@ program
|
|
|
52
52
|
-n <namespace> \\
|
|
53
53
|
-j <js-entry-file> \\
|
|
54
54
|
-a <android-index-file> \\
|
|
55
|
-
-i <ios-index-file>
|
|
55
|
+
-i <ios-index-file> \\
|
|
56
|
+
-e
|
|
56
57
|
|
|
57
58
|
Parameters:
|
|
58
59
|
[directoryPath] (optional) : Directory where config will be created (defaults to current directory)
|
|
@@ -61,6 +62,7 @@ program
|
|
|
61
62
|
-j, --js-entry-file <string> (optional) : Path to the JavaScript entry file
|
|
62
63
|
-a, --android-index-file <string> (optional) : Path to the Android bundle output file
|
|
63
64
|
-i, --ios-index-file <string> (optional) : Path to the iOS bundle output file
|
|
65
|
+
-e, --expo (optional) : Indicates if the project is using Expo
|
|
64
66
|
|
|
65
67
|
`
|
|
66
68
|
)
|
|
@@ -75,6 +77,7 @@ program
|
|
|
75
77
|
"Path to the Android bundle output file"
|
|
76
78
|
)
|
|
77
79
|
.option("-i, --ios-index-file <path>", "Path to the iOS bundle output file")
|
|
80
|
+
.option("-e, --expo", "Indicates if the project is using Expo")
|
|
78
81
|
.addHelpText(
|
|
79
82
|
"after",
|
|
80
83
|
`
|
|
@@ -99,6 +102,15 @@ Examples:
|
|
|
99
102
|
-o "MyCompany" \\
|
|
100
103
|
-n "MyApp"
|
|
101
104
|
|
|
105
|
+
5. Create config for an Expo project:
|
|
106
|
+
$ airborne-devkit create-local-airborne-config -e
|
|
107
|
+
|
|
108
|
+
6. Create config for Expo project with all options:
|
|
109
|
+
$ airborne-devkit create-local-airborne-config \\
|
|
110
|
+
-o "MyCompany" \\
|
|
111
|
+
-n "MyApp" \\
|
|
112
|
+
-e
|
|
113
|
+
|
|
102
114
|
Notes:
|
|
103
115
|
- If directoryPath is not provided, current working directory will be used
|
|
104
116
|
- If organisation or namespace and others are not provided, you'll be prompted to enter them
|
package/src/utils/common.js
CHANGED
|
@@ -16,6 +16,7 @@ const cliToConfigMap = {
|
|
|
16
16
|
directoryPath: "directory_path",
|
|
17
17
|
bootTimeout: "boot_timeout",
|
|
18
18
|
releaseConfigTimeout: "release_config_timeout",
|
|
19
|
+
expo: "expo",
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export function normalizeOptions(options = {}) {
|
|
@@ -56,6 +57,7 @@ export async function writeAirborneConfig(options) {
|
|
|
56
57
|
const config = {
|
|
57
58
|
organisation: filledOptions.organisation,
|
|
58
59
|
namespace: filledOptions.namespace,
|
|
60
|
+
expo: filledOptions.expo,
|
|
59
61
|
js_entry_file: filledOptions.js_entry_file,
|
|
60
62
|
android: {
|
|
61
63
|
index_file_path: filledOptions.android.index_file_path,
|
|
@@ -77,6 +79,32 @@ export async function writeAirborneConfig(options) {
|
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
export async function fillAirborneConfigOptions(options = {}) {
|
|
82
|
+
const result = { ...options };
|
|
83
|
+
const getNested = (obj, path) =>
|
|
84
|
+
path.split(".").reduce((acc, k) => (acc ? acc[k] : undefined), obj);
|
|
85
|
+
|
|
86
|
+
const setNested = (obj, path, value) => {
|
|
87
|
+
const parts = path.split(".");
|
|
88
|
+
let temp = obj;
|
|
89
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
90
|
+
if (!temp[parts[i]]) temp[parts[i]] = {};
|
|
91
|
+
temp = temp[parts[i]];
|
|
92
|
+
}
|
|
93
|
+
temp[parts[parts.length - 1]] = value;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// Ask for expo first
|
|
97
|
+
if (getNested(result, "expo") === undefined) {
|
|
98
|
+
const expoValue = await promptWithType(
|
|
99
|
+
"\n Is this an Expo project? (y/n, default: no): ",
|
|
100
|
+
"boolean",
|
|
101
|
+
false
|
|
102
|
+
);
|
|
103
|
+
setNested(result, "expo", expoValue);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const isExpo = getNested(result, "expo");
|
|
107
|
+
|
|
80
108
|
const questions = [
|
|
81
109
|
{
|
|
82
110
|
key: "organisation",
|
|
@@ -90,9 +118,11 @@ export async function fillAirborneConfigOptions(options = {}) {
|
|
|
90
118
|
},
|
|
91
119
|
{
|
|
92
120
|
key: "js_entry_file",
|
|
93
|
-
question:
|
|
121
|
+
question: isExpo
|
|
122
|
+
? "\n Please enter the JavaScript entry file (default: node_modules/expo-router/entry.js): "
|
|
123
|
+
: "\n Please enter the JavaScript entry file (default: index.js): ",
|
|
94
124
|
expectedType: "string",
|
|
95
|
-
defaultValue: "index.js",
|
|
125
|
+
defaultValue: isExpo ? "node_modules/expo-router/entry.js" : "index.js",
|
|
96
126
|
},
|
|
97
127
|
{
|
|
98
128
|
key: "android.index_file_path",
|
|
@@ -110,25 +140,11 @@ export async function fillAirborneConfigOptions(options = {}) {
|
|
|
110
140
|
},
|
|
111
141
|
];
|
|
112
142
|
|
|
113
|
-
const result = { ...options };
|
|
114
|
-
const getNested = (obj, path) =>
|
|
115
|
-
path.split(".").reduce((acc, k) => (acc ? acc[k] : undefined), obj);
|
|
116
|
-
|
|
117
|
-
const setNested = (obj, path, value) => {
|
|
118
|
-
const parts = path.split(".");
|
|
119
|
-
let temp = obj;
|
|
120
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
121
|
-
if (!temp[parts[i]]) temp[parts[i]] = {};
|
|
122
|
-
temp = temp[parts[i]];
|
|
123
|
-
}
|
|
124
|
-
temp[parts[parts.length - 1]] = value;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
143
|
for (const { key, question, expectedType, defaultValue } of questions) {
|
|
128
144
|
let value;
|
|
129
145
|
|
|
130
|
-
if (getNested(
|
|
131
|
-
value = getNested(
|
|
146
|
+
if (getNested(result, key) !== undefined) {
|
|
147
|
+
value = getNested(result, key);
|
|
132
148
|
} else if (question) {
|
|
133
149
|
value = await promptWithType(question, expectedType, defaultValue);
|
|
134
150
|
}
|
package/src/utils/release.js
CHANGED
|
@@ -109,7 +109,13 @@ export async function createLocalReleaseConfig(
|
|
|
109
109
|
fs.mkdirSync(fullBuildFolderPath, { recursive: true });
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const
|
|
112
|
+
const isExpo = airborneConfig.expo || false;
|
|
113
|
+
let command;
|
|
114
|
+
if (isExpo) {
|
|
115
|
+
command = `cd '${options.directory_path}' && npx expo export:embed --platform ${platform} --dev false --entry-file '${entry_file}' --bundle-output '${build_folder}/${index_file_path}' --assets-dest '${build_folder}'`;
|
|
116
|
+
} else {
|
|
117
|
+
command = `cd '${options.directory_path}' && npx react-native bundle --platform ${platform} --dev false --entry-file '${entry_file}' --bundle-output '${build_folder}/${index_file_path}' --assets-dest '${build_folder}'`;
|
|
118
|
+
}
|
|
113
119
|
|
|
114
120
|
const bundleResult = await executeReactNativeBundleCommand(command);
|
|
115
121
|
|
|
@@ -245,7 +251,13 @@ export async function updateLocalReleaseConfig(
|
|
|
245
251
|
}
|
|
246
252
|
});
|
|
247
253
|
|
|
248
|
-
const
|
|
254
|
+
const isExpo = airborneConfig.expo || false;
|
|
255
|
+
let command;
|
|
256
|
+
if (isExpo) {
|
|
257
|
+
command = `cd '${options.directory_path}' && npx expo export:embed --platform ${platform} --dev false --entry-file '${entry_file}' --bundle-output '${build_folder}/${index_file_path}' --assets-dest '${build_folder}'`;
|
|
258
|
+
} else {
|
|
259
|
+
command = `cd '${options.directory_path}' && npx react-native bundle --platform ${platform} --dev false --entry-file '${entry_file}' --bundle-output '${build_folder}/${index_file_path}' --assets-dest '${build_folder}'`;
|
|
260
|
+
}
|
|
249
261
|
|
|
250
262
|
const bundleResult = await executeReactNativeBundleCommand(command);
|
|
251
263
|
|