Harmont docs
Pipeline SDKReferenceToolchains

Npm

Generated reference for the harmont Npm API.

npm

Callable singleton for the npm toolchain — access as hm.npm.

Call directly to construct an NpmProject, or use the bare-form action methods (npm.test(), npm.run(script), etc.) for a one-shot leaf.

npm(*, path='.', version='20', image=None, base=None) -> NpmProject
ParameterTypeDefaultDescription
pathstr'.'Path to the npm project root (must contain a
package-lock.json).
versionstr'20'Node.js major version to install (e.g. "20" or
"20.x").
imagestr | NoneNoneLocal-mode Docker base image override.
baseStep | NoneNoneExisting Step to attach to instead of emitting a fresh
apt-base step.

Returns NpmProject — An NpmProject whose installed step is npm ci.

npm.fmt()

fmt(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

npm.install()

install(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

npm.lint()

lint(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

npm.run()

run(script, **kw) -> Step
ParameterTypeDefaultDescription
scriptstrrequired
kwAny{}

Returns Step

npm.test()

test(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmEntry

Callable singleton for the npm toolchain — access as hm.npm.

Call directly to construct an NpmProject, or use the bare-form action methods (npm.test(), npm.run(script), etc.) for a one-shot leaf.

NpmEntry.fmt()

fmt(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmEntry.install()

install(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmEntry.lint()

lint(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmEntry.run()

run(script, **kw) -> Step
ParameterTypeDefaultDescription
scriptstrrequired
kwAny{}

Returns Step

NpmEntry.test()

test(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmProject

npm project install chain — constructed via hm.npm().

installed is the npm ci step. Action methods (run, test, lint, fmt) attach leaves to installed so dependency installation is shared across CI actions.

Fields

FieldTypeDefault
pathstrrequired
installedSteprequired

NpmProject.fmt()

fmt(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmProject.install()

install() -> Step

Returns Step

NpmProject.lint()

lint(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

NpmProject.run()

run(script, **kw) -> Step
ParameterTypeDefaultDescription
scriptstrrequired
kwAny{}

Returns Step

NpmProject.test()

test(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

On this page