Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 74 additions & 74 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Available subcommands:
Install APT on your app

Usage: discloud app apt install [arguments]
-h, --help Print this usage information.
--app (mandatory)
--apt canvas,ffmpeg,java,libgl,mysql,openssl,puppeteer,selenium,tesseract,tools,unixodbc
-h, --help Print this usage information.
--app
--apt canvas,ffmpeg,java,libgl,mysql,openssl,puppeteer,selenium,tesseract,tools,unixodbc
```

##### app apt uninstall
Expand All @@ -58,9 +58,9 @@ Usage: discloud app apt install [arguments]
Uninstall APT from your app

Usage: discloud app apt uninstall [arguments]
-h, --help Print this usage information.
--app (mandatory)
--apt canvas,ffmpeg,java,libgl,mysql,openssl,puppeteer,selenium,tesseract,tools,unixodbc
-h, --help Print this usage information.
--app
--apt canvas,ffmpeg,java,libgl,mysql,openssl,puppeteer,selenium,tesseract,tools,unixodbc
```

#### app backup
Expand All @@ -69,9 +69,9 @@ Usage: discloud app apt uninstall [arguments]
Get backup of your app code from Discloud

Usage: discloud app backup [arguments]
-h, --help Print this usage information.
--app=<all> (mandatory)
-d, --dir Specifies the destination path for downloading backups. The destination path will be considered a directory.
-h, --help Print this usage information.
--app=<all>
-d, --dir Specifies the destination path for downloading backups. The destination path will be considered a directory.
```

#### app commit
Expand All @@ -91,9 +91,9 @@ Usage: discloud app commit [arguments]
Use the app terminal

Usage: discloud app console [arguments]
-h, --help Print this usage information.
--app (mandatory)
--command
-h, --help Print this usage information.
--app
--command
```

#### app delete
Expand All @@ -102,9 +102,9 @@ Usage: discloud app console [arguments]
Delete one of your apps on Discloud

Usage: discloud app delete [arguments]
-h, --help Print this usage information.
-y, --yes Skip confirmation prompt
--app (mandatory)
-h, --help Print this usage information.
-y, --yes Skip confirmation prompt
--app
```

#### app info
Expand All @@ -113,8 +113,8 @@ Usage: discloud app delete [arguments]
Get information of your apps

Usage: discloud app info [arguments]
-h, --help Print this usage information.
--app (defaults to "all")
-h, --help Print this usage information.
--app=<all>
```

#### app logs
Expand All @@ -123,9 +123,9 @@ Usage: discloud app info [arguments]
View the logs from application in Discloud

Usage: discloud app logs [arguments]
-h, --help Print this usage information.
--app=<all> (mandatory) When set to 'all', this command will automatically download logs and will not display URLs. If the 'out' option is not set, downloads will be made to the current folder.
--out Specifies the destination path for downloading logs. When the application option is set to 'all', the destination path will be considered a directory where all downloads will be stored.
-h, --help Print this usage information.
--app=<all> When set to 'all', this command will automatically download logs and will not display URLs. If the 'out' option is not set, downloads will be made to the current folder.
--out Specifies the destination path for downloading logs. When the application option is set to 'all', the destination path will be considered a directory where all downloads will be stored.
```

#### app mod
Expand All @@ -149,10 +149,10 @@ Available subcommands:
Add MOD to your app

Usage: discloud app mod add [arguments]
-h, --help Print this usage information.
--app (mandatory)
--mod (mandatory)
--perms [backup_app, commit_app, edit_ram, logs_app, restart_app, start_app, status_app, stop_app]
-h, --help Print this usage information.
--app
--mod
--perms [backup_app, commit_app, edit_ram, logs_app, restart_app, start_app, status_app, stop_app]
```

##### app mod delete
Expand All @@ -161,9 +161,9 @@ Usage: discloud app mod add [arguments]
Delete MOD of your app

Usage: discloud app mod delete [arguments]
-h, --help Print this usage information.
--app (mandatory)
--mod (mandatory)
-h, --help Print this usage information.
--app
--mod
```

##### app mod edit
Expand All @@ -172,10 +172,10 @@ Usage: discloud app mod delete [arguments]
Edit MOD perms of your app

Usage: discloud app mod edit [arguments]
-h, --help Print this usage information.
--app (mandatory)
--mod (mandatory)
--perms [backup_app, commit_app, edit_ram, logs_app, restart_app, start_app, status_app, stop_app]
-h, --help Print this usage information.
--app
--mod
--perms [backup_app, commit_app, edit_ram, logs_app, restart_app, start_app, status_app, stop_app]
```

##### app mod info
Expand All @@ -184,8 +184,8 @@ Usage: discloud app mod edit [arguments]
Get MOD info of your app

Usage: discloud app mod info [arguments]
-h, --help Print this usage information.
--app (mandatory)
-h, --help Print this usage information.
--app
```

#### app profile
Expand All @@ -194,10 +194,10 @@ Usage: discloud app mod info [arguments]
Updates the profile information (avatar and name) for a specific app

Usage: discloud app profile [arguments]
-h, --help Print this usage information.
--app (mandatory)
--name
--avatar
-h, --help Print this usage information.
--app
--name
--avatar
```

#### app ram
Expand All @@ -206,9 +206,9 @@ Usage: discloud app profile [arguments]
Set amount of ram for your app

Usage: discloud app ram [arguments]
-h, --help Print this usage information.
--app (mandatory)
--amount=<100> (mandatory)
-h, --help Print this usage information.
--app
--amount=<100>
```

#### app restart
Expand Down Expand Up @@ -237,8 +237,8 @@ Usage: discloud app start [arguments]
Get status of your app

Usage: discloud app status [arguments]
-h, --help Print this usage information.
--app (mandatory)
-h, --help Print this usage information.
--app
```

#### app stop
Expand All @@ -257,8 +257,8 @@ Usage: discloud app stop [arguments]
Upload one app or site to Discloud

Usage: discloud app upload [arguments]
-h, --help Print this usage information.
-g, --glob (defaults to "**")
-h, --help Print this usage information.
-g, --glob=<**>
```

### domain
Expand All @@ -283,9 +283,9 @@ Available subcommands:
Create a domain

Usage: discloud domain create [arguments]
-h, --help Print this usage information.
--id (mandatory)
--app (mandatory)
-h, --help Print this usage information.
--id
--app
```

#### domain delete
Expand All @@ -294,8 +294,8 @@ Usage: discloud domain create [arguments]
Delete a domain

Usage: discloud domain delete [arguments]
-h, --help Print this usage information.
--id (mandatory)
-h, --help Print this usage information.
--id
```

#### domain edit
Expand All @@ -304,9 +304,9 @@ Usage: discloud domain delete [arguments]
Edit a domain

Usage: discloud domain edit [arguments]
-h, --help Print this usage information.
--id (mandatory)
--app (mandatory)
-h, --help Print this usage information.
--id
--app
```

#### domain info
Expand All @@ -315,8 +315,8 @@ Usage: discloud domain edit [arguments]
Get information of your domains

Usage: discloud domain info [arguments]
-h, --help Print this usage information.
--id (defaults to "all")
-h, --help Print this usage information.
--id=<all>
```

#### domain verify
Expand All @@ -325,8 +325,8 @@ Usage: discloud domain info [arguments]
Verify a domain

Usage: discloud domain verify [arguments]
-h, --help Print this usage information.
--id (mandatory)
-h, --help Print this usage information.
--id
```

### domain
Expand Down Expand Up @@ -458,8 +458,8 @@ Available subcommands:
Create a subdomain

Usage: discloud subdomain create [arguments]
-h, --help Print this usage information.
--id (mandatory)
-h, --help Print this usage information.
--id
```

#### subdomain delete
Expand All @@ -468,8 +468,8 @@ Usage: discloud subdomain create [arguments]
Delete a subdomain

Usage: discloud subdomain delete [arguments]
-h, --help Print this usage information.
--id (mandatory)
-h, --help Print this usage information.
--id
```

#### subdomain info
Expand All @@ -478,8 +478,8 @@ Usage: discloud subdomain delete [arguments]
Get information of your subdomains

Usage: discloud subdomain info [arguments]
-h, --help Print this usage information.
--id (defaults to "all")
-h, --help Print this usage information.
--id=<all>
```

### team
Expand Down Expand Up @@ -508,9 +508,9 @@ Available subcommands:
Get backup of your team app code from Discloud

Usage: discloud team backup [arguments]
-h, --help Print this usage information.
--app=<all> (mandatory)
-d, --dir Specifies the destination path for downloading backups. The destination path will be considered a directory.
-h, --help Print this usage information.
--app=<all>
-d, --dir Specifies the destination path for downloading backups. The destination path will be considered a directory.
```

#### team commit
Expand Down Expand Up @@ -540,9 +540,9 @@ Usage: discloud team info [arguments]
View the logs from application in Discloud

Usage: discloud team logs [arguments]
-h, --help Print this usage information.
--app=<all> (mandatory) When set to 'all', this command will automatically download logs and will not display URLs. If the 'out' option is not set, downloads will be made to the current folder.
--out Specifies the destination path for downloading logs. When the application option is set to 'all', the destination path will be considered a directory where all downloads will be stored.
-h, --help Print this usage information.
--app=<all> When set to 'all', this command will automatically download logs and will not display URLs. If the 'out' option is not set, downloads will be made to the current folder.
--out Specifies the destination path for downloading logs. When the application option is set to 'all', the destination path will be considered a directory where all downloads will be stored.
```

#### team ram
Expand All @@ -551,9 +551,9 @@ Usage: discloud team logs [arguments]
Set amount of ram for your app

Usage: discloud team ram [arguments]
-h, --help Print this usage information.
--app (mandatory)
--amount=<100> (mandatory)
-h, --help Print this usage information.
--app
--amount=<100>
```

#### team restart
Expand Down Expand Up @@ -582,8 +582,8 @@ Usage: discloud team start [arguments]
Get status of your app

Usage: discloud team status [arguments]
-h, --help Print this usage information.
--app (mandatory)
-h, --help Print this usage information.
--app
```

#### team stop
Expand Down Expand Up @@ -636,7 +636,7 @@ Make zip

Usage: discloud zip [arguments]
-h, --help Print this usage information.
-g, --glob (defaults to "**")
-g, --glob=<**>
-o, --out Zip output
-l, --level=<0-9> Compression level
-p, --password Zip password
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/app/backup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final class AppBackupCommand extends Command<void> with Disposable {

Future<void> _handleSingle(Map<dynamic, dynamic> data, ISpin spinner) async {
if (data["url"] case final String url) {
if (argResults!.optionOrRest("dir", ["app"]) case final dir) {
if (argResults!.optionOrRest("dir", ["app"]) case final dir?) {
final Uri uri = .parse(url);

return _download(dir: dir, spinner: spinner, uri: uri);
Expand Down
13 changes: 7 additions & 6 deletions lib/commands/app/commit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ final class AppCommitCommand extends Command<void> with Disposable {
Future<void> run() async {
final directory = context.workspaceFolder;

final optionAppId = argResults!.option("app");
final appId =
optionAppId ??
argResults?.rest.firstOrNull ??
await _getDiscloudConfigAppId(directory);
final optionAppId = argResults?.optionOrRest("app");
final appId = optionAppId ?? await _getDiscloudConfigAppId(directory);

if (appId == null) throw Exception("Missing app id");

final glob = argResults?.multiOptionOrRest("glob", [if (optionAppId != null) "app"]) ?? const ["**"];
final glob =
argResults?.multiOptionOrRest("glob", [
if (optionAppId != null) "app",
]) ??
const ["**"];

final spinner = context.printer.spin(text: "Zipping...");

Expand Down
3 changes: 1 addition & 2 deletions lib/commands/team/backup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ final class TeamBackupCommand extends Command<void> with Disposable {
@override
Future<void> run() async {
final appId = argResults!.optionOrRest("app") ?? "all";
final dir = argResults!.optionOrRest("dir", ["app"]);

final spinner = context.printer.spin(text: "Fetching backup...");

Expand All @@ -61,7 +60,7 @@ final class TeamBackupCommand extends Command<void> with Disposable {

Future<void> _handleSingle(Map<dynamic, dynamic> data, ISpin spinner) async {
if (data["url"] case final String url) {
if (argResults!.optionOrRest("dir", ["app"]) case final dir) {
if (argResults!.optionOrRest("dir", ["app"]) case final dir?) {
final Uri uri = .parse(url);

return _download(dir: dir, spinner: spinner, uri: uri);
Expand Down
Loading