fix(publish): stage sibling sdk for plugin-cli smoke test and bump to 0.6.3

The plugin-cli publish step runs in a separate script invocation that wipes
the staging root first, so the smoke test could not resolve the runtime
@droposs/plugin-sdk dependency. Stage the sibling sdk on demand. Also adds
the pre-launch:network-post launch stage to the sdk types.
This commit is contained in:
BillyOutlast committed 2026-09-17 21:44:14 -04:00
1 parent f6ae0849b9
commit db1f96adf3
3 files changed
+14 -4

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@drop-oss/plugin-cli",
"version": "0.6.2",
"version": "0.6.3",
"description": "Drop Plugin build, test, signing, and packaging CLI for Drop OSS",
"type": "module",
"bin": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@drop-oss/plugin-sdk",
"version": "0.6.2",
"version": "0.6.3",
"description": "Drop Plugin SDK contract, types, and mock testing harness for Drop OSS",
"type": "module",
"main": "dist/index.js",
+12 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/* global process, console */
import { cpSync, rmSync, mkdirSync, writeFileSync, readFileSync, readdirSync, statSync, symlinkSync } from "node:fs";
import { cpSync, rmSync, mkdirSync, writeFileSync, readFileSync, readdirSync, statSync, symlinkSync, existsSync } from "node:fs";
import path from "node:path";
import { execSync } from "node:child_process";
@@ -57,7 +57,7 @@ const stagingRoot = path.join(repoRoot, ".legacy-publish");
rmSync(stagingRoot, { recursive: true, force: true });
mkdirSync(stagingRoot, { recursive: true });
for (const name of targets) {
function stagePackage(name) {
const pkg = PACKAGES[name];
const staged = path.join(stagingRoot, name);
cpSync(path.join(repoRoot, pkg.dir), staged, {
@@ -94,6 +94,12 @@ for (const name of targets) {
}
}
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n");
return staged;
}
for (const name of targets) {
const pkg = PACKAGES[name];
const staged = stagePackage(name);
// Post-rewrite smoke testing: ensure staged artifacts pack cleanly and evaluate without errors
execSync("npm pack --dry-run", { cwd: staged, stdio: "pipe" });
@@ -111,7 +117,11 @@ for (const name of targets) {
if (item === scope) continue;
symlinkSync(path.join(srcNodeModules, item), path.join(nodeModulesPath, item), "junction");
}
// Stage the sibling SDK on demand: when plugin-cli is published in a
// separate invocation the staging root no longer contains it, and the
// smoke test must still be able to resolve the runtime dependency.
const stagedSdkPath = path.join(stagingRoot, "plugin-sdk");
if (!existsSync(stagedSdkPath)) stagePackage("plugin-sdk");
const scopeDir = path.join(nodeModulesPath, scope);
mkdirSync(scopeDir, { recursive: true });
symlinkSync(stagedSdkPath, path.join(scopeDir, "plugin-sdk"), "junction");