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

[feature request] support default value for destination in options bag #55

Open
DerekNonGeneric opened this issue Jun 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@DerekNonGeneric
Copy link
Member

Currently, it is not very well documented, but the options bag passed to the class constructor at initialization requires that a String be supplied for the location of the destination directory for the files/folders imported from upstream repos.

Firstly, rather than simply expecting a String, the type should be narrowed to perhaps only accept a valid filesystem path.

In the event that this field is omitted, such as in the case where the user may not necessarily be interested in the file(s) or may not have a particular preference where files are stored, a smart default for the canonical temporary directory should be used.

For Node.js environments with node:os core module available, the value returned by the os.tmpdir() method may be useful to consider. In the case of browser environments, the Window.sessionStorage() Web API may be of interest.

@DerekNonGeneric DerekNonGeneric changed the title [feature] support default value for destination field of options object [feature request] support default value for destination in options bag Jul 22, 2022
@DerekNonGeneric DerekNonGeneric added the enhancement New feature or request label Aug 1, 2022
@DerekNonGeneric
Copy link
Member Author

DerekNonGeneric commented Oct 12, 2022

In the event that this field is omitted, such as in the case where the user may not necessarily be interested in the file(s) or may not have a particular preference where files are stored, a smart default for the canonical temporary directory should be used.

See https://systemd.io/TEMPORARY_DIRECTORIES/ for guidance on avoiding pitfalls and https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 for expected location on Linux systems as defined by an environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant