Skip to content

Improve CLI parity and harden file handling#17

Merged
Gorniaky merged 24 commits into
discloud:mainfrom
TheusHen:improve-cli-parity-safety
Jul 7, 2026
Merged

Improve CLI parity and harden file handling#17
Gorniaky merged 24 commits into
discloud:mainfrom
TheusHen:improve-cli-parity-safety

Conversation

@TheusHen

@TheusHen TheusHen commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This brings the Dart CLI closer to the current Node CLI behavior and tightens a few places that were too easy to break in normal use.

What changed:

  • Commands now accept the same positional style used by the current CLI in more places, while keeping the existing flag-based usage working.
  • init, domain, subdomain, logs, backup, locale, ram, upload, and team/app variants were brought closer to the current command behavior.
  • File handling is a bit safer: downloads check HTTP status, logs create parent folders correctly, config values cannot inject extra lines, and local store writes are made through a temporary file before replacing the old one.
  • Upload multipart handling now sends a safer filename/content disposition and a correct content type for zip uploads.
  • The zipper refuses to include files resolved outside the project root through symlinks.
  • Added small tests for the utility edge cases touched here.

Validation:

  • dart format lib modules test
  • dart analyze
  • dart test
  • git diff --check

Sorry about the earlier note saying I could not run Dart. I was working from my VPS environment at first and the Dart SDK was not available there. I reran the checks locally after installing the SDK and pushed the analyzer fixes in a follow-up commit.

@TheusHen

TheusHen commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for the first update saying I could not run the Dart checks. I was on my VPS environment then, and Dart was not installed there.

I installed the SDK locally, ran the checks, fixed the analyzer feedback, and pushed the follow-up commit.

Checks now passing:

  • dart format lib modules test
  • dart analyze
  • dart test
  • git diff --check

Comment thread lib/extensions/command.dart Outdated
Comment thread modules/glob_zipper/lib/src/glob_zipper.dart Outdated
Comment thread lib/services/discloud/constants.dart Outdated
Comment thread lib/commands/user/locale.dart Outdated
Comment thread lib/commands/user/locale.dart Outdated
Comment thread lib/commands/app/mod/add.dart Outdated
Comment thread lib/commands/app/mod/edit.dart Outdated
Comment thread lib/commands/app/mod/edit.dart Outdated
Comment thread modules/local_store/lib/src/json_local_store.dart Outdated
Comment thread lib/commands/app/backup.dart Outdated
@TheusHen TheusHen requested a review from Gorniaky July 7, 2026 01:56
Comment thread lib/extensions/command.dart Outdated
Comment thread lib/extensions/command.dart Outdated
Comment thread lib/utils/download.dart Outdated
Comment thread lib/extensions/command.dart Outdated
Comment thread lib/commands/init.dart Outdated
Comment thread lib/commands/app/upload.dart Outdated
Comment thread lib/commands/app/upload.dart Outdated
Comment thread lib/commands/domain/create.dart Outdated
Comment thread lib/commands/domain/info.dart Outdated
Comment thread lib/commands/domain/verify.dart Outdated
Comment thread lib/extensions/arg_results.dart
Comment thread lib/services/discloud/api_client.dart
Comment thread lib/commands/team/logs.dart Outdated
Comment thread lib/commands/domain/edit.dart Outdated
Comment thread lib/commands/domain/create.dart Outdated
@Gorniaky Gorniaky merged commit cffb66c into discloud:main Jul 7, 2026
2 of 3 checks passed
@TheusHen

TheusHen commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for merging my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants