Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion content/en/docs/plugins/autodiscovery/npm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,40 @@ Then for each of them, it tries to update them.

==== Example

===== Basic Example

[source,yaml]
----
# updatecli.d/npm.yaml
autodiscovery:
crawlers:
npm:
rootdir: "."
versionfilter:
kind: semver
pattern: minor
----

===== Private Registry Example

The following example shows how to configure npm autodiscovery to work with a private npm registry:

[source,yaml]
----
# updatecli.d/default.yaml
# updatecli.d/npm-private.yaml
autodiscovery:
crawlers:
npm:
rootdir: "."
# URL of your private npm registry
url: "https://npm.example.com"
# Authentication token (use environment variables for security)
registrytoken: "${NPM_TOKEN}"
# Optional: path to custom .npmrc file
npmrcpath: "/path/to/.npmrc"
versionfilter:
kind: semver
pattern: ">=1.0.0"
----

NOTE: The `url`, `registrytoken`, and `npmrcpath` parameters are propagated to all generated npm resource specs, allowing consistent authentication across all discovered dependencies.
Loading