chore: rename the plugin sdk to @termix-ssh/plugin-sdk

This commit is contained in:
LukeGus committed 2026-10-05 18:23:03 -05:00
1 parent 0c4f673318
commit e608505b39
132 files changed
+250 -1336

No files matched your search

+5 -5
View File
@@ -1,10 +1,10 @@
/**
* Builds the two pieces of the plugin SDK that come from core:
*
* dist/host/ui.js @termix/plugin-sdk/ui, the shell's UI kit
* dist/host/ui.js @termix-ssh/plugin-sdk/ui, the shell's UI kit
* dist/host/testing-host.js what renderWithApp() renders plugins into
*
* Inside Termix the page's import map points @termix/plugin-sdk/ui at the
* Inside Termix the page's import map points @termix-ssh/plugin-sdk/ui at the
* shell's own copy, so ui.js is never loaded there. It exists so a plugin in
* its own repo can typecheck and run its tests without a Termix checkout.
*
@@ -32,7 +32,7 @@ const EXTERNALS = [
"i18next",
"react-i18next",
"sonner",
"@termix/plugin-sdk/frontend",
"@termix-ssh/plugin-sdk/frontend",
"@testing-library/react",
];
@@ -78,7 +78,7 @@ await esbuild.build({
},
});
// Types for @termix/plugin-sdk/ui: the declarations tsc emits for sdk-ui.ts
// Types for @termix-ssh/plugin-sdk/ui: the declarations tsc emits for sdk-ui.ts
// and everything it reaches, with core's "@/" paths made relative.
const typesDir = path.join(outDir, "types");
const tsc = spawnSync(
@@ -93,7 +93,7 @@ const tsc = spawnSync(
{ cwd: root, stdio: "inherit" },
);
if (tsc.status !== 0) process.exit(tsc.status ?? 1);
// tsc follows @termix/plugin-sdk/frontend into the SDK's source; plugins get
// tsc follows @termix-ssh/plugin-sdk/frontend into the SDK's source; plugins get
// those types from the package itself.
fs.rmSync(path.join(typesDir, "packages"), { recursive: true, force: true });
+4 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/**
* @termix/plugin-sdk/ui is public API, implemented by
* @termix-ssh/plugin-sdk/ui is public API, implemented by
* src/ui/plugin-host/sdk-ui.ts. Adding to it is a contract change and
* removing from it is a breaking one, so neither should happen by accident.
*
@@ -354,7 +354,7 @@ function main() {
const before = new Set(saved.split("\n"));
const after = new Set(current.split("\n"));
console.error(
"@termix/plugin-sdk/ui changed shape. If that is deliberate, run: node scripts/check-sdk-ui-exports.cjs --update-snapshot",
"@termix-ssh/plugin-sdk/ui changed shape. If that is deliberate, run: node scripts/check-sdk-ui-exports.cjs --update-snapshot",
);
for (const line of saved.split("\n")) {
if (line && !after.has(line)) console.error(` - ${line.slice(0, 200)}`);
@@ -373,13 +373,13 @@ function main() {
if (added.length === 0 && removed.length === 0) return;
if (added.length > 0) {
console.error(
"@termix/plugin-sdk/ui exports names that are not on the allowlist in scripts/check-sdk-ui-exports.cjs:",
"@termix-ssh/plugin-sdk/ui exports names that are not on the allowlist in scripts/check-sdk-ui-exports.cjs:",
);
for (const name of added) console.error(` + ${name}`);
}
if (removed.length > 0) {
console.error(
"@termix/plugin-sdk/ui no longer exports these allowlisted names (a breaking change for plugins):",
"@termix-ssh/plugin-sdk/ui no longer exports these allowlisted names (a breaking change for plugins):",
);
for (const name of removed) console.error(` - ${name}`);
}
+2 -2
View File
@@ -32,8 +32,8 @@ export const SHARED_VENDOR_MODULES = SHARED_VENDORS.map(
/** SDK entries that are implemented by, or hold state shared with, core. */
export const SHARED_SDK_MODULES = [
"@termix/plugin-sdk/frontend",
"@termix/plugin-sdk/ui",
"@termix-ssh/plugin-sdk/frontend",
"@termix-ssh/plugin-sdk/ui",
];
export function sharedModules() {
+2 -2
View File
@@ -75,8 +75,8 @@ export function termixPluginHost({ repoRoot, sdkUiEntry, sdkFrontendEntry }) {
if (SHARED_VENDOR_MODULES.includes(specifier)) {
return vendorFacade(repoRoot, specifier);
}
if (specifier === "@termix/plugin-sdk/ui") return sourceFacade(sdkUiEntry);
if (specifier === "@termix/plugin-sdk/frontend") {
if (specifier === "@termix-ssh/plugin-sdk/ui") return sourceFacade(sdkUiEntry);
if (specifier === "@termix-ssh/plugin-sdk/frontend") {
return sourceFacade(sdkFrontendEntry);
}
throw new Error(`termix-plugin-host: ${specifier} is not a shared module`);