Comments (5)
Can you give a little more explanation of how you're looking to augment? Are you proposing a new provider (which would require a catalog behavior, for discovery of library names, versions, and files)? Or augmenting the existing provider with fallbacks for downloading files?
from librarymanager.
Hi Jimmy,
I'm looking for both. To provide the ability to bring in a new provider, then as another feature to fall back to another provider if the files are not available. Full disclosure I haven't looked at the codebase yet. So I'm not sure the lift. What I can do is look at the code and get back to you maybe next week so I can talk more intelligently about it?
-m
from librarymanager.
If I have a share,
\server
|-myPathToTheLibraryVersion
|-0.0.1
|-0.0.2
what about
{
"provider": "URL",
"library": "https://myURL/[email protected]",
"destination": "myLibrary/",
"files":[] //optional
}
Yes, I know about filesystem but AFAIK, it requires me to have one entry per file instead of just using the folder
from librarymanager.
@jimmylewis , seconded - It would be very handy to be able to point at internal Gitlab/Nexus/etc repos. Many organizations maintain "blessed" CDNs that mirror only the latest approved packages, to help with bandwidth and compliance.
from librarymanager.
A few thoughts/responses:
fall back to another provider if the files are not available
This one is tricky because it's quite common that the files are not the same across providers. For example, jsdelivr provides .min.js and .min.css files for any .js or .css file in the library - even if the package owner doesn't publish it to NPM. Using unpkg as a fallback won't work for these, because they only exist from the JSDelivr provider. I would also expect similar from cdnjs, which primarily only provides the dist files for a library, not the original sources; again, it wouldn't be a suitable fallback for files from jsdelivr or unpkg depending on which assets you're consuming. And a 3rd example in this case is that the file paths are inconsistent across some providers as well: once again, cdnjs has simpler file paths (e.g. d3.min.js
) vs the others (e.g. dist/d3.min.js
). Remapping all of these would be a considerable effort and is unfortunately not feasible to maintain.
what about
{
"provider": "URL",
"library": "https://myurl/[email protected]",
"destination": "myLibrary/",
"files":[] //optional
}
This looks really appealing, but given a URL, libman cannot determine the list of files available - either for the file preview, or for actually downloading the library. As it is, the filesystem
provider can take a URL to a specific file, but you need a separate library for each file defined this way. It could work to have a URL provider where the "files" are required, but that still creates ambiguity between a single file and a directory if the user doesn't fully specify all the information - it seems like a usability issue. It could be addressed with extra effort (e.g. special validation for this provider), but certainly would need to be taken into account.
It would be very handy to be able to point at internal Gitlab/Nexus/etc repos...
I think a big challenge here is implementing something that can authenticate with each of these systems, but also handles credentials securely. Currently libman does allow storing a password for the proxy server, but that setting is stored on the local machine and only works on Windows (the .NET Framework API used is not present on other platforms, or in newer versions of .NET).
from librarymanager.
Related Issues (20)
- Library Manager tool does not work on Visual Studio 2022 HOT 20
- Package Microsoft.Web.LibraryManager.Cli 2.1.175 is not compatible with net6.0 HOT 1
- Allow specifying destination per file HOT 7
- Lowering importance of informational messages from `RestoreTask`
- Add macOS Arm64 support to the CLI tool HOT 4
- libman does not allow defining the bootstrap package twice (without ignoring one of them).
- Restore operations happen in foreground in Class Library projects in Visual Studio
- libman: library could not be resolved by 'cdnjs' provider AGAIN HOT 8
- Switch to MIT license
- Consolidate Nuget feed
- version 2.1.175 doesn't support .Net 7.0.11 HOT 9
- Error during restore mentioning libman.config.json in use.
- "[email protected]" library could not be resolved HOT 6
- Expose latest version via CLI, without updating
- dotnet libman update installs deprecated package versions HOT 1
- Libman restore failed in Abp Boilerplate demo HOT 1
- libman command error after installed the Microsoft.Web.LibraryManager.Cli HOT 1
- Unable to build the project locally HOT 3
- Proposal for more granular file mappings per library
- @latest tag needs to handle fluctuating version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librarymanager.