Skip to main content

@cdktn/bundler-local

Host-process asset bundler for CDK Terrain.

LocalBundler runs a build command directly on the machine performing the synth and stages its output as a TerraformAsset. The required toolchain must already be installed on the host; for an isolated, reproducible build use @cdktn/bundler-docker instead.

Usage

import { TerraformAsset, AssetType } from "cdktn";
import { LocalBundler } from "@cdktn/bundler-local";

new TerraformAsset(this, "asset", {
  path: "./src",
  type: AssetType.DIRECTORY,
  bundler: new LocalBundler({
    command: ["sh", "-c", "npm run build -- --out-dir \"$ASSET_OUTPUT_DIR\""],
  }),
});

The command is spawned directly, without a shell, so environment variable references like $ASSET_OUTPUT_DIR are only expanded if the command itself is a shell (sh -c "..." as above). Two variables are set for it:

  • ASSET_INPUT_DIR — the asset source (read-only).
  • ASSET_OUTPUT_DIR — a caller-owned directory the build writes its artifact into.

Windows

LocalBundler resolves npm, npx, pnpm, and .cmd/.bat shims under node_modules/.bin the same way cross-spawn does, so these commands work on Windows without a shell. A bare name like "tsc" is only found this way when the directory containing its shim (for example node_modules/.bin) is on PATH; otherwise pass a relative or absolute path to it instead.

The sh -c "..." form in the example above still needs sh on PATH (for example through Git Bash or WSL), since Windows has no built-in shell of that name. A command that does not need a shell, such as a package.json script run directly (["npm", "run", "build"]), works on Windows without that dependency.

A script run directly (for example ["./build.js"]) relies on Windows file association, not on a shebang line, to pick an interpreter — pass the interpreter explicitly instead (["node", "build.js"]).

License

Mozilla Public License 2.0

Metadata

Release files for cdktn-bundler-local 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdktn-bundler-local 0.1.0
File Size Uploaded Provenance Actions
cdktn_bundler_local-0.1.0.tar.gz 39.0 kB With provenance Details for cdktn_bundler_local-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdktn-bundler-local 0.1.0
File Interpreter ABI Platform Actions
cdktn_bundler_local-0.1.0-py3-none-any.whl Python 3 none any Details for cdktn_bundler_local-0.1.0-py3-none-any.whl

Total release size: 76.2 kB

Release files / cdktn_bundler_local-0.1.0.tar.gz

Download URL cdktn_bundler_local-0.1.0.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c08e142c2049a6673a39b385586af6f90c6167eca9e0ca45fcf6c8d13fa81778
BLAKE2b-256 checksum
How to use checksums
bf46f76bf526aa225d2c070a9ea093b81524f421edf0f54bdd8823c3902cd509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / cdktn_bundler_local-0.1.0-py3-none-any.whl

Download URL cdktn_bundler_local-0.1.0-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca1c791f767a5e7f43b602a0d9f5d067739239885b2e951d1dfe04caacf6e265
BLAKE2b-256 checksum
How to use checksums
880ee5f40195d8537d55625906da104f17f7b6cabbd36e8c5325d4b74f83aff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for cdktn-bundler-local 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cdktn_bundler_local-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page