cnpmcore
cnpmcore copied to clipboard
Private NPM Registry for Enterprise
I set `syncMode:all` to download all online versions, but only want to synchronize the last few versions in the library since they are for Intranet use. For example, the latest...
like https://socket.dev/npm/package/egg
https://github.com/stipsan/ioredis-mock
- 对外需要跟 npm registry 沟通,看看是否可以提供新的接口,走分页。 - 对内,查询 db 走分页  ## Todos - [ ] 支持 semver range 查询
[ // FIXME: should show download progress](https://github.com/cnpm/cnpmcore/blob/a4429d11f4a035b63888643e940f166a1d8614e8/app/common/FileUtil.ts#L21)
这样也可以确保我们及时升级到合适的 node 版本而不需要长期维护多个 node 版本的支持。
如 https://github.com/flowxjs/npm/blob/master/src/adapters/http/controller/extra.controller.ts#L46
引入「查询服务」
https://www.yuque.com/liberty/rf322x/gxtqnp#VxDZb 有比较多查询请求,目前混杂在 Service 和 Repository 层,有一些是直接从 Repository 读取数据,有一些是从 Service 读数据。 如果引入查询服务,可以比较干净地分离耦合。
在请求接口(http://127.0.0.1:7000/-/package/0g/syncs)时报错: ``` { "error": "Unexpected token ':'" } ``` 具体报错信息: ``` Error compiling schema, function code: const schema22 = scope.schema[12];const func1 = scope.func[1];const func3 = scope.func[2];return function validate19(data, {instancePath="", parentData,...