airborne-core-cli 0.24.4 → 0.26.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 +114 -0
- package/action.js +25 -1
- package/index.js +94 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,120 @@
|
|
|
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_core_cli-v0.2.5 - 2026-03-09
|
|
6
|
+
#### Bug Fixes
|
|
7
|
+
- update cli - (7a9f6ff) - Yash Rajput
|
|
8
|
+
|
|
9
|
+
- - -
|
|
10
|
+
|
|
11
|
+
## v0.24.4 - 2026-03-09
|
|
12
|
+
#### Miscellaneous Chores
|
|
13
|
+
- **(version)** v0.24.4 [skip ci] - (3398e93) - Airborne Bot
|
|
14
|
+
|
|
15
|
+
- - -
|
|
16
|
+
|
|
17
|
+
## v0.24.3 - 2026-03-09
|
|
18
|
+
#### Miscellaneous Chores
|
|
19
|
+
- **(version)** v0.24.3 [skip ci] - (bd6d431) - Airborne Bot
|
|
20
|
+
|
|
21
|
+
- - -
|
|
22
|
+
|
|
23
|
+
## v0.24.2 - 2026-03-09
|
|
24
|
+
#### Miscellaneous Chores
|
|
25
|
+
- **(version)** v0.24.2 [skip ci] - (3c27527) - Airborne Bot
|
|
26
|
+
|
|
27
|
+
- - -
|
|
28
|
+
|
|
29
|
+
## v0.24.1 - 2026-03-09
|
|
30
|
+
#### Miscellaneous Chores
|
|
31
|
+
- **(version)** v0.24.1 [skip ci] - (c89ac50) - Airborne Bot
|
|
32
|
+
|
|
33
|
+
- - -
|
|
34
|
+
|
|
35
|
+
## v0.24.0 - 2026-03-09
|
|
36
|
+
#### Miscellaneous Chores
|
|
37
|
+
- **(version)** v0.24.0 [skip ci] - (d127ca2) - Airborne Bot
|
|
38
|
+
|
|
39
|
+
- - -
|
|
40
|
+
|
|
41
|
+
## v0.23.3 - 2026-03-09
|
|
42
|
+
#### Miscellaneous Chores
|
|
43
|
+
- **(version)** v0.23.3 [skip ci] - (fea39f7) - Airborne Bot
|
|
44
|
+
|
|
45
|
+
- - -
|
|
46
|
+
|
|
47
|
+
## v0.23.2 - 2026-03-09
|
|
48
|
+
#### Miscellaneous Chores
|
|
49
|
+
- **(version)** v0.23.2 [skip ci] - (1a6ac61) - Airborne Bot
|
|
50
|
+
|
|
51
|
+
- - -
|
|
52
|
+
|
|
53
|
+
## v0.23.1 - 2026-03-09
|
|
54
|
+
#### Miscellaneous Chores
|
|
55
|
+
- **(version)** v0.23.1 [skip ci] - (1644fd6) - Airborne Bot
|
|
56
|
+
|
|
57
|
+
- - -
|
|
58
|
+
|
|
59
|
+
## v0.23.0 - 2026-03-09
|
|
60
|
+
#### Miscellaneous Chores
|
|
61
|
+
- **(version)** v0.23.0 [skip ci] - (0d2fcd5) - Airborne Bot
|
|
62
|
+
|
|
63
|
+
- - -
|
|
64
|
+
|
|
65
|
+
## v0.22.2 - 2026-03-09
|
|
66
|
+
#### Miscellaneous Chores
|
|
67
|
+
- **(version)** v0.22.2 [skip ci] - (8a99832) - Airborne Bot
|
|
68
|
+
|
|
69
|
+
- - -
|
|
70
|
+
|
|
71
|
+
## v0.22.1 - 2026-03-09
|
|
72
|
+
#### Miscellaneous Chores
|
|
73
|
+
- **(version)** v0.22.1 [skip ci] - (ad0c79b) - Airborne Bot
|
|
74
|
+
|
|
75
|
+
- - -
|
|
76
|
+
|
|
77
|
+
## v0.22.0 - 2026-03-09
|
|
78
|
+
#### Miscellaneous Chores
|
|
79
|
+
- **(version)** v0.22.0 [skip ci] - (2caa013) - Airborne Bot
|
|
80
|
+
|
|
81
|
+
- - -
|
|
82
|
+
|
|
83
|
+
## v0.21.0 - 2026-03-09
|
|
84
|
+
#### Miscellaneous Chores
|
|
85
|
+
- **(version)** v0.21.0 [skip ci] - (62d2ed4) - Airborne Bot
|
|
86
|
+
|
|
87
|
+
- - -
|
|
88
|
+
|
|
89
|
+
## v0.20.1 - 2026-03-09
|
|
90
|
+
#### Miscellaneous Chores
|
|
91
|
+
- **(version)** v0.20.1 [skip ci] - (4c34176) - Airborne Bot
|
|
92
|
+
|
|
93
|
+
- - -
|
|
94
|
+
|
|
95
|
+
## v0.20.0 - 2026-03-09
|
|
96
|
+
#### Miscellaneous Chores
|
|
97
|
+
- **(version)** v0.20.0 [skip ci] - (ea2c83e) - Airborne Bot
|
|
98
|
+
|
|
99
|
+
- - -
|
|
100
|
+
|
|
101
|
+
## v0.19.1 - 2026-03-09
|
|
102
|
+
#### Miscellaneous Chores
|
|
103
|
+
- **(version)** v0.19.1 [skip ci] - (39ef9bf) - Airborne Bot
|
|
104
|
+
|
|
105
|
+
- - -
|
|
106
|
+
|
|
107
|
+
## v0.19.0 - 2026-03-09
|
|
108
|
+
#### Miscellaneous Chores
|
|
109
|
+
- **(version)** v0.19.0 [skip ci] - (e5ade3a) - Airborne Bot
|
|
110
|
+
|
|
111
|
+
- - -
|
|
112
|
+
|
|
113
|
+
## v0.18.3 - 2026-03-09
|
|
114
|
+
#### Miscellaneous Chores
|
|
115
|
+
- **(version)** v0.18.3 [skip ci] - (9114fb9) - Airborne Bot
|
|
116
|
+
|
|
117
|
+
- - -
|
|
118
|
+
|
|
5
119
|
## airborne_core_cli-v0.2.4 - 2026-01-06
|
|
6
120
|
#### Bug Fixes
|
|
7
121
|
- support Google OAuth in personal access token flow - (4737bd0) - Yash Rajput
|
package/action.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import { promises as fsPromises } from "fs";
|
|
3
3
|
import path from "path";
|
|
4
|
-
import { CreateApplicationCommand, CreateDimensionCommand, CreateFileCommand, CreateOrganisationCommand, CreatePackageCommand, CreateReleaseCommand, DeleteDimensionCommand, GetReleaseCommand, GetUserCommand, ListDimensionsCommand, ListFilesCommand, ListOrganisationsCommand, ListPackagesCommand, ListReleasesCommand, PostLoginCommand, RequestOrganisationCommand, ServeReleaseCommand, ServeReleaseV2Command, UpdateDimensionCommand, UploadFileCommand, AirborneClient } from "airborne-server-sdk"
|
|
4
|
+
import { CreateApplicationCommand, CreateDimensionCommand, CreateFileCommand, CreateOrganisationCommand, CreatePackageCommand, CreateReleaseCommand, DeleteDimensionCommand, GetReleaseCommand, GetUserCommand, ListDimensionsCommand, ListFileGroupsCommand, ListFilesCommand, ListOrganisationsCommand, ListPackagesCommand, ListReleasesCommand, PostLoginCommand, RequestOrganisationCommand, ServeReleaseCommand, ServeReleaseV2Command, UpdateDimensionCommand, UploadFileCommand, AirborneClient } from "airborne-server-sdk"
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { dirname } from 'path';
|
|
7
7
|
|
|
@@ -374,6 +374,30 @@ export async function ListDimensionsAction(paramsFile, options){
|
|
|
374
374
|
return await client.send(command);
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
+
export async function ListFileGroupsAction(paramsFile, options){
|
|
378
|
+
let finalOptions = {};
|
|
379
|
+
const requiredParams = ["organisation","application","token"];
|
|
380
|
+
|
|
381
|
+
if (paramsFile && paramsFile.startsWith('@')) {
|
|
382
|
+
const jsonFilePath = paramsFile.slice(1);
|
|
383
|
+
finalOptions = mergeOptionsWithJsonFile(options, jsonFilePath, requiredParams);
|
|
384
|
+
} else if (paramsFile) {
|
|
385
|
+
throw new Error("Params file must start with @ (e.g., @params.json)");
|
|
386
|
+
} else {
|
|
387
|
+
finalOptions = options;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Validate that all required options are present
|
|
391
|
+
validateRequiredOptions(finalOptions, requiredParams);
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
const client = await getClient(options.token, true);
|
|
397
|
+
const command = new ListFileGroupsCommand(finalOptions);
|
|
398
|
+
return await client.send(command);
|
|
399
|
+
}
|
|
400
|
+
|
|
377
401
|
export async function ListFilesAction(paramsFile, options){
|
|
378
402
|
let finalOptions = {};
|
|
379
403
|
const requiredParams = ["organisation","application","token"];
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { CreateApplicationAction, CreateDimensionAction, CreateFileAction, CreateOrganisationAction, CreatePackageAction, CreateReleaseAction, DeleteDimensionAction, GetReleaseAction, GetUserAction, ListDimensionsAction, ListFilesAction, ListOrganisationsAction, ListPackagesAction, ListReleasesAction, PostLoginAction, RequestOrganisationAction, ServeReleaseAction, ServeReleaseV2Action, UpdateDimensionAction, UploadFileAction } from "./action.js";
|
|
3
|
+
import { CreateApplicationAction, CreateDimensionAction, CreateFileAction, CreateOrganisationAction, CreatePackageAction, CreateReleaseAction, DeleteDimensionAction, GetReleaseAction, GetUserAction, ListDimensionsAction, ListFileGroupsAction, ListFilesAction, ListOrganisationsAction, ListPackagesAction, ListReleasesAction, PostLoginAction, RequestOrganisationAction, ServeReleaseAction, ServeReleaseV2Action, UpdateDimensionAction, UploadFileAction } from "./action.js";
|
|
4
4
|
import { promises as fsPromises } from "fs";
|
|
5
5
|
import fs from "fs";
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
@@ -117,7 +117,7 @@ function printColoredJSON(obj, indent = 2) {
|
|
|
117
117
|
const program = new Command()
|
|
118
118
|
.name("airborne-core-cli")
|
|
119
119
|
.description("Command-line interface for Airborne OTA operations")
|
|
120
|
-
.version("0.
|
|
120
|
+
.version("0.26.0");
|
|
121
121
|
|
|
122
122
|
program
|
|
123
123
|
.command("CreateApplication")
|
|
@@ -863,6 +863,95 @@ JSON file format (params.json):
|
|
|
863
863
|
});
|
|
864
864
|
|
|
865
865
|
|
|
866
|
+
program
|
|
867
|
+
.command("ListFileGroups")
|
|
868
|
+
.argument('[params_file]', 'JSON file containing all parameters (use @params.json format)')
|
|
869
|
+
.option("--page <page>", "page parameter", (value) => {
|
|
870
|
+
const parsed = parseInt(value, 10);
|
|
871
|
+
if (isNaN(parsed)) {
|
|
872
|
+
throw new Error("--page must be a valid integer");
|
|
873
|
+
}
|
|
874
|
+
return parsed;
|
|
875
|
+
})
|
|
876
|
+
.option("--count <count>", "count parameter", (value) => {
|
|
877
|
+
const parsed = parseInt(value, 10);
|
|
878
|
+
if (isNaN(parsed)) {
|
|
879
|
+
throw new Error("--count must be a valid integer");
|
|
880
|
+
}
|
|
881
|
+
return parsed;
|
|
882
|
+
})
|
|
883
|
+
.option("--search <search>", "search parameter")
|
|
884
|
+
.option("--tags <tags>", "tags parameter")
|
|
885
|
+
.option("--organisation <organisation>", "organisation parameter")
|
|
886
|
+
.option("--application <application>", "application parameter")
|
|
887
|
+
.option("--token <token>", "Bearer token for authentication")
|
|
888
|
+
.description(`
|
|
889
|
+
List file groups operation:
|
|
890
|
+
|
|
891
|
+
Usage 1 - Individual options:
|
|
892
|
+
$ airborne-core-cli ListFileGroups \\
|
|
893
|
+
--organisation <organisation> \\
|
|
894
|
+
--application <application> \\
|
|
895
|
+
--token <string> \\
|
|
896
|
+
[--page <page>]
|
|
897
|
+
|
|
898
|
+
Usage 2 - JSON file:
|
|
899
|
+
airborne-core-cli ListFileGroups @file.json
|
|
900
|
+
|
|
901
|
+
Usage 3 - Mixed Usage:
|
|
902
|
+
$ airborne-core-cli ListFileGroups @params.json --page <value> --count <value> --token <value>
|
|
903
|
+
|
|
904
|
+
Parameters:
|
|
905
|
+
--page <integer> (optional) : Page number for pagination
|
|
906
|
+
--count <integer> (optional) : Number of groups per page
|
|
907
|
+
--search <string> (optional) : Search query to filter files by path
|
|
908
|
+
--tags <string> (optional) : Tags to filter files by (comma-separated for multiple values)
|
|
909
|
+
--organisation <string> (required) : Name of the organisation
|
|
910
|
+
--application <string> (required) : Name of the application
|
|
911
|
+
--token <string> (required) : Bearer token for authentication
|
|
912
|
+
|
|
913
|
+
`)
|
|
914
|
+
.usage('<action> [options]')
|
|
915
|
+
.addHelpText('after', `
|
|
916
|
+
Examples:
|
|
917
|
+
|
|
918
|
+
1. Using individual options:
|
|
919
|
+
$ airborne-core-cli ListFileGroups \\
|
|
920
|
+
--organisation <organisation> \\
|
|
921
|
+
--application <application> \\
|
|
922
|
+
--token <string> \\
|
|
923
|
+
[--page <page>]
|
|
924
|
+
|
|
925
|
+
2. Using JSON file:
|
|
926
|
+
$ airborne-core-cli ListFileGroups @params.json
|
|
927
|
+
|
|
928
|
+
3. Mixed approach (JSON file + CLI overrides):
|
|
929
|
+
$ airborne-core-cli ListFileGroups @params.json --page <value> --count <value> --token <value>
|
|
930
|
+
|
|
931
|
+
JSON file format (params.json):
|
|
932
|
+
{
|
|
933
|
+
"page": 123,
|
|
934
|
+
"count": 123,
|
|
935
|
+
"search": "example_search",
|
|
936
|
+
"tags": "example_tags",
|
|
937
|
+
"organisation": "example_organisation",
|
|
938
|
+
"application": "example_application",
|
|
939
|
+
"token": "your_bearer_token_here"
|
|
940
|
+
}`)
|
|
941
|
+
.action(async (paramsFile, options) => {
|
|
942
|
+
try {
|
|
943
|
+
|
|
944
|
+
const output = await ListFileGroupsAction(paramsFile, options);
|
|
945
|
+
console.log(printColoredJSON(output));
|
|
946
|
+
process.exit(0);
|
|
947
|
+
} catch (err) {
|
|
948
|
+
console.error("Error message:", err.message);
|
|
949
|
+
console.error("Error executing:", printColoredJSON(err));
|
|
950
|
+
process.exit(1);
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
|
|
866
955
|
program
|
|
867
956
|
.command("ListFiles")
|
|
868
957
|
.argument('[params_file]', 'JSON file containing all parameters (use @params.json format)')
|
|
@@ -881,6 +970,7 @@ program
|
|
|
881
970
|
return parsed;
|
|
882
971
|
})
|
|
883
972
|
.option("--search <search>", "search parameter")
|
|
973
|
+
.option("--tags <tags>", "tags parameter")
|
|
884
974
|
.option("--organisation <organisation>", "organisation parameter")
|
|
885
975
|
.option("--application <application>", "application parameter")
|
|
886
976
|
.option("--token <token>", "Bearer token for authentication")
|
|
@@ -904,6 +994,7 @@ Parameters:
|
|
|
904
994
|
--page <integer> (optional) : Page number for pagination
|
|
905
995
|
--per_page <integer> (optional) : Number of files per page
|
|
906
996
|
--search <string> (optional) : Search query to filter files
|
|
997
|
+
--tags <string> (optional) : Tags to filter files by (comma-separated for multiple values, e.g., "prod,dev,staging")
|
|
907
998
|
--organisation <string> (required) : Name of the organisation
|
|
908
999
|
--application <string> (required) : Name of the application
|
|
909
1000
|
--token <string> (required) : Bearer token for authentication
|
|
@@ -931,6 +1022,7 @@ JSON file format (params.json):
|
|
|
931
1022
|
"page": 123,
|
|
932
1023
|
"per_page": 123,
|
|
933
1024
|
"search": "example_search",
|
|
1025
|
+
"tags": "example_tags",
|
|
934
1026
|
"organisation": "example_organisation",
|
|
935
1027
|
"application": "example_application",
|
|
936
1028
|
"token": "your_bearer_token_here"
|