-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(api): Expand APIs with new customizable options and enhanced functionality #6
Commits on Apr 24, 2024
-
refactor(types): Refactor and improve the types declaration
* Declared a new type called `StringPath` represents the path from a string * Changed the value of `LsOptionsInterface`'s properties to their constant values instead of their types (number) * Refactored the `LsTypesValues` type, ensuring values compatibility with changes of `LsTypesInterface` interface * Declared a new type called `ResolvedLsOptions` and an interface called `DefaultLsOptions`
Configuration menu - View commit details
-
Copy full SHA for c259a7d - Browse repository at this point
Copy the full SHA c259a7dView commit details -
feat(lsfnd): Introduce the
defaultLsOptions
This constant object contains all default options for `ls*` functions and it is publicly visible. In addition, refactored some types representation from specific parameters, variables, and even on explicit conversion types to more precise and improve types correctiveness.
Configuration menu - View commit details
-
Copy full SHA for 7ccfa38 - Browse repository at this point
Copy the full SHA 7ccfa38View commit details -
refactor(ls): Enchance the resolution of
options
parameterBy defining a new internal function called `resolveOptions` with consume one argument which for the unresoved `options` itself we can definitely improve the `options` parameter resolution to more flexible and use less code. This also make improvisation of type strict to that parameter.
Configuration menu - View commit details
-
Copy full SHA for 17d99bb - Browse repository at this point
Copy the full SHA 17d99bbView commit details
Commits on Apr 25, 2024
-
feat(api): Add new several API options
Here is the list new options that just being added in this change: - absolute?: { boolean } - Whether to return absolute paths for all entries. - basename? { boolean } - Whether to makes the returned entries only have their file and/or directories names. - rootDir?: { StringPath } - A string path represents the root directory to resolve the relative paths. They all were have their own priority tier, in the list above their priority are sorted from the highest (top) to the lowest (bottom). So, if you specified the `rootDir` but you also enabled the `absolute` option, then -- as a result, -- the `absolute` will be used instead (it is because the `absolute` option have the highest priority) and the `rootDir` value will be ignored. Please note, that the `basename` option are implicitly includes any directory names while listing a directory. If you want include the filenames only, then combining it with the `lsTypes.LS_F` is a good way if you are using `ls` function, or combine this option with `lsFiles` function for more flexible.
Configuration menu - View commit details
-
Copy full SHA for f578589 - Browse repository at this point
Copy the full SHA f578589View commit details
Commits on Apr 26, 2024
-
feat(rootDir): Add file URL support to
rootDir
optionPlease note, this only supports the URL with 'file:' protocol. Attempting to use other than 'file:' protocol will causing an error.
Configuration menu - View commit details
-
Copy full SHA for 2ba4a20 - Browse repository at this point
Copy the full SHA 2ba4a20View commit details -
docs: Add some TypeDoc documentation
Added TypeDoc documentation to the `defaultLsOptions` object and the `resolveOptions` (internal) function.
Configuration menu - View commit details
-
Copy full SHA for 968401c - Browse repository at this point
Copy the full SHA 968401cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d381781 - Browse repository at this point
Copy the full SHA d381781View commit details