{"modulePath":"github.com/slackapi/slack-cli","version":"v0.0.0-20261124200210-0bde480cb96b","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package node\n\n## Functions\n\n```go\nfunc IsRuntimeForProject(ctx context.Context, fs afero.Fs, dirPath string, sdkConfig hooks.SDKCLIConfig) bool\n```\nIsRuntimeForProject returns true if dirPath is a Node.js project\n\n## Types\n\n```go\ntype NPM interface {\n\tInstallAllPackages(ctx context.Context, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (string, error)\n\tInstallDevPackage(ctx context.Context, pkgName string, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (string, error)\n\tListPackage(ctx context.Context, pkgName string, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (pkgNameVersion string, exists bool)\n}\n```\nNPM defines the npm commands to interact with a node project\n\n```go\ntype NPMClient struct {\n}\n```\nNPMClient implements the NPM interface and executes real npm commands\n\n```go\nfunc (n *NPMClient) InstallAllPackages(ctx context.Context, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (string, error)\n```\nInstallAllPackages installs all packages by running a command similar to \\`npm install .\\`\n\n```go\nfunc (n *NPMClient) InstallDevPackage(ctx context.Context, pkgName string, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (string, error)\n```\nInstallDevPackage installs the specified package and saves it as a \"devDependency\" by running a command similar to \\`npm install --save-dev \\\u003cpackage\u003e\\`\n\n```go\nfunc (n *NPMClient) ListPackage(ctx context.Context, pkgName string, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (pkgNameVersion string, exists bool)\n```\nListPackage lists the installed version of a provided package\n\n```go\ntype NPMMock struct {\n\tmock.Mock\n}\n```\nNPMMock mocks the NPM interface.\n\n```go\nfunc (n *NPMMock) InstallAllPackages(ctx context.Context, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (string, error)\n```\nInstallAllPackages mocks the \\`npm install .\\` command\n\n```go\nfunc (n *NPMMock) InstallDevPackage(ctx context.Context, pkgName string, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (string, error)\n```\nInstallDevPackage mocks the \\`npm install --save-dev \\\u003cpackage\u003e\\` command\n\n```go\nfunc (n *NPMMock) ListPackage(ctx context.Context, pkgName string, dirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer) (pkgNameVersion string, exists bool)\n```\nListPackage mocks the \\`npm list\\` command\n\n```go\ntype Node struct {\n\t// contains filtered or unexported fields\n}\n```\nNode runtime type\n\n```go\nfunc New() *Node\n```\nNew creates a new Node runtime\n\n```go\nfunc (n *Node) HooksJSONTemplate() []byte\n```\nHooksJSONTemplate returns the default hooks.json template\n\n```go\nfunc (n *Node) IgnoreDirectories() []string\n```\nIgnoreDirectories is a list of directories to ignore when packaging the runtime for deployment.\n\n```go\nfunc (n *Node) InstallProjectDependencies(\n\tctx context.Context,\n\tdirPath string,\n\thookExecutor hooks.HookExecutor,\n\tios iostreams.IOStreamer,\n\tfs afero.Fs,\n\tos types.Os,\n) (string, error)\n```\nInstallProjectDependencies runs \\`npm install\\` in the dirPath\n\n```go\nfunc (n *Node) Name() string\n```\nName prints the name of the runtime\n\n```go\nfunc (n *Node) PreparePackage(ctx context.Context, sdkConfig hooks.SDKCLIConfig, hookExecutor hooks.HookExecutor, opts types.PreparePackageOpts) error\n```\nPreparePackage will prepare and copy the app in projectDirPath to tmpDirPath as a release-ready bundle.\n\n```go\nfunc (n *Node) SetVersion(version string)\n```\nSetVersion sets the Version value\n\n```go\nfunc (n *Node) Version() string\n```\nVersion is the runtime version used by the hosted app deployment\n\n","path":"github.com/slackapi/slack-cli/internal/runtime/node","name":"node","synopsis":"","isRedistributable":true}
