Dagger
Search

npm

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/grouville/dagger-to-agents/toolkit/npm@2b409943e023503b22024533c12e63ba2306c031

Entrypoint

Return Type
Npm
Example
dagger -m github.com/grouville/dagger-to-agents/toolkit/npm@2b409943e023503b22024533c12e63ba2306c031 call \
func (m *myModule) example() *dagger.Npm  {
	return dag.
			Npm()
}
@function
def example() -> dagger.Npm:
	return (
		dag.npm()
	)
@func()
example(): Npm {
	return dag
		.npm()
}

Types

Npm 🔗

coverage() 🔗

Coverage runs the Vitest coverage command and returns its stdout

Return Type
String !
Arguments
NameTypeDefault ValueDescription
npmContainer !-No description provided
sourceDirectory -No description provided
Example
dagger -m github.com/grouville/dagger-to-agents/toolkit/npm@2b409943e023503b22024533c12e63ba2306c031 call \
 coverage --npm IMAGE:TAG
func (m *myModule) example(ctx context.Context, npm *dagger.Container) string  {
	return dag.
			Npm().
			Coverage(ctx, npm)
}
@function
async def example(npm: dagger.Container) -> str:
	return await (
		dag.npm()
		.coverage(npm)
	)
@func()
async example(npm: Container): Promise<string> {
	return dag
		.npm()
		.coverage(npm)
}