Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(upload): align output, report problems #186

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Conversation

line-o
Copy link
Member

@line-o line-o commented Nov 20, 2023

fixes #114

When a upload operation fails in part or in total a non-zero exit code
accompanied by a meaningful message will be added.
Created collections and resources are now actually counted.
With --verbose errors on resource and collection level are shown.
In general output of upload operations is now better aligned and also
colored if the terminal is capable of that.

Improved utitily modules:

  • errors.js
    • recognize more network errors
    • recognize filesystem errors
    • recognize XMLRPC faults
    • export all error categorization helpers
    • add formatErrorMessage
  • connection.js
    • new helper getServerUrl returns db server URL
    • new helper getUserInfo returns user connecting to DB

New utility modules:

  • account.js
    • getAccountInfo: turns raw XMLRPC db user data into AccountInfo
  • message.js
    • logSucces: helper to align operation success messages
    • logFailure: helper to align operation failure messages

Adapt and improve tests.

@line-o line-o force-pushed the fix/114 branch 2 times, most recently from dbcd7aa to 3af1e92 Compare November 20, 2023 22:16
fixes eXist-db#114

When a upload operation fails in part or in total a non-zero exit code
accompanied by a meaningful message will be added.
Created collections and resources are now actually counted.
With `--verbose` errors on resource and collection level are shown.
In general output of upload operations is now better aligned and also
colored if the terminal is capable of that.

Improved utitily modules:
- errors.js
  - recognize more network errors
  - recognize filesystem errors
  - recognize XMLRPC faults
  - export all error categorization helpers
  - add `formatErrorMessage`
- connection.js
  - new helper `getServerUrl` returns db server URL
  - new helper `getUserInfo` returns user connecting to DB

New utility modules:
- account.js
  - `getAccountInfo`: turns raw XMLRPC db user data into AccountInfo
- message.js
   - `logSucces`: helper to align operation success messages
   - `logFailure`: helper to align operation failure messages

Adapt and improve tests.
@duncdrum duncdrum merged commit d80768b into eXist-db:main Nov 21, 2023
16 checks passed
Copy link

🎉 This PR is included in version 1.9.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@line-o line-o deleted the fix/114 branch November 21, 2023 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive message when command failed
2 participants