mesh-build-node: narrow the fetch to the named paths, build members against the SDK their lock names, and build, pack and publish a package (issues 1758, 1587 S15-S19; ADR 0499 §4, ADR 0498 §5, ADR 0500 §4-§6; lead decision L10)
build_node_fetch takes buildstep.FetchRequest (dir and paths narrow the workspace) and an
optional package {repository, commit, ref}: the group's package member, built and packed
shut off and published nowhere. Each member's lock decides its SDK: the group's packed
file when the version and integrity are the lock's, else the registry's (integrity
checked); a version the registry lacks fails waits for: @novox/mesh-sdk@<version>. A
package artifact is built by its own script and packed with npm pack, shut off; only a
trunk build publishes it, from this process with the write credential (never in a
workspace): absent is published, the same file is done, another is version taken:. The
registry configuration file now lies outside every workspace.
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
@@ -79,3 +80,10 @@ func (r Registry) Npmrc() string {
|
||||
}
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// authorize gives a request to the registry the account's credential, when there is one.
|
||||
func (r Registry) authorize(req *http.Request) {
|
||||
if r.Username != "" && r.Password != "" {
|
||||
req.SetBasicAuth(r.Username, r.Password)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user