N1: the Node build module reads and says its import set; each build module judges by its own setting (issue 721)

The step tool build_node_imports reads, after a build, esbuild's metafile of each
TypeScript bundle's staged entrypoints and launchers and answers the mesh npm
packages among its inputs and external imports, each by its package name once
(@novox/mesh-sdk, never a sub-path); the ask's steps run it as Imports and say
the set as imports-reported on node-build-node's subject of the node. The Node
build module declares the setting import-scope (default @novox) and the Go build
module import-prefix (default the forge's Go module prefix), each filled into the
step runner's ask as ImportScope and ImportPrefix.

Builds: design 47 H2 H-A-523, H-A-517, H-A-532 DQ-6, DMC-2, DMC-3, H-A-534, H-A-535
This commit is contained in:
2026-11-23 11:21:35 +01:00
parent 0e35d32669
commit b117e4ab55
13 changed files with 384 additions and 5 deletions
@@ -12,6 +12,7 @@ import (
sdkstep "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/buildstep"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/steprun"
trunk "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/trunk"
stdio "git.novox.be/novox/mesh-sdk/go"
)
@@ -115,6 +116,10 @@ func TestManifestTakesTheBuildCapacity(t *testing.T) {
if strings.Contains(doc.Config[steprun.BuildHoursSetting].Description, "=") {
t.Errorf("the build-hours description names a node pair")
}
// Design 47 H2 H-A-535: the Node build module declares import-scope, the mesh's npm scope by default.
if scope := string(doc.Config[ImportScopeSetting].Default); scope != `"`+trunk.DefaultNpmScope+`"` {
t.Errorf("the import-scope default = %s, want %q", scope, trunk.DefaultNpmScope)
}
var capacity float64
_ = json.Unmarshal(doc.Config[sdkstep.CapacitySetting].Default, &capacity)
if capacity != 0 {