Ship file viewer, editor improvements, and private package releases

This commit is contained in:
Clintchiz committed 2026-09-09 11:20:11 +05:30
1 parent 645914955c
commit a4a31032b9
158 files changed
+10523 -137

No files matched your search

+14 -1
View File
@@ -28,6 +28,9 @@ function run(command: string, args: string[], capture = false, allowFailure = fa
}
function runNpm(args: string[], capture = false, allowFailure = false) {
if (process.env.WRNEXUS_NPM_REGISTRY) {
args = ["--registry", process.env.WRNEXUS_NPM_REGISTRY, ...args];
}
return process.platform === "win32"
? run(
process.env.ComSpec ?? "cmd.exe",
@@ -138,7 +141,17 @@ if (mode === "plan") {
run(process.execPath, ["test", ...selected.map((pkg) => `packages/${pkg.dir}`)]);
run(process.execPath, ["run", "scripts/publish-packages.ts", ...selected.map((pkg) => pkg.name)]);
runNpm(["whoami"]);
for (const pkg of selected) {
// Staging records dependencies first; preserve that order during publication.
const integrity = JSON.parse(
readFileSync(join(root, ".publish", "PACKAGE-INTEGRITY.json"), "utf8"),
);
const ordered = integrity.packages.map((entry: { name: string }) => {
const pkg = selected.find((pkg) => pkg.name === entry.name);
if (!pkg) throw new Error(`Unexpected staged package ${entry.name}`);
return pkg;
}) as PackageInfo[];
if (ordered.length !== selected.length) throw new Error("Staged package selection is incomplete");
for (const pkg of ordered) {
const stage = join(root, ".publish", pkg.dir);
if (!registryHas(pkg)) runNpm(["publish", stage, "--access", "restricted"]);
console.log(` ✓ ${pkg.name}@${pkg.manifest.version}`);