-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use
mainsail
for process names (#431)
* Remove token from process * Add contracts * Use contracts * Use app name * Remove token flag * Remove token flag from api commands * Fix core tests * Fix api commands * Fix tests
- Loading branch information
1 parent
e596fd2
commit b21b032
Showing
22 changed files
with
73 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { Commands, Identifiers } from "@mainsail/cli"; | ||
import { Commands, Contracts, Identifiers } from "@mainsail/cli"; | ||
import { injectable } from "@mainsail/container"; | ||
import Joi from "joi"; | ||
|
||
@injectable() | ||
export class Command extends Commands.Command { | ||
public signature = "api:restart"; | ||
|
||
public description = "Restart the API process."; | ||
|
||
public configure(): void { | ||
this.definition.setFlag("token", "The name of the token.", Joi.string().required()); | ||
} | ||
|
||
public async execute(): Promise<void> { | ||
this.app.get<any>(Identifiers.ProcessFactory)(this.getFlag("token"), "api").restart(); | ||
this.app.get<Contracts.ProcessFactory>(Identifiers.ProcessFactory)("mainsail-api").restart(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { Commands, Identifiers } from "@mainsail/cli"; | ||
import { Commands, Contracts, Identifiers } from "@mainsail/cli"; | ||
import { injectable } from "@mainsail/container"; | ||
import Joi from "joi"; | ||
|
||
@injectable() | ||
export class Command extends Commands.Command { | ||
public signature = "api:status"; | ||
|
||
public description = "Display the status of the API process."; | ||
|
||
public configure(): void { | ||
this.definition.setFlag("token", "The name of the token.", Joi.string()); | ||
} | ||
|
||
public async execute(): Promise<void> { | ||
this.app.get<any>(Identifiers.ProcessFactory)(this.getFlag("token"), "api").status(); | ||
this.app.get<Contracts.ProcessFactory>(Identifiers.ProcessFactory)("mainsail-api").status(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.