Incorrect definition of Package interface in public @verdaccio/types
See original GitHub issueYour Environment
- verdaccio version: 5.2.2
- node version [14.18.1]:
- package manager: [npm 6.14.15]
- os:[windows 11]
- platform: [all platforms, starting verdaccio as part of larger system, not CLI]
Describe the bug
In the @verdaccio/types
the Package
has property defined as GenericBody
while it really string/number
according to Verdaccio internal types.
To Reproduce
- install
@verdacco/types
- import
Package
from@verdaccio/types
- Write a code e. g. to serialize the Package object to Datastore or load it back.
Expected behavior
the properties of exposed types in @verdaccio/types
must be same as same exposed types used within verdaccio core.
Configuration File (cat ~/.config/verdaccio/config.yaml)
This issue does not scoped to specific settings in config
Environment information
This issue affects development experience.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
types - AuthCallback: Incorrect definition · Issue #1924
However, the server seems to be expecting an object when there is an error for the callback, not a string. When I try...
Read more >Java tutorial says I can have a package-private interface ...
I want to define an interface that allows unchecked access to members of a collection. However, when a public class implements this interface,...
Read more >ABAP Package Concept Part 2 – Package Interfaces of ...
You can define properties of a package interface. One is to define which object types can be added. SAP distinguishes between package with...
Read more >Packages In Java
Package in Java is a mechanism to encapsulate a group of classes, sub packages and interfaces. Packages are used for:.
Read more >Real world advice for writing maintainable Go programs
Public functions are the way to communicate across packages, and interfaces are the mechanism to define behaviour across packages. Pure ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello! Thanks for reply. I implementing a standard integration in a corporate environment. I added a mini-plugin for auth, using our private auth API, and added a storage plugin to store packages in our private google cloud DB and bucket. I had also wrap the real verdaccio with an express-based “proxy” whose sole purpose is to override the url path from
/some/prefix/to/npm
into just/
- because I can not just say withurl_prefix
that all requests, including from NPM CLI, should be at that/some/prefix/to/npm
. Thehttp-proxy-middleware
npm package helped with this a lot, making this proxy literally a one-liner.Such requirement for this behavior for
url_prefix
to be applied to all requests even tocomes from fact that for security reasons we can not expose repository existence at dns level with domain like
npm.example.com
Only with this mini-proxy I was able to achieve verdaccio (5.x.x) to accept package requests at proper urls (withurl_prefix
applied) there, without updatingverdaccio
internals.BTW I guess that problem I reported seems to start to happen when I tried first to integrate not
verdaccio
package but rather@verdaccio/core
or@verdaccio/server
with being pubished@verdaccio/types
referenced.So for now the published
@verdaccio/types
compatible only with publishedverdaccio
package.Types were refactored with several improvements:
I consider this ticket outdated, so closing it.