Changes:
- Fixed the issue where the instance's FQDN was not included in the
cache directories' path when the user sets a custom path to the root
cache directory.
- Added unit tests for the cache directory calculations.
- Updated REUSE.toml to fix compliance failures.
- Added small changes/fixes based on feedback from golangci-lint.
PR: #53
Resolves: #51
- Created generic Error types to remove the need to import the errors
package.
- Used the generic Error types in place of the single use custom Error
types that have no fields.
- Created new Error types where necessary.
PR: #50
This commit adds support for deleting statuses.
Before sending the delete request to the instance, Enbas will first
verify that the status that the user wants to delete actually belongs to
them.
The user has the option to save the text of the deleted status. This
will be written to a text file within the cache directory.
PR: #48
Resolves: #44
Summary:
- Created a custom CLI schema for Enbas which will act as the Source
of Truth for code and document generation.
- Created a code generator which uses the schema to generate the
executor definitions and code in the internal usage package.
Changes:
- Created the Enbas CLI schema as the Source of Truth for Enbas.
- Created the code generator that generates the executor
definitions and code in the usage package.
- Regenerated the executor definitions using the code generator.
- Moved the custom flag value types to the new internal flag
package.
- Created a new flag value type for the bool pointer to replace the
flag.BoolFunc() used for the sensitive and no-color flags.
- Moved the version and build variables to the new internal version
package to simplify the version executor.
- Created a new usage package and moved the usage functions there.
- Changed the type of the account-name flag from string to the
internal StringSliceValue type.
SUMMARY
This commit adds configuration support to enbas. The configuration is
stored as a JSON file in the user specified configuration directory.
When using enbas for the first time, the user will first need to
execute the new init command in order to generate the configuration.
Once this has been generated the user can edit the settings to
personalise their experience, login to their account and use enbas as
normal.
For now the configurable settings included in the configuration
are as follows:
- The path to the credentials file (by default this is set to a file in
the same directory as the configuration file).
- The path to the cache directory.
- The character limit used for line wrapping.
- The programs used for integrations such as paging, media viewing,
opening URLs, etc.
CHANGES
- added the new config type.
- added the new init executor for generating a new configuration file.
- removed the following top level flags in favour of the new
configration support.
- cache-dir
- pager
- image-viewer
- video-player
- max-terminal-width
- added a new error type for use when an unknown media attachment ID
is specified.
- updated the usage function for the executors to support a case
where a flagsets has no flags.
- update .golangci.yaml to disable some linters
Add a new internal printer package for printing resources to the screen
or pager.
With the new printer in place, most of the settings such as the pager
command, colour theme, whether or not colour output is disabled, etc
are defined in one place which saves us the trouble of passing an
increasing number of parameters to an increasing number of Display
methods throughout the code base.
The old Displayer interface and associated Display methods in the
model package are removed as this is now handled by the printer.
The format functions in the utilities package has essentially been
rewritten as methods to the Printer type.
Additional changes:
- All indentation when displaying information about resources (e.g.
statuses, instance, accounts) are removed.
- The application's build information now has colour output.
Changes:
- Move InvalidListRepliesPolicyError, InvalidTimelineCategory,
InvalidStatusVisibility and InvalidStatusContentTypeError type to the
model package.
- Clean up some code in regards to the parsing of the Enum types.
- Clean up the error messages sent back to the user.
- Use colons instead of semicolons when unwrapping error messages.
- Print errors to Standard Error (os.Stderr)
Move all executors to the internal folder package. This PR also comes
with additional breaking changes.
Changes:
- refactor: move all executors to the internal/executor package.
- refactor: update naming patterns for constants, variables, custom
types, etc.
- fix(breaking): renamed the update command to edit.
- fix(breaking): update the flags for the switch command to make it
more generic.
- fix(breaking): renamed the show-account-relationship flag to
show-relationship.
- fix: update the print message from the whoami command.