MCPcopy Index your code
hub / github.com/cloudfoundry/nodejs-buildpack

github.com/cloudfoundry/nodejs-buildpack @v1.9.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.9.3 ↗ · + Follow
304 symbols 900 edges 66 files 99 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cloud Foundry Node.js Buildpack

CF Slack Join us on Slack

A Cloud Foundry buildpack for Node based apps.

Buildpack User Documentation

Official buildpack documentation can be found at node buildpack docs.

Building the Buildpack

To build this buildpack, run the following commands from the buildpack's directory:

  1. Source the .envrc file in the buildpack directory.

bash source .envrc To simplify the process in the future, install direnv which will automatically source .envrc when you change directories.

  1. Install buildpack-packager

    bash go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager@master

  2. Build the buildpack

    bash buildpack-packager build -stack [STACK] [ --cached=(true|false) ]

  3. Use in Cloud Foundry

Upload the buildpack to your Cloud Foundry and optionally specify it by name

```bash
cf create-buildpack [BUILDPACK_NAME] [BUILDPACK_ZIP_FILE_PATH] 1
cf push my_app [-b BUILDPACK_NAME]
```

Testing

Buildpacks use the Cutlass framework for running integration tests.

To test this buildpack, run the following command from the buildpack's directory:

  1. Source the .envrc file in the buildpack directory.

bash source .envrc To simplify the process in the future, install direnv which will automatically source .envrc when you change directories.

  1. Run unit tests

    bash ./scripts/unit.sh

  2. Run integration tests

Buildpacks use the Cutlass framework for running integration tests against Cloud Foundry. Before running the integration tests, you need to login to your Cloud Foundry using the cf cli:

```bash
cf login -a https://api.your-cf.com -u name@example.com -p pa55woRD
```

Note that your user requires permissions to run cf create-buildpack and cf update-buildpack. To run the integration tests, run the following command from the buildpack's directory:

```bash
./scripts/integration.sh
```

Contributing

Find our guidelines here.

Help and Support

Join the #buildpacks channel in our Slack community.

Reporting Issues

Open an issue on this project.

Active Development

The project backlog is on Pivotal Tracker.

Acknowledgements

Inspired by the Heroku buildpack.

Extension points exported contracts — how you extend this code

Yarn (Interface)
(no doc) [6 implementers]
src/nodejs/supply/supply.go
NPM (Interface)
(no doc) [3 implementers]
src/nodejs/supply/supply.go
HttpClient (Interface)
HTTPClient interface represents the basic HTTP client operations. [1 implementers]
src/nodejs/hooks/sealights.go
Command (Interface)
(no doc) [2 implementers]
src/nodejs/npm/npm.go
Command (Interface)
(no doc) [2 implementers]
src/nodejs/yarn/yarn.go

Core symbols most depended-on inside this repo

Execute
called by 87
src/nodejs/hooks/sealights.go
BuildDir
called by 61
src/nodejs/finalize/finalize.go
Info
called by 40
src/nodejs/package_json/package_json.go
AfterCompile
called by 33
src/nodejs/hooks/snyk.go
Output
called by 31
src/nodejs/hooks/snyk.go
Build
called by 16
src/nodejs/supply/supply.go
ChooseNodeVersion
called by 12
src/nodejs/supply/supply.go
ReadPackageJSON
called by 11
src/nodejs/supply/supply.go

Shape

Method 167
Function 71
Struct 51
Interface 14
TypeAlias 1

Languages

Go99%
TypeScript1%

Modules by API surface

src/nodejs/supply/supply.go57 symbols
src/nodejs/supply/mocks_test.go56 symbols
src/nodejs/hooks/sealights.go34 symbols
src/nodejs/hooks/snyk.go18 symbols
src/nodejs/finalize/mocks_test.go16 symbols
src/nodejs/hooks/seeker_agent.go14 symbols
src/nodejs/finalize/finalize.go11 symbols
src/nodejs/yarn/mocks_test.go8 symbols
src/nodejs/hooks/contrast_security.go8 symbols
src/nodejs/npm/npm.go6 symbols
src/nodejs/npm/mocks_test.go6 symbols
src/nodejs/hooks/mocks_test.go6 symbols

For agents

$ claude mcp add nodejs-buildpack \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact