Layered configuration merge, interpolation and provenance audit
moon update
moon build --target js
moon run cmd/main --target js -- examples/request.json # a self-contained request
node _build/js/debug/build/cmd/main/main.js examples/request.json
python -B scripts/files.py examples/service/dev.manifest.json # layer files + environment via the adaptermoon add 123123213weqw/moon_configweave@0.10.0import {
"123123213weqw/moon_configweave" @engine,
"moonbitlang/core/json",
}fn example(request : Json) -> Json raise {
@engine.execute(request)
}| Scenario | Inputs | What the output shows |
|---|---|---|
| examples/service | TOML defaults, dev/prod JSON overrides, a database password from the environment | deployable dev config; a wrong "5432" string override in prod located at /database/port with origins defaults → prod; a dev/prod diff |
| examples/ci | base job plus linux/macos/windows overlays | append vs unique step and target merges; a Windows type conflict rejected under strict_types or reported as an issue; a stable single-line export |
| examples/tenants | app defaults, organization TOML policy, two tenant overrides | three-level resolution; tenant-b's rate limit and auth downgrade flagged; its hardcoded signing key reported as a masked_override without revealing it |
moon check --deny-warn --target js # zero warnings on every backend
moon test --target js # 38 tests: 33 fixture cases + property tests
moon test --target wasm
moon test --target wasm-gc
moon test --target native # requires a C compiler
moon build --target js
node scripts/check.mjs # the 33 fixtures through the real CLI
python -B scripts/reference.py # 100 configuration sets vs an independent Python oracle
python -B scripts/integration.py # TOML/JSON files, directory layers, environment allowlist, adapter errors
python -B scripts/scenarios.py # the three scenarios, 43 checks
python -B scripts/bench.py --check # scale: 24k-key merge, 1000 references, depth 100
python -B scripts/fixtures.py --check # generated tests and usage guide match tests/cases.json
python -B scripts/stats.py # source statistics by category
sh scripts/consume.sh REGISTRY_VERSION # fresh module consumes the published packageInstall
Download zipLayered configuration merge, interpolation and provenance audit