Skip to content

Commit a38907e

Browse files
committed
feat: add platform-specific configuration and improve file processing and update smithy-cli-generator submodule
1 parent 1644fd6 commit a38907e

13 files changed

Lines changed: 307 additions & 93 deletions

File tree

airborne-core-cli/action.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export async function CreateApplicationAction(paramsFile, options){
148148

149149

150150

151-
const client = await getClient(options.token, true);
151+
const client = await getClient(finalOptions.token, true);
152152
const command = new CreateApplicationCommand(finalOptions);
153153
return await client.send(command);
154154
}
@@ -172,7 +172,7 @@ export async function CreateDimensionAction(paramsFile, options){
172172

173173

174174

175-
const client = await getClient(options.token, true);
175+
const client = await getClient(finalOptions.token, true);
176176
const command = new CreateDimensionCommand(finalOptions);
177177
return await client.send(command);
178178
}
@@ -201,7 +201,7 @@ export async function CreateFileAction(paramsFile, options){
201201
finalOptions.metadata = JSON.stringify(finalOptions.metadata);
202202
}
203203

204-
const client = await getClient(options.token, true);
204+
const client = await getClient(finalOptions.token, true);
205205
const command = new CreateFileCommand(finalOptions);
206206
return await client.send(command);
207207
}
@@ -225,7 +225,7 @@ export async function CreateOrganisationAction(paramsFile, options){
225225

226226

227227

228-
const client = await getClient(options.token, true);
228+
const client = await getClient(finalOptions.token, true);
229229
const command = new CreateOrganisationCommand(finalOptions);
230230
return await client.send(command);
231231
}
@@ -249,7 +249,7 @@ export async function CreatePackageAction(paramsFile, options){
249249

250250

251251

252-
const client = await getClient(options.token, true);
252+
const client = await getClient(finalOptions.token, true);
253253
const command = new CreatePackageCommand(finalOptions);
254254
return await client.send(command);
255255
}
@@ -273,7 +273,7 @@ export async function CreateReleaseAction(paramsFile, options){
273273

274274

275275

276-
const client = await getClient(options.token, true);
276+
const client = await getClient(finalOptions.token, true);
277277
const command = new CreateReleaseCommand(finalOptions);
278278
return await client.send(command);
279279
}
@@ -297,7 +297,7 @@ export async function DeleteDimensionAction(paramsFile, options){
297297

298298

299299

300-
const client = await getClient(options.token, true);
300+
const client = await getClient(finalOptions.token, true);
301301
const command = new DeleteDimensionCommand(finalOptions);
302302
return await client.send(command);
303303
}
@@ -321,7 +321,7 @@ export async function GetReleaseAction(paramsFile, options){
321321

322322

323323

324-
const client = await getClient(options.token, true);
324+
const client = await getClient(finalOptions.token, true);
325325
const command = new GetReleaseCommand(finalOptions);
326326
return await client.send(command);
327327
}
@@ -345,7 +345,7 @@ export async function GetUserAction(paramsFile, options){
345345

346346

347347

348-
const client = await getClient(options.token, true);
348+
const client = await getClient(finalOptions.token, true);
349349
const command = new GetUserCommand(finalOptions);
350350
return await client.send(command);
351351
}
@@ -369,7 +369,7 @@ export async function ListDimensionsAction(paramsFile, options){
369369

370370

371371

372-
const client = await getClient(options.token, true);
372+
const client = await getClient(finalOptions.token, true);
373373
const command = new ListDimensionsCommand(finalOptions);
374374
return await client.send(command);
375375
}
@@ -393,7 +393,7 @@ export async function ListFilesAction(paramsFile, options){
393393

394394

395395

396-
const client = await getClient(options.token, true);
396+
const client = await getClient(finalOptions.token, true);
397397
const command = new ListFilesCommand(finalOptions);
398398
return await client.send(command);
399399
}
@@ -417,7 +417,7 @@ export async function ListOrganisationsAction(paramsFile, options){
417417

418418

419419

420-
const client = await getClient(options.token, true);
420+
const client = await getClient(finalOptions.token, true);
421421
const command = new ListOrganisationsCommand(finalOptions);
422422
return await client.send(command);
423423
}
@@ -441,7 +441,7 @@ export async function ListPackagesAction(paramsFile, options){
441441

442442

443443

444-
const client = await getClient(options.token, true);
444+
const client = await getClient(finalOptions.token, true);
445445
const command = new ListPackagesCommand(finalOptions);
446446
return await client.send(command);
447447
}
@@ -465,7 +465,7 @@ export async function ListReleasesAction(paramsFile, options){
465465

466466

467467

468-
const client = await getClient(options.token, true);
468+
const client = await getClient(finalOptions.token, true);
469469
const command = new ListReleasesCommand(finalOptions);
470470
return await client.send(command);
471471
}
@@ -513,7 +513,7 @@ export async function RequestOrganisationAction(paramsFile, options){
513513

514514

515515

516-
const client = await getClient(options.token, true);
516+
const client = await getClient(finalOptions.token, true);
517517
const command = new RequestOrganisationCommand(finalOptions);
518518
return await client.send(command);
519519
}
@@ -537,7 +537,7 @@ export async function ServeReleaseAction(paramsFile, options){
537537

538538

539539

540-
const client = await getClient(options.token, true);
540+
const client = await getClient(finalOptions.token, true);
541541
const command = new ServeReleaseCommand(finalOptions);
542542
return await client.send(command);
543543
}
@@ -561,7 +561,7 @@ export async function ServeReleaseV2Action(paramsFile, options){
561561

562562

563563

564-
const client = await getClient(options.token, true);
564+
const client = await getClient(finalOptions.token, true);
565565
const command = new ServeReleaseV2Command(finalOptions);
566566
return await client.send(command);
567567
}
@@ -585,7 +585,7 @@ export async function UpdateDimensionAction(paramsFile, options){
585585

586586

587587

588-
const client = await getClient(options.token, true);
588+
const client = await getClient(finalOptions.token, true);
589589
const command = new UpdateDimensionCommand(finalOptions);
590590
return await client.send(command);
591591
}
@@ -618,7 +618,7 @@ export async function UploadFileAction(paramsFile, options){
618618

619619

620620

621-
const client = await getClient(options.token, true);
621+
const client = await getClient(finalOptions.token, true);
622622
const command = new UploadFileCommand(finalOptions);
623623
return await client.send(command);
624624
}

airborne-core-cli/bin.js

100755100644
File mode changed.

airborne-core-cli/index.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export async function getBaseUrl() {
6767
const config = await readConfigFile();
6868
return config.baseUrl || null; // return null if not set
6969
} catch (err) {
70-
console.error("Error reading endpoint:", err);
7170
return null;
7271
}
7372
}
@@ -1021,7 +1020,11 @@ program
10211020
return parsed;
10221021
})
10231022
.option("--search <search>", "search parameter")
1024-
.option("--all <all>", "all parameter")
1023+
.option("--all <all>", "all parameter", (value) => {
1024+
if (value.toLowerCase() === 'true') return true;
1025+
if (value.toLowerCase() === 'false') return false;
1026+
throw new Error("--all must be true or false");
1027+
})
10251028
.option("--organisation <organisation>", "organisation parameter")
10261029
.option("--application <application>", "application parameter")
10271030
.option("--token <token>", "Bearer token for authentication")
@@ -1110,7 +1113,11 @@ program
11101113
}
11111114
return parsed;
11121115
})
1113-
.option("--all <all>", "all parameter")
1116+
.option("--all <all>", "all parameter", (value) => {
1117+
if (value.toLowerCase() === 'true') return true;
1118+
if (value.toLowerCase() === 'false') return false;
1119+
throw new Error("--all must be true or false");
1120+
})
11141121
.option("--status <status>", "status parameter")
11151122
.option("--organisation <organisation>", "organisation parameter")
11161123
.option("--application <application>", "application parameter")

0 commit comments

Comments
 (0)