Skip to content

Commit

Permalink
Clean up build
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 3, 2024
1 parent 05869e4 commit 2c6e9d1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 0 additions & 3 deletions api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const args = minimist(process.argv, {
'noevents', // Disable Initialization of Second Level Events
'nometrics', // Disable Sending AWS CloudWatch Metrics about each conn
'nosinks', // Disable Push to Sinks
'local' // (experimental) Disable external calls on startup (for developing in low connectivity)
// Note this is the min for serving requests - it doesn't make it particularly functional
],
string: [
'postgres', // Postgres Connection String
Expand Down Expand Up @@ -55,7 +53,6 @@ if (import.meta.url === `file://${process.argv[1]}`) {
nometrics: args.nometrics || false,
nosinks: args.nosinks || false,
nocache: args.nocache || false,
local: args.local || false,
});
await server(config);
}
Expand Down
7 changes: 4 additions & 3 deletions api/lib/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default class AuthProvider {
}

async login(username: string, password: string): Promise<string> {
const api = await TAKAPI.init(new URL(this.config.server.api), new APIAuthPassword(username, password));
const api = await TAKAPI.init(
new URL(this.config.server.api),
new APIAuthPassword(username, password)
);

const contents = await api.OAuth.login({ username, password });

Expand All @@ -32,8 +35,6 @@ export default class AuthProvider {
profile = await this.config.models.Profile.from(username);
} catch (err) {
if (err instanceof Err && err.name === 'PublicError' && err.status === 404) {
const api = await TAKAPI.init(new URL(this.config.server.api), new APIAuthPassword(username, password));

profile = await this.config.models.Profile.generate({
username: username,
auth: await api.Credentials.generate()
Expand Down
1 change: 1 addition & 0 deletions api/lib/tak-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default class TAKAPI {
this.auth = auth;

this.Package = new Package(this);
this.OAuth = new OAuth(this);
this.Export = new Export(this);
this.Mission = new Mission(this);
this.MissionLog = new MissionLog(this);
Expand Down
1 change: 0 additions & 1 deletion api/test/flight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ export default class Flight {
nosinks: true,
nocache: true,
nometrics: true,
local: true
});

Object.assign(this.config, custom);
Expand Down

0 comments on commit 2c6e9d1

Please sign in to comment.