Commit Graph

10 Commits

Author SHA1 Message Date
Kenrick
c6463b9fd0 feat(git-fetcher): shallow clone when fetching git resource (#4548)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-04-14 12:08:59 +03:00
Dave Brotherstone
a6cf11cb77 feat(config): add support for token helper (#4163)
* feat(config): add support for token helper

Use the new interface in `pnpm/credentials-by-uri` for supporting token
helpers. A token helper is an executable, set in the user's `.npmrc`
which outputs an auth token. This can be used in situations where the
`authToken` is not a constant value, but is something that refreshes
regularly, where a script or other tool can use an existing refresh
token to obtain a new access token.

The configuration for the path to the helper must be an absolute path,
with no arguments. In order to be secure, it is _only_ permitted to set
this value in the user `.npmrc`, otherwise a project could place a value
in a project local `.npmrc` and run arbitrary executables.

A similar feature is available in many similar tools. The implementation
in `credentials-by-uri` is modelled after the `vault` (vaultproject.io)
implementation - https://github.com/hashicorp/vault/blob/main/command/token/helper_external.go

* test: fix

* docs: add changesets

Co-authored-by: Zoltan Kochan <z@kochan.io>
2021-12-30 23:16:06 +02:00
Zoltan Kochan
4ab87844a9 feat: injecting workspace packages (#3915)
close #3510
2021-11-01 10:14:52 +08:00
Zoltan Kochan
05baaa6e74 feat: new config setting added - fetch-timeout (#3390)
close #3387
2021-04-24 19:09:52 +03:00
Zoltan Kochan
d6d091f249 style: use es2015 imports (#3143) 2021-02-15 05:06:10 +02:00
Zoltan Kochan
88e1eaa908 style: use no delimiters in type declarations 2020-08-26 01:42:36 +03:00
Zoltan Kochan
855f8b00a6 refactor: add createResolver() to @pnpm/client 2020-08-20 01:47:38 +03:00
Zoltan Kochan
46128b5b01 refactor: export AgentOptions from npm-registry-agent 2020-08-14 03:34:43 +03:00
Zoltan Kochan
c3796a71d5 refactor: proxy 2020-07-01 03:50:55 +03:00
Zoltan Kochan
71aeb9a382 refactor: API of resolvers and fetchers
Instead of creating a separate fetch function for the resolvers
and fetchers, use a single one.

Also, use a single getCredentials function.

close #2652
PR #2655
2020-06-29 17:13:02 +03:00