diff --git a/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md b/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md index 48a0632f2..3c4d44c39 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md +++ b/content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md @@ -78,7 +78,7 @@ cat >> "${layersdir}/node-js.sbom.cdx.json" << EOL { "type": "library", "name": "node-js", - "version": "$node-js_version" + "version": "${node_js_version}" } ] } @@ -88,7 +88,7 @@ EOL We can also add an SBOM entry for each dependency listed in `package.json`. Here we use `jq` to add a new record to the `components` array in `bundler.sbom.cdx.json`: ```bash -cnode-jsbom="${layersdir}/node-js.sbom.cdx.json" +node-jsbom="${layersdir}/node-js.sbom.cdx.json" cat >> ${node-jsbom} << EOL { "bomFormat": "CycloneDX", @@ -98,22 +98,11 @@ cat >> ${node-jsbom} << EOL { "type": "library", "name": "node-js", - "version": "$node-js_version" + "version": "${node_js_version}" } ] } EOL -if [[ -f package.json ]] ; then - for gem in $(gem dep -q | grep ^Gem | sed 's/^Gem //') - do - version=${gem##*-} - name=${gem%-${version}} - DEP=$(jq --arg name "${name}" --arg version "${version}" \ - '.components[.components| length] |= . + {"type": "library", "name": $name, "version": $version}' \ - "${node-jsbom}") - echo ${DEP} > "${node-jsbom}" - done -fi ``` Your `node-js-buildpack/bin/build` script should look like the following: @@ -125,30 +114,38 @@ set -eo pipefail echo "---> NodeJS Buildpack" +# ======= MODIFIED ======= # 1. GET ARGS layersdir=$1 plan=$3 # 2. CREATE THE LAYER DIRECTORY -node-js_layer="${layersdir}"/node-js -mkdir -p "${node-js_layer}" +node_js_layer="${layersdir}"/node-js +mkdir -p "${node_js_layer}" +# ======= MODIFIED ======= # 3. DOWNLOAD node-js -node-js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "node-js") | .metadata.version') -echo "---> Downloading and extracting NodeJS" -node-js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "$node-js_url" | tar -xxf - -C "${node-js_layer}" - -# 4. MAKE node-js AVAILABLE DURING LAUNCH -echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" +node_js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "node-js") | .metadata.version') || "18.18.1" +node_js_url=https://nodejs.org/dist/v18.18.1/node-v${node_js_version}-linux-x64.tar.xz +remote_nodejs_version=$(cat "${layersdir}/node-js.toml" 2> /dev/null | yj -t | jq -r .metadata.nodejs-version 2>/dev/null || echo 'NOT FOUND') +if [[ "${node_js_url}" != *"${remote_nodejs_version}"* ]] ; then + echo "-----> Downloading and extracting NodeJS" + node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz + wget -q -O - "${node_js_url}" | tar -xJf - --strip-components 1 -C "${node_js_layer}" + cat >> "${layersdir}/node-js.toml" << EOL +[metadata] +nodejs-version = "${node_js_version}" +EOL +else + echo "-----> Reusing NodeJS" +fi -# 5. MAKE node-js AVAILABLE TO THIS SCRIPT -export PATH="${node-js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node-js_layer}/lib" +# 4. MAKE node-js AVAILABLE DURING LAUNCH and CACHE the LAYER +echo -e '[types]\ncache = true\nlaunch = true' > "${layersdir}/node-js.toml" -# 6. SET DEFAULT START COMMAND +# ========== ADDED =========== +# 5. SET DEFAULT START COMMAND cat > "${layersdir}/launch.toml" << EOL -# our web process [[processes]] type = "web" command = "node app.js" @@ -156,7 +153,7 @@ default = true EOL # ========== ADDED =========== -# 7. ADD A SBOM +# 6. ADD A SBOM node-jsbom="${layersdir}/node-js.sbom.cdx.json" cat >> ${node-jsbom} << EOL { @@ -167,7 +164,7 @@ cat >> ${node-jsbom} << EOL { "type": "library", "name": "node-js", - "version": "$node-js_version" + "version": "${node_js_version}" } ] } @@ -197,7 +194,7 @@ The SBOM information is now downloaded to the local file system: cat layers/sbom/launch/examples_node-js/node-js/sbom.cdx.json | jq -M ``` -You should find that the included `node-js` version is `3.1.0` as expected. +You should find that the included `node-js` version is `18.18.1` as expected. ```text @@ -209,7 +206,7 @@ You should find that the included `node-js` version is `3.1.0` as expected. { "type": "library", "name": "node-js", - "version": "3.1.0" + "version": "18.18.1" }, ... ] diff --git a/content/docs/buildpack-author-guide/create-buildpack/build-app.md b/content/docs/buildpack-author-guide/create-buildpack/build-app.md index c1f964694..91e59c670 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/build-app.md +++ b/content/docs/buildpack-author-guide/create-buildpack/build-app.md @@ -39,10 +39,10 @@ Next, we'll download the NodeJS runtime and install it into the layer directory. ```bash echo "---> Downloading and extracting NodeJS" node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "${node_js_url}" | tar -xJf - -C "${node_js_layer}" +wget -q -O - "${node_js_url}" | tar -xJf - --strip-components 1 -C "${node_js_layer}" ``` -This code uses the `wget` tool to download the NodeJS binaries from the given URL, and extracts it to the `node_js_layer` directory. +This code uses the `wget` tool to download the NodeJS binaries from the given URL, and extracts it to the `node_js_layer` directory. We use `tar` to extract the NodeJS distribution into the `node_js_layer`. During the extraction we remove the top level directory (i.e. `--strip-components 1`). This means that we will end up with `${node_js_layer}/bin` and `${node_js_layer}/lib`. When starting the container the layers `bin` will automatically be added to the runtime `${PATH}`. The last step in creating a layer is writing a TOML file that contains metadata about the layer. The TOML file's name must match the name of the layer (in this example it's `node-js.toml`). Without this file, the Buildpack lifecycle will ignore the layer directory. For the NodeJS layer, we need to ensure it is available in the launch image by setting the `launch` key to `true`. Add the following code to the build script: @@ -74,14 +74,10 @@ mkdir -p "${node_js_layer}" # 3. DOWNLOAD node-js echo "---> Downloading and extracting NodeJS" node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "${node_js_url}" | tar -xJf - -C "${node_js_layer}" +wget -q -O - "${node_js_url}" | tar -xJf - --strip-components 1 -C "${node_js_layer}" # 4. MAKE node-js AVAILABLE DURING LAUNCH echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" - -# 5. MAKE node-js AVAILABLE TO THIS SCRIPT -export PATH="${node_js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node_js_layer}/lib" ``` Build your app again: diff --git a/content/docs/buildpack-author-guide/create-buildpack/caching.md b/content/docs/buildpack-author-guide/create-buildpack/caching.md index 4016d640a..7482c9fe0 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/caching.md +++ b/content/docs/buildpack-author-guide/create-buildpack/caching.md @@ -39,46 +39,36 @@ layersdir=$1 node_js_layer="${layersdir}"/node-js mkdir -p "${node_js_layer}" -# 3. DOWNLOAD RUBY +# 3. DOWNLOAD NodeJS echo "---> Downloading and extracting NodeJS" node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}" +wget -q -O - "$node_js_url" | tar -xJf - --strip-components 1 -C "${node_js_layer}" -# 4. MAKE RUBY AVAILABLE DURING LAUNCH -echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" - -# 5. MAKE RUBY AVAILABLE TO THIS SCRIPT -export PATH="${node_js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node_js_layer}/lib" - -# ======= MODIFIED ======= -# 6. INSTALL GEMS -echo "---> Installing gems" -runtimelayer="${layersdir}/bundler" -mkdir -p "${runtimelayer}" -echo -e '[types]\ncache = true\nlaunch = true' > "${layersdir}/bundler.toml" -bundle config set --local path "${runtimelayer}" && bundle install && bundle binstubs --all --path "${runtimelayer}/bin" +# 4. MAKE NodeJS AVAILABLE DURING LAUNCH and CACHE the LAYER +# ========== MODIFIED =========== +echo -e '[types]\ncache = true\nlaunch = true' > "${layersdir}/node-js.toml" -# 7. SET DEFAULT START COMMAND +# 5. SET DEFAULT START COMMAND cat > "${layersdir}/launch.toml" << EOL # our web process [[processes]] type = "web" -command = "bundle exec node-js app.rb" +command = "node app.js" default = true -# our worker process +# our debug process [[processes]] -type = "worker" -command = "bundle exec node-js worker.rb" +type = "debug" +command = "node --inspect app.js" EOL ``` -Now when we run: +Now when we build the image twice we should see the `node-js` layer is reused on the second build: ```bash pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-buildpack +pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-buildpack ``` @@ -86,94 +76,15 @@ You will see something similar to the following during the `EXPORTING` phase: ```text -Adding layer 'examples/node-js:bundler' +Reusing layer 'examples/node-js:node-js' ``` ## Caching dependencies -Now, let's implement the caching logic. We'll first need to create a `node-js-sample-app/Gemfile.lock` file with the contents given below: - -> Typically you would run `bundle install` locally to generate this file, but for the sake -> of simplicity we'll create `node-js-sample-app/Gemfile.lock` manually. - - -```text -GEM - remote: https://node-jsgems.org/ - specs: - mustermann (1.0.3) - rack (2.0.7) - rack-protection (2.0.7) - rack - sinatra (2.0.7) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.7) - tilt (~> 2.0) - tilt (2.0.9) - -PLATFORMS - node-js - -DEPENDENCIES - sinatra - -BUNDLED WITH - 2.0.2 -``` - -Replace the gem installation logic from the previous step: - -```bash -# ... - -echo "---> Installing gems" -runtimelayer="${layersdir}/bundler" -mkdir -p "${runtimelayer}" -echo -e '[types]\ncache = true\nlaunch = true' > "${layersdir}/bundler.toml" -bundle config set --local path "${runtimelayer}" && bundle install && bundle binstubs --all --path "${runtimelayer}/bin" - - -# ... -``` - -with the new logic below that checks to see if any gems have been changed. This simply creates a checksum for the previous `Gemfile.lock` and compares it to the checksum of the current `Gemfile.lock`. If they are the same, the gems are reused. If they are not, the new gems are installed. - -We'll now write additional metadata to our `bundler.toml` of the form `cache = true` and `launch = true`. This directs the lifecycle to cache our gems and provide them when launching our application. With `cache = true` the lifecycle can keep existing gems around so that build times are fast, even with minor `Gemfile.lock` changes. - -Note that there may be times when you would want to clean the cached layer from the previous build, in which case you should always ensure to remove the contents of the layer before proceeding with the build. In the case below this can be done using a simple `rm -rf "${runtimelayer}"/*` after the `mkdir -p "${runtimelayer}"` command. - -```bash -# Compares previous Gemfile.lock checksum to the current Gemfile.lock -runtimelayer="${layersdir}/bundler" -local_bundler_checksum=$((sha256sum Gemfile.lock || echo 'DOES_NOT_EXIST') | cut -d ' ' -f 1) -remote_bundler_checksum=$(cat "${layersdir}/bundler.toml" | yj -t | jq -r .metadata.checksum 2>/dev/null || echo 'DOES_NOT_EXIST') - -# Always set the types table so that we re-use the appropriate layers -echo -e '[types]\ncache = true\nlaunch = true' >> "${layersdir}/bundler.toml" - -if [[ -f Gemfile.lock && $local_bundler_checksum == $remote_bundler_checksum ]] ; then - # Determine if no gem dependencies have changed, so it can reuse existing gems without running bundle install - echo "---> Reusing gems" - bundle config --local path "${runtimelayer}" >/dev/null - bundle config --local bin "${runtimelayer}/bin" >/dev/null -else - # Determine if there has been a gem dependency change and install new gems to the bundler layer; re-using existing and un-changed gems - echo "---> Installing gems" - mkdir -p "${runtimelayer}" - cat >> "${layersdir}/bundler.toml" << EOL -[metadata] -checksum = "$local_bundler_checksum" -EOL - bundle config set --local path "${runtimelayer}" && bundle install && bundle binstubs --all --path "${runtimelayer}/bin" - -fi -``` - -Your full `node-js-buildpack/bin/build` script will now look like this: +Now, let's implement the caching logic. We need to record the version of the NodeJS runtime that is used in a build. On subsequent builds, the caching logic will detect the current requested NodeJS version and restore the previous layer from the cache if the current requested NodeJS version matches the previous NodeJS runtime version. -```bash +``` #!/usr/bin/env bash set -eo pipefail @@ -186,56 +97,31 @@ layersdir=$1 node_js_layer="${layersdir}"/node-js mkdir -p "${node_js_layer}" -# 3. DOWNLOAD RUBY -echo "---> Downloading and extracting NodeJS" +# 3. DOWNLOAD node-js node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}" - -# 4. MAKE RUBY AVAILABLE DURING LAUNCH -echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" - -# 5. MAKE RUBY AVAILABLE TO THIS SCRIPT -export PATH="${node_js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node_js_layer}/lib" - -# ======= MODIFIED ======= -# 6. INSTALL GEMS -# Compares previous Gemfile.lock checksum to the current Gemfile.lock -runtimelayer="${layersdir}/bundler" -local_bundler_checksum=$((sha256sum Gemfile.lock || echo 'DOES_NOT_EXIST') | cut -d ' ' -f 1) -remote_bundler_checksum=$(cat "${layersdir}/bundler.toml" | yj -t | jq -r .metadata.checksum 2>/dev/null || echo 'DOES_NOT_EXIST') -# Always set the types table so that we re-use the appropriate layers -echo -e '[types]\ncache = true\nlaunch = true' >> "${layersdir}/bundler.toml" - -if [[ -f Gemfile.lock && $local_bundler_checksum == $remote_bundler_checksum ]] ; then - # Determine if no gem dependencies have changed, so it can reuse existing gems without running bundle install - echo "---> Reusing gems" - bundle config --local path "${runtimelayer}" >/dev/null - bundle config --local bin "${runtimelayer}/bin" >/dev/null -else - # Determine if there has been a gem dependency change and install new gems to the bundler layer; re-using existing and un-changed gems - echo "---> Installing gems" - mkdir -p "${runtimelayer}" - cat >> "${layersdir}/bundler.toml" << EOL +remote_nodejs_version=$(cat "${layersdir}/node-js.toml" 2> /dev/null | yj -t | jq -r .metadata.nodejs-version 2>/dev/null || echo 'NOT FOUND') +if [[ "${node_js_url}" != *"${remote_nodejs_version}"* ]] ; then + echo "-----> Downloading and extracting NodeJS" + node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz + wget -q -O - "${node_js_url}" | tar -xJf - --strip-components 1 -C "${node_js_layer}" + cat >> "${layersdir}/node-js.toml" << EOL [metadata] -checksum = "$local_bundler_checksum" +nodejs-version = "18.18.1" EOL - bundle config set --local path "${runtimelayer}" && bundle install && bundle binstubs --all --path "${runtimelayer}/bin" - +else + echo "-----> Reusing NodeJS" fi -# 7. SET DEFAULT START COMMAND +# 4. MAKE node-js AVAILABLE DURING LAUNCH and CACHE the LAYER +echo -e '[types]\ncache = true\nlaunch = true' > "${layersdir}/node-js.toml" + +# ========== ADDED =========== +# 5. SET DEFAULT START COMMAND cat > "${layersdir}/launch.toml" << EOL -# our web process [[processes]] type = "web" -command = "bundle exec node-js app.rb" +command = "node app.js" default = true - -# our worker process -[[processes]] -type = "worker" -command = "bundle exec node-js worker.rb" EOL ``` @@ -247,25 +133,6 @@ pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-bu ``` -it will download the gems: - - -```text -===> BUILDING -... ----> NodeJS Buildpack ----> Downloading and extracting NodeJS ----> Installing gems -``` - -If you build the app again: - - -```bash -pack build test-node-js-app --path ./node-js-sample-app --buildpack ./node-js-buildpack -``` - - you will see the new caching logic at work during the `BUILDING` phase: @@ -273,8 +140,7 @@ you will see the new caching logic at work during the `BUILDING` phase: ===> BUILDING ... ---> NodeJS Buildpack ----> Downloading and extracting NodeJS ----> Reusing gems +---> Reusing node-js ``` Next, let's see how buildpack users may be able to provide configuration to the buildpack. diff --git a/content/docs/buildpack-author-guide/create-buildpack/make-app-runnable.md b/content/docs/buildpack-author-guide/create-buildpack/make-app-runnable.md index 618b75e0f..d8592e834 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/make-app-runnable.md +++ b/content/docs/buildpack-author-guide/create-buildpack/make-app-runnable.md @@ -41,17 +41,13 @@ mkdir -p "${node_js_layer}" # 3. DOWNLOAD node-js echo "---> Downloading and extracting NodeJS" node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}" +wget -q -O - "$node_js_url" | tar -xJf - --strip-components 1 -C "${node_js_layer}" # 4. MAKE node-js AVAILABLE DURING LAUNCH echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" -# 5. MAKE node-js AVAILABLE TO THIS SCRIPT -export PATH="${node_js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node_js_layer}/lib" - # ========== ADDED =========== -# 6. SET DEFAULT START COMMAND +# 5. SET DEFAULT START COMMAND cat > "${layersdir}/launch.toml" << EOL [[processes]] type = "web" diff --git a/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md b/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md index f7f4f1cab..210c8e78e 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md +++ b/content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md @@ -57,55 +57,31 @@ mkdir -p "${node_js_layer}" # ======= MODIFIED ======= # 3. DOWNLOAD node-js -node_js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "node-js") | .metadata.version') -echo "---> Downloading and extracting NodeJS $node_js_version" -node_js_url=https://nodejs.org/dist/v${node_js_version}/node-v${node_js_version}-linux-x64.tar.xz -wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}" - -# 4. MAKE node-js AVAILABLE DURING LAUNCH -echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" - -# 5. MAKE node-js AVAILABLE TO THIS SCRIPT -export PATH="${node_js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node_js_layer}/lib" - -# 6. INSTALL GEMS -# Compares previous package.json.lock checksum to the current package.json.lock -bundlerlayer="${layersdir}/bundler" -local_bundler_checksum=$((sha256sum package.json.lock || echo 'DOES_NOT_EXIST') | cut -d ' ' -f 1) -remote_bundler_checksum=$(cat "${layersdir}/bundler.toml" | yj -t | jq -r .metadata.checksum 2>/dev/null || echo 'DOES_NOT_EXIST') -# Always set the types table so that we re-use the appropriate layers -echo -e '[types]\ncache = true\nlaunch = true' >> "${layersdir}/bundler.toml" - -if [[ -f package.json.lock && $local_bundler_checksum == $remote_bundler_checksum ]] ; then - # Determine if no gem dependencies have changed, so it can reuse existing gems without running bundle install - echo "---> Reusing gems" - bundle config --local path "$bundlerlayer" >/dev/null - bundle config --local bin "$bundlerlayer/bin" >/dev/null -else - # Determine if there has been a gem dependency change and install new gems to the bundler layer; re-using existing and un-changed gems - echo "---> Installing gems" - mkdir -p "$bundlerlayer" - cat >> "${layersdir}/bundler.toml" << EOL +node_js_version=$(cat "$plan" | yj -t | jq -r '.entries[] | select(.name == "node-js") | .metadata.version') || "18.18.1" +node_js_url=https://nodejs.org/dist/v18.18.1/node-v${node_js_version}-linux-x64.tar.xz +remote_nodejs_version=$(cat "${layersdir}/node-js.toml" 2> /dev/null | yj -t | jq -r .metadata.nodejs-version 2>/dev/null || echo 'NOT FOUND') +if [[ "${node_js_url}" != *"${remote_nodejs_version}"* ]] ; then + echo "-----> Downloading and extracting NodeJS" + node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz + wget -q -O - "${node_js_url}" | tar -xJf - --strip-components 1 -C "${node_js_layer}" + cat >> "${layersdir}/node-js.toml" << EOL [metadata] -checksum = "$local_bundler_checksum" +nodejs-version = "${node_js_version}" EOL - bundle config set --local path "$bundlerlayer" && bundle install && bundle binstubs --all --path "$bundlerlayer/bin" - +else + echo "-----> Reusing NodeJS" fi -# 7. SET DEFAULT START COMMAND +# 4. MAKE node-js AVAILABLE DURING LAUNCH and CACHE the LAYER +echo -e '[types]\ncache = true\nlaunch = true' > "${layersdir}/node-js.toml" + +# ========== ADDED =========== +# 5. SET DEFAULT START COMMAND cat > "${layersdir}/launch.toml" << EOL -# our web process [[processes]] type = "web" command = "node app.js" default = true - -# our debug process -[[processes]] -type = "debug" -command = "node --inspect app.js" EOL ``` diff --git a/content/docs/buildpack-author-guide/create-buildpack/setup-local-environment.md b/content/docs/buildpack-author-guide/create-buildpack/setup-local-environment.md index 8cab7bb7d..9168eaf35 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/setup-local-environment.md +++ b/content/docs/buildpack-author-guide/create-buildpack/setup-local-environment.md @@ -43,9 +43,13 @@ const server = http.createServer((req, res) => { res.end('Hello World!'); }); -server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); -}); +// For demo purposes we do not actually start the server. This +// allows us pretend to start the server and check if the output +// message is correct. +//server.listen(port, hostname, () => { +// console.log(`Server running at http://${hostname}:${port}/`); +//}); +console.log(`Server running at http://${hostname}:${port}/`) ``` We also create a `package.json` file with the following contents: diff --git a/content/docs/buildpack-author-guide/create-buildpack/specify-multiple-process-types.md b/content/docs/buildpack-author-guide/create-buildpack/specify-multiple-process-types.md index d094d0f58..b284b9076 100644 --- a/content/docs/buildpack-author-guide/create-buildpack/specify-multiple-process-types.md +++ b/content/docs/buildpack-author-guide/create-buildpack/specify-multiple-process-types.md @@ -47,21 +47,13 @@ mkdir -p "${node_js_layer}" # 3. DOWNLOAD node-js echo "---> Downloading and extracting NodeJS" node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz -wget -q -O - "$node_js_url" | tar -xJf - -C "${node_js_layer}" +wget -q -O - "$node_js_url" | tar -xJf - --strip-components 1 -C "${node_js_layer}" # 4. MAKE node-js AVAILABLE DURING LAUNCH echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml" -# 5. MAKE node-js AVAILABLE TO THIS SCRIPT -export PATH="${node_js_layer}"/bin:$PATH -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"${node_js_layer}/lib" - -# 6. INSTALL GEMS -echo "---> Installing gems" -bundle install - # ========== MODIFIED =========== -# 7. SET DEFAULT START COMMAND +# 5. SET DEFAULT START COMMAND cat > "${layersdir}/launch.toml" << EOL # our web process [[processes]] @@ -88,11 +80,11 @@ You should then be able to run your new NodeJS debug process: ```bash -docker run --rm --entrypoint worker test-node-js-app +docker run --rm --entrypoint debug test-node-js-app ``` -and see the worker log output: +and see the debug log output: ```text diff --git a/tools/go.mod b/tools/go.mod index fb9f3b863..12d20dfe8 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -3,7 +3,7 @@ module github.com/buildpacks/docs/tools go 1.20 require ( - github.com/buildpacks/pack v0.31.0 + github.com/buildpacks/pack v0.32.1 github.com/gohugoio/hugo v0.100.2 github.com/spf13/cobra v1.7.0 ) @@ -71,8 +71,8 @@ require ( github.com/bep/gowebp v0.1.0 // indirect github.com/bep/overlayfs v0.6.0 // indirect github.com/bep/tmc v0.5.1 // indirect - github.com/buildpacks/imgutil v0.0.0-20230626185301-726f02e4225c // indirect - github.com/buildpacks/lifecycle v0.17.1 // indirect + github.com/buildpacks/imgutil v0.0.0-20231102131059-84d632186b59 // indirect + github.com/buildpacks/lifecycle v0.17.2 // indirect github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect github.com/clbanning/mxj/v2 v2.5.6 // indirect github.com/cli/safeexec v1.0.0 // indirect @@ -85,9 +85,9 @@ require ( github.com/dimchansky/utfbom v1.1.1 // indirect github.com/disintegration/gift v1.2.1 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect - github.com/docker/cli v24.0.6+incompatible // indirect + github.com/docker/cli v24.0.7+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.6+incompatible // indirect + github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -102,7 +102,7 @@ require ( github.com/ghodss/yaml v1.0.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect + github.com/go-git/go-git/v5 v5.10.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/swag v0.21.1 // indirect github.com/gobuffalo/flect v0.2.5 // indirect @@ -114,7 +114,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-containerregistry v0.16.1 // indirect github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect @@ -185,14 +185,14 @@ require ( go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.9.0 // indirect gocloud.dev v0.25.0 // indirect - golang.org/x/crypto v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/image v0.0.0-20220601225756-64ec528b34cd // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/sync v0.4.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/tools/go.sum b/tools/go.sum index 6c499b526..ee4057f66 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -293,12 +293,12 @@ github.com/bep/tmc v0.5.1 h1:CsQnSC6MsomH64gw0cT5f+EwQDcvZz4AazKunFwTpuI= github.com/bep/tmc v0.5.1/go.mod h1:tGYHN8fS85aJPhDLgXETVKp+PR382OvFi2+q2GkGsq0= github.com/bep/workers v1.0.0 h1:U+H8YmEaBCEaFZBst7GcRVEoqeRC9dzH2dWOwGmOchg= github.com/bep/workers v1.0.0/go.mod h1:7kIESOB86HfR2379pwoMWNy8B50D7r99fRLUyPSNyCs= -github.com/buildpacks/imgutil v0.0.0-20230626185301-726f02e4225c h1:HlRuSz+JGAzudNtNCfHIzXe0AEuHX6Vx8uZgmjvX02o= -github.com/buildpacks/imgutil v0.0.0-20230626185301-726f02e4225c/go.mod h1:mBG5M3GJW5nknCEOOqtmMHyPYnSpw/5GEiciuYU/COw= -github.com/buildpacks/lifecycle v0.17.1 h1:sCNj83TH1YE8Z3+CKHoFx/HK+llCVF1RlQUbj3xdNBQ= -github.com/buildpacks/lifecycle v0.17.1/go.mod h1:WFzcNp1WG4bwgHuXtKxMg4tdU3AguL44ZlP3knANeVs= -github.com/buildpacks/pack v0.31.0 h1:rmO1Bwjhmqi7ZYNbDORsqEs5B0VAMiS0lqf/uohHr9Q= -github.com/buildpacks/pack v0.31.0/go.mod h1:y+Y9JCPAKli4I9UBiAB0dcwDfPovUBozbUfz5dqcPIw= +github.com/buildpacks/imgutil v0.0.0-20231102131059-84d632186b59 h1:5g+dMdOO6Ufx/bDa5gUH/Aw9FN6wt7T3HzKSkHVvue4= +github.com/buildpacks/imgutil v0.0.0-20231102131059-84d632186b59/go.mod h1:PsazEB9yz+NG/cgm0Z1oQ0Xq6rD/U7eNMt5Su41afYY= +github.com/buildpacks/lifecycle v0.17.2 h1:CfJYWHIC5v996idgjDamYHBTk+G+c1Qt7Yk80MlbWpw= +github.com/buildpacks/lifecycle v0.17.2/go.mod h1:h8MrqltqMM+HQnn2F2JOQaKWmeybZ54qvlNV3pAiAqw= +github.com/buildpacks/pack v0.32.1 h1:TlKxevNRR8LAhtBpf8HuR8ODYnGqF0tpAwqojD8xVus= +github.com/buildpacks/pack v0.32.1/go.mod h1:xiyqG2a/wwxkAuSvTr7yCAGWlTjxmZ/HFm6OsAtjyns= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -358,12 +358,12 @@ github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+ github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= -github.com/docker/cli v24.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= +github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/pWFL7xjWWDgE= -github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -419,9 +419,9 @@ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66D github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= -github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git/v5 v5.10.0 h1:F0x3xXrAWmhwtzoCokU4IMPcBdncG+HAAqi9FcOOjbQ= +github.com/go-git/go-git/v5 v5.10.0/go.mod h1:1FOZ/pQnqw24ghP2n7cunVl0ON55BsjPYvhWHvZGhoo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -520,8 +520,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE= @@ -752,7 +752,7 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -935,8 +935,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -978,8 +978,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1031,8 +1031,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1053,8 +1053,8 @@ golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1068,8 +1068,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1158,8 +1158,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1168,8 +1168,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=