mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
chore: rename the plugin sdk to @termix-ssh/plugin-sdk
This commit is contained in:
1 parent
0c4f673318
commit
e608505b39
132 files changed
+250
-1336
No files matched your search
+1
-1
@@ -115,7 +115,7 @@ COPY --chown=node:node --from=backend-builder /app/dist/backend ./dist/backend
|
||||
# Plugins pinned in docker/bundled-plugins.json, resolved as dist/plugins by
|
||||
# getBundledPluginsDir().
|
||||
COPY --chown=node:node --from=backend-builder /app/dist/plugins ./dist/plugins
|
||||
# Target of node_modules/@termix/plugin-sdk, which core and the plugins import.
|
||||
# Target of node_modules/@termix-ssh/plugin-sdk, which core and the plugins import.
|
||||
COPY --chown=node:node --from=backend-builder /app/packages/plugin-sdk/package.json ./packages/plugin-sdk/package.json
|
||||
COPY --chown=node:node --from=backend-builder /app/packages/plugin-sdk/dist ./packages/plugin-sdk/dist
|
||||
# Pre-baked OPKSSH binary. The opkssh plugin uses it when its checksum
|
||||
|
||||
@@ -174,7 +174,7 @@ http {
|
||||
root /app/html;
|
||||
index index.html index.htm;
|
||||
expires off;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'wasm-unsafe-eval' 'sha256-gQLhWUEDVfLtBiv83VAckuSAVmhxOpOHbNpFbODgPN0='; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; connect-src 'self' http: https: ws: wss:; media-src 'self' data: blob: http: https:; worker-src 'self' blob:; frame-src http: https:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'wasm-unsafe-eval' 'sha256-0FPou4vGHwupDie6Xais6VntpJ4yaK9E6TyhXLwZe8o='; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; connect-src 'self' http: https: ws: wss:; media-src 'self' data: blob: http: https:; worker-src 'self' blob:; frame-src http: https:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ http {
|
||||
root /app/html;
|
||||
index index.html index.htm;
|
||||
expires off;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'wasm-unsafe-eval' 'sha256-gQLhWUEDVfLtBiv83VAckuSAVmhxOpOHbNpFbODgPN0='; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; connect-src 'self' http: https: ws: wss:; media-src 'self' data: blob: http: https:; worker-src 'self' blob:; frame-src http: https:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'wasm-unsafe-eval' 'sha256-0FPou4vGHwupDie6Xais6VntpJ4yaK9E6TyhXLwZe8o='; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; connect-src 'self' http: https: ws: wss:; media-src 'self' data: blob: http: https:; worker-src 'self' blob:; frame-src http: https:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
|
||||
Generated
+2
-1115
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -47,7 +47,7 @@
|
||||
"schema:generate": "node scripts/generate-dialect-schema.cjs",
|
||||
"schema:check": "node scripts/generate-dialect-schema.cjs --check",
|
||||
"schema:migrations": "drizzle-kit generate --config=drizzle.config.sqlite.ts && drizzle-kit generate --config=drizzle.config.pg.ts && drizzle-kit generate --config=drizzle.config.mysql.ts",
|
||||
"build:sdk": "npm run build --workspace @termix/plugin-sdk && node scripts/build-sdk-host.mjs",
|
||||
"build:sdk": "npm run build --workspace @termix-ssh/plugin-sdk && node scripts/build-sdk-host.mjs",
|
||||
"build:plugins": "node scripts/build-plugins.cjs"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
|
||||
## Overview
|
||||
|
||||
`@termix/plugin-sdk` is what every [Termix](https://github.com/Termix-SSH/Termix) plugin builds against, including the ones that ship with Termix. It has the types for a plugin's backend and frontend, table definitions, the manifest schema, test helpers, and the `termix-plugin` CLI. The easiest way to start is the [Termix Plugin Template](https://github.com/Termix-SSH/Termix-Plugin-Template).
|
||||
`@termix-ssh/plugin-sdk` is what every [Termix](https://github.com/Termix-SSH/Termix) plugin builds against, including the ones that ship with Termix. It has the types for a plugin's backend and frontend, table definitions, the manifest schema, test helpers, and the `termix-plugin` CLI. The easiest way to start is the [Termix Plugin Template](https://github.com/Termix-SSH/Termix-Plugin-Template).
|
||||
|
||||
<br />
|
||||
|
||||
## What's Inside
|
||||
|
||||
- **Backend:** the types for `activate(ctx)`, database and table helpers, host commands and SSH certificates
|
||||
- **Frontend:** the types for `activate(app)`, plus `@termix/plugin-sdk/ui`, the components and theme Termix serves to plugins
|
||||
- **Frontend:** the types for `activate(app)`, plus `@termix-ssh/plugin-sdk/ui`, the components and theme Termix serves to plugins
|
||||
- **Manifest:** the manifest schema, the capability catalog and settings types
|
||||
- **Testing:** `createMockCtx()`, `createTestDb()`, `renderWithApp()` and a Vitest preset
|
||||
- **CLI:** `termix-plugin`, which builds, tests, validates, packs and signs a plugin and writes its migrations
|
||||
@@ -29,7 +29,7 @@
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install --save-dev @termix/plugin-sdk
|
||||
npm install --save-dev @termix-ssh/plugin-sdk
|
||||
```
|
||||
|
||||
<br />
|
||||
|
||||
@@ -37,7 +37,7 @@ async function loadDefinitions(cwd) {
|
||||
|
||||
// Emitted inside the plugin rather than in the system temp dir: the SDK
|
||||
// stays external to the bundle, so the output has to sit somewhere node can
|
||||
// resolve @termix/plugin-sdk from.
|
||||
// resolve @termix-ssh/plugin-sdk from.
|
||||
const outdir = fs.mkdtempSync(path.join(cwd, ".termix-tables-"));
|
||||
const outfile = path.join(outdir, "tables.mjs");
|
||||
|
||||
|
||||
@@ -68,14 +68,14 @@ function validatePackage(cwd, raw) {
|
||||
}
|
||||
|
||||
const sdkRange =
|
||||
pkg.peerDependencies?.["@termix/plugin-sdk"] ??
|
||||
pkg.dependencies?.["@termix/plugin-sdk"] ??
|
||||
pkg.devDependencies?.["@termix/plugin-sdk"];
|
||||
pkg.peerDependencies?.["@termix-ssh/plugin-sdk"] ??
|
||||
pkg.dependencies?.["@termix-ssh/plugin-sdk"] ??
|
||||
pkg.devDependencies?.["@termix-ssh/plugin-sdk"];
|
||||
if (!sdkRange) {
|
||||
problems.push("package.json does not depend on @termix/plugin-sdk");
|
||||
problems.push("package.json does not depend on @termix-ssh/plugin-sdk");
|
||||
} else if (sdkRange === "*" || sdkRange === "latest") {
|
||||
problems.push(
|
||||
`@termix/plugin-sdk is "${sdkRange}"; pin a range such as "^1.0.0"`,
|
||||
`@termix-ssh/plugin-sdk is "${sdkRange}"; pin a range such as "^1.0.0"`,
|
||||
);
|
||||
}
|
||||
return problems;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
*/
|
||||
|
||||
export const BACKEND_EXTERNALS = [
|
||||
"@termix/plugin-sdk",
|
||||
"@termix/plugin-sdk/*",
|
||||
"@termix-ssh/plugin-sdk",
|
||||
"@termix-ssh/plugin-sdk/*",
|
||||
"express",
|
||||
"ssh2",
|
||||
"ws",
|
||||
@@ -41,6 +41,6 @@ export const FRONTEND_EXTERNALS = [
|
||||
"i18next",
|
||||
"react-i18next",
|
||||
"sonner",
|
||||
"@termix/plugin-sdk/frontend",
|
||||
"@termix/plugin-sdk/ui",
|
||||
"@termix-ssh/plugin-sdk/frontend",
|
||||
"@termix-ssh/plugin-sdk/ui",
|
||||
];
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@termix/plugin-sdk",
|
||||
"name": "@termix-ssh/plugin-sdk",
|
||||
"version": "1.0.0",
|
||||
"description": "The contract between Termix core and a plugin: types, the capability catalog and the manifest schema.",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -213,7 +213,7 @@ export interface ShellApi {
|
||||
/**
|
||||
* Asks a yes or no question over the main area, for code that runs outside
|
||||
* a panel or tab (a keybinding, a toolbar action). Inside one, prefer
|
||||
* useConfirm from @termix/plugin-sdk/ui, which asks over that surface.
|
||||
* useConfirm from @termix-ssh/plugin-sdk/ui, which asks over that surface.
|
||||
*/
|
||||
confirm?: (options: ConfirmRequest) => Promise<boolean>;
|
||||
}
|
||||
@@ -897,7 +897,7 @@ export interface TermixApp extends TermixAppInfo {
|
||||
invokeAction: (id: string, ...args: unknown[]) => Promise<unknown>;
|
||||
/**
|
||||
* Offers a component to other plugins and to core by id, rendered where
|
||||
* they choose with `PluginComponent` from @termix/plugin-sdk/ui or
|
||||
* they choose with `PluginComponent` from @termix-ssh/plugin-sdk/ui or
|
||||
* `usePluginComponent`. The id should start with a name the plugin owns
|
||||
* ("terminal.view"). The props are the owner's contract; document them.
|
||||
*/
|
||||
@@ -941,7 +941,7 @@ export interface TermixApp extends TermixAppInfo {
|
||||
tabs: TabsApi;
|
||||
/**
|
||||
* Asks a yes or no question over the main area. For code that runs outside
|
||||
* a panel or tab; inside one, useConfirm from @termix/plugin-sdk/ui asks
|
||||
* a panel or tab; inside one, useConfirm from @termix-ssh/plugin-sdk/ui asks
|
||||
* over that surface instead.
|
||||
*/
|
||||
confirm: (options: ConfirmRequest) => Promise<boolean>;
|
||||
@@ -1190,7 +1190,7 @@ let host: PluginHostBridge | null = null;
|
||||
export function __setPluginHost(bridge: PluginHostBridge | null): void {
|
||||
if (host && bridge !== host) {
|
||||
throw new Error(
|
||||
"@termix/plugin-sdk/frontend: the plugin host is already set",
|
||||
"@termix-ssh/plugin-sdk/frontend: the plugin host is already set",
|
||||
);
|
||||
}
|
||||
host = bridge;
|
||||
@@ -1209,7 +1209,7 @@ function requireHost(): PluginHostBridge {
|
||||
if (!host && fallback) return fallback;
|
||||
if (!host) {
|
||||
throw new Error(
|
||||
"@termix/plugin-sdk/frontend: no plugin host. Hooks only work inside Termix or renderWithApp().",
|
||||
"@termix-ssh/plugin-sdk/frontend: no plugin host. Hooks only work inside Termix or renderWithApp().",
|
||||
);
|
||||
}
|
||||
return host;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* real runtime does. createFakeContext stays for tests that only need a
|
||||
* context-shaped object and do not care about the gates.
|
||||
*
|
||||
* The vitest config these run under comes from @termix/plugin-sdk/vitest-preset.
|
||||
* The vitest config these run under comes from @termix-ssh/plugin-sdk/vitest-preset.
|
||||
*/
|
||||
|
||||
import {
|
||||
@@ -2080,7 +2080,7 @@ export async function createTestDb(
|
||||
* so a test sees exactly what the shell would: which rail items, tabs, host
|
||||
* actions and cards it registered, and each of those rendered with the SDK
|
||||
* hooks working. It is implemented by the Termix host, which is where the
|
||||
* registries live; the vitest preset points "@termix/plugin-host/testing" at
|
||||
* registries live; the vitest preset points "@termix-ssh/plugin-host/testing" at
|
||||
* core's implementation.
|
||||
*/
|
||||
export interface RenderWithAppOptions {
|
||||
@@ -2205,7 +2205,7 @@ interface PluginTestHost {
|
||||
) => Promise<RenderedPluginApp>;
|
||||
}
|
||||
|
||||
const TEST_HOST = "@termix/plugin-host/testing";
|
||||
const TEST_HOST = "@termix-ssh/plugin-host/testing";
|
||||
|
||||
export async function renderWithApp(
|
||||
plugin: FrontendPluginModule,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* A plugin's vitest.config.ts is one line:
|
||||
*
|
||||
* import { pluginVitestConfig } from "@termix/plugin-sdk/vitest-preset";
|
||||
* import { pluginVitestConfig } from "@termix-ssh/plugin-sdk/vitest-preset";
|
||||
* export default pluginVitestConfig(import.meta.url);
|
||||
*
|
||||
* Two projects: tests/backend runs in node, tests/frontend in jsdom.
|
||||
@@ -56,21 +56,21 @@ export function pluginVitestConfig(
|
||||
const alias: Record<string, string> = {
|
||||
...(repoRoot
|
||||
? {
|
||||
"@termix/plugin-sdk/frontend": path.join(
|
||||
"@termix-ssh/plugin-sdk/frontend": path.join(
|
||||
repoRoot,
|
||||
"packages",
|
||||
"plugin-sdk",
|
||||
"src",
|
||||
"frontend.ts",
|
||||
),
|
||||
"@termix/plugin-sdk/ui": path.join(
|
||||
"@termix-ssh/plugin-sdk/ui": path.join(
|
||||
repoRoot,
|
||||
"src",
|
||||
"ui",
|
||||
"plugin-host",
|
||||
"sdk-ui.ts",
|
||||
),
|
||||
"@termix/plugin-host/testing": path.join(
|
||||
"@termix-ssh/plugin-host/testing": path.join(
|
||||
repoRoot,
|
||||
"src",
|
||||
"ui",
|
||||
@@ -85,7 +85,7 @@ export function pluginVitestConfig(
|
||||
: {
|
||||
// Outside a Termix checkout: the UI kit resolves through the
|
||||
// package, and the test host is the copy the SDK ships.
|
||||
"@termix/plugin-host/testing": fileURLToPath(
|
||||
"@termix-ssh/plugin-host/testing": fileURLToPath(
|
||||
new URL("./host/testing-host.js", import.meta.url),
|
||||
),
|
||||
}),
|
||||
@@ -119,8 +119,8 @@ export function pluginVitestConfig(
|
||||
setupFiles: [setupFile],
|
||||
// Run the SDK through Vite rather than plain Node, so its import
|
||||
// of the test host sees the alias above and the plugin and the
|
||||
// host share one copy of @termix/plugin-sdk/frontend.
|
||||
server: { deps: { inline: [/@termix\/plugin-sdk/] } },
|
||||
// host share one copy of @termix-ssh/plugin-sdk/frontend.
|
||||
server: { deps: { inline: [/@termix-ssh\/plugin-sdk/] } },
|
||||
include: ["tests/frontend/**/*.test.{ts,tsx}"],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@ function copyPluginSdk(resourcesDir, sdkDir = path.join(repoRoot, "packages", "p
|
||||
resourcesDir,
|
||||
"app.asar.unpacked",
|
||||
"node_modules",
|
||||
"@termix",
|
||||
"@termix-ssh",
|
||||
"plugin-sdk",
|
||||
);
|
||||
const dist = path.join(sdkDir, "dist");
|
||||
|
||||
@@ -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 });
|
||||
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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`);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import type {
|
||||
PluginLoginMethod,
|
||||
PluginSecondFactor,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
|
||||
export type LoginMethod = PluginLoginMethod & { pluginId: string };
|
||||
export type SecondFactor = PluginSecondFactor & { pluginId: string };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PluginVerifiedIdentity } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginVerifiedIdentity } from "@termix-ssh/plugin-sdk/backend";
|
||||
|
||||
export { LoginMethodError } from "@termix/plugin-sdk/backend";
|
||||
export { LoginMethodError } from "@termix-ssh/plugin-sdk/backend";
|
||||
|
||||
/** The logout claims a login carried, stored as sessions.external_session_ref. */
|
||||
export interface ExternalSessionRef {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* on this path has to decrypt and the async work stays in one place.
|
||||
*/
|
||||
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { createCurrentPluginSettingsRepository } from "../repositories/factory.js";
|
||||
import type { PluginSettingsRecord } from "../repositories/plugin-settings-repository.js";
|
||||
import {
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import {
|
||||
coerceSettingValue,
|
||||
validateSettingValue,
|
||||
} from "@termix/plugin-sdk/settings";
|
||||
} from "@termix-ssh/plugin-sdk/settings";
|
||||
import { getPluginRuntime } from "../../plugins/index.js";
|
||||
import { consume } from "../../plugins/registry.js";
|
||||
import { sshLogger } from "../../utils/logger.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
CORE_KEYBINDING_ACTIONS,
|
||||
validateKeybindingActionParams,
|
||||
type PluginKeybindingActionContribution,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
export interface DeclaredKeybindingAction extends PluginKeybindingActionContribution {
|
||||
pluginId: string;
|
||||
|
||||
@@ -18,7 +18,7 @@ import express, { type Request, type Response } from "express";
|
||||
import { databaseLogger } from "../../utils/logger.js";
|
||||
import { getPluginRouter, isPluginInstalled } from "../../plugins/http.js";
|
||||
import { getRequestBasePath } from "../../utils/request-origin.js";
|
||||
import type { PluginLegacyRedirect } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginLegacyRedirect } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
import type {
|
||||
PluginManifest,
|
||||
PluginSettingsField,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ async function prepareKey(
|
||||
if (certPublicKey && certPublicKey.trim()) {
|
||||
try {
|
||||
const { applyCertificateAuth } =
|
||||
await import("@termix/plugin-sdk/ssh-certs");
|
||||
await import("@termix-ssh/plugin-sdk/ssh-certs");
|
||||
await applyCertificateAuth(
|
||||
config,
|
||||
env.client,
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import type {
|
||||
PluginManifest,
|
||||
PluginSettingsField,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
import { coerceSettingValue } from "@termix/plugin-sdk/settings";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { coerceSettingValue } from "@termix-ssh/plugin-sdk/settings";
|
||||
import {
|
||||
CORE_HOST_DEFAULTS,
|
||||
CORE_NAMESPACE,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* host's own.
|
||||
*/
|
||||
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
createCurrentHostDefaultsRepository,
|
||||
createCurrentPluginSettingsRepository,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* the owner's; this swaps it for the viewer's at read time.
|
||||
*/
|
||||
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { createCurrentHostDefaultsRepository } from "../../database/repositories/factory.js";
|
||||
import type { HostRow } from "../../database/repositories/host-defaults-repository.js";
|
||||
import {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {
|
||||
coerceSettingValue,
|
||||
validateSettingValue,
|
||||
} from "@termix/plugin-sdk/settings";
|
||||
} from "@termix-ssh/plugin-sdk/settings";
|
||||
import { createCurrentHostDefaultsRepository } from "../../database/repositories/factory.js";
|
||||
import type { HostDefaultsScope } from "../../database/repositories/host-defaults-repository.js";
|
||||
import { validateSettingsSave } from "../../plugins/settings.js";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* share and sync a protocol's login without the plugin's code running.
|
||||
*/
|
||||
|
||||
import type { PluginProtocolContribution } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginProtocolContribution } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { SSH_AUTH_PROTOCOL } from "../../../types/auth-protocols.js";
|
||||
|
||||
export interface DeclaredHostProtocol extends PluginProtocolContribution {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* terminal's, so they are core's and have a column of their own.
|
||||
*/
|
||||
|
||||
import type { HostSshOptions } from "@termix/plugin-sdk/backend";
|
||||
import type { HostSshOptions } from "@termix-ssh/plugin-sdk/backend";
|
||||
|
||||
export type { HostSshOptions };
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* reach nobody, same as a plugin's.
|
||||
*/
|
||||
|
||||
import type { PluginNotification } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginNotification } from "@termix-ssh/plugin-sdk/backend";
|
||||
import { activeNotifyHub } from "../plugins/notify-hub.js";
|
||||
import { resolveAudience } from "../plugins/ctx-notify.js";
|
||||
import { systemLogger } from "../utils/logger.js";
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
DEFAULT_FRONTEND_ENTRY,
|
||||
DEFAULT_LOCALES_DIR,
|
||||
type PluginManifest,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
import type { LoadedPlugin } from "./loader.js";
|
||||
|
||||
type AssetPlugin = Pick<LoadedPlugin, "id" | "dir" | "manifest"> &
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
import type {
|
||||
PluginCredentials,
|
||||
PluginSshKeyCredential,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import ssh2 from "ssh2";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { assertCapability, capabilityRefused } from "./permissions.js";
|
||||
import { getActor } from "./actor.js";
|
||||
import type { DisposableBag } from "./disposables.js";
|
||||
|
||||
@@ -20,9 +20,9 @@ import type {
|
||||
PluginShareableUser,
|
||||
PluginShareableRole,
|
||||
PluginHostJumpHost,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
import { PLUGIN_HOST_INPUT_KEYS } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import { PLUGIN_HOST_INPUT_KEYS } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { assertCapability, capabilityRefused } from "./permissions.js";
|
||||
import { hostSessionStatus } from "../hosts/host-session-status.js";
|
||||
import { getActor } from "./actor.js";
|
||||
|
||||
@@ -10,8 +10,8 @@ import type {
|
||||
PluginNotificationAudience,
|
||||
PluginNotify,
|
||||
PluginNotifyResult,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { assertCapability, capabilityRefused } from "./permissions.js";
|
||||
import { getActor } from "./actor.js";
|
||||
import { activeNotifyHub, registerNotifyHub } from "./notify-hub.js";
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* plugins:read. Ids and versions only, nothing operational.
|
||||
*/
|
||||
|
||||
import type { PluginPlugins } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginPlugins } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { assertCapability } from "./permissions.js";
|
||||
|
||||
export function createPluginPlugins(manifest: PluginManifest): PluginPlugins {
|
||||
|
||||
@@ -16,8 +16,8 @@ import type {
|
||||
PluginBinarySpec,
|
||||
PluginProcess,
|
||||
PluginProcessHandle,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { assertCapability } from "./permissions.js";
|
||||
import { getPluginDataDir } from "./paths.js";
|
||||
import type { DisposableBag } from "./disposables.js";
|
||||
|
||||
@@ -12,9 +12,9 @@ import type {
|
||||
PluginSsh,
|
||||
PluginSshConnectOptions,
|
||||
PluginSshHost,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import { PluginSshInteractionError } from "@termix/plugin-sdk/backend";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { PluginSshInteractionError } from "@termix-ssh/plugin-sdk/backend";
|
||||
import {
|
||||
assertCapability,
|
||||
capabilityRefused,
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* say that it renews it. Every call is audited.
|
||||
*/
|
||||
|
||||
import type { PluginSystem } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginSystem } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { assertCapability } from "./permissions.js";
|
||||
import type { DisposableBag } from "./disposables.js";
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ import {
|
||||
import { registerPluginWsRoute, registerPluginWsUpgrade } from "./ws.js";
|
||||
import { resolvePermission } from "./rbac.js";
|
||||
import * as pluginSettings from "./settings.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
type PluginContext,
|
||||
type PluginModule,
|
||||
type PluginOpenIsolatedWindowRequest,
|
||||
type PluginExternalClientRequest,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
import type { PluginTableDefinition } from "@termix/plugin-sdk/db";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginTableDefinition } from "@termix-ssh/plugin-sdk/db";
|
||||
import * as syncRegistry from "./sync-registry.js";
|
||||
import {
|
||||
needsExplicitPersist,
|
||||
|
||||
@@ -11,8 +11,8 @@ import { sql } from "drizzle-orm";
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import { resolveDatabaseDialect } from "../database/db/dialect.js";
|
||||
import type { DatabaseDialect } from "../database/db/dialect.js";
|
||||
import type { PluginTableDefinition } from "@termix/plugin-sdk/db";
|
||||
import { prefixedTableName, tablePrefix } from "@termix/plugin-sdk/db";
|
||||
import type { PluginTableDefinition } from "@termix-ssh/plugin-sdk/db";
|
||||
import { prefixedTableName, tablePrefix } from "@termix-ssh/plugin-sdk/db";
|
||||
import { buildTable } from "./table-builder.js";
|
||||
import {
|
||||
applyPluginMigrations,
|
||||
|
||||
@@ -24,8 +24,8 @@ import express, {
|
||||
import type {
|
||||
PluginMiddleware,
|
||||
PluginRouterOptions,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import { AuthManager } from "../utils/auth-manager.js";
|
||||
import { runAsActor } from "./actor.js";
|
||||
|
||||
@@ -20,7 +20,7 @@ import * as tar from "tar";
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import { isTermixCompatible, parseManifest } from "./manifest.js";
|
||||
import { getLocalVersion } from "../utils/app-version.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
getBundledPluginsDir,
|
||||
getPluginBackendEntry,
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
import { resolveRequirements } from "./service-registry.js";
|
||||
import { resolveSecretRequirements } from "./secret-registry.js";
|
||||
import { recordConflict } from "./conflicts.js";
|
||||
import { tablePrefix } from "@termix/plugin-sdk/db";
|
||||
import { tablePrefix } from "@termix-ssh/plugin-sdk/db";
|
||||
|
||||
export type PluginState =
|
||||
| "loaded"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Manifest validation, re-exported from the SDK.
|
||||
*
|
||||
* The contract lives in @termix/plugin-sdk/manifest so the server, the
|
||||
* The contract lives in @termix-ssh/plugin-sdk/manifest so the server, the
|
||||
* authoring script and plugin authors all read the same rules. This file used
|
||||
* to carry its own copy of the enums and validators, which meant three places
|
||||
* had to be edited together and quietly drifted when they were not.
|
||||
@@ -17,7 +17,7 @@ export {
|
||||
SYSTEM_ROLE_NAMES,
|
||||
RESERVED_PERMISSION_PREFIXES,
|
||||
qualifyPermission,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
export type {
|
||||
PluginManifest,
|
||||
@@ -36,10 +36,10 @@ export type {
|
||||
HostCapabilityContribution,
|
||||
ActionContributionKind,
|
||||
ParsedManifest,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
export type {
|
||||
Capability,
|
||||
CapabilityInfo,
|
||||
CapabilityRisk,
|
||||
} from "@termix/plugin-sdk/capabilities";
|
||||
} from "@termix-ssh/plugin-sdk/capabilities";
|
||||
@@ -18,12 +18,12 @@ import path from "node:path";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import type { DatabaseDialect } from "../database/db/dialect.js";
|
||||
import { LEGACY_TABLE_OWNERS } from "@termix/plugin-sdk/db";
|
||||
import { LEGACY_TABLE_OWNERS } from "@termix-ssh/plugin-sdk/db";
|
||||
import {
|
||||
collectOwnedIndexes,
|
||||
findUnownedTableWrites,
|
||||
splitStatements,
|
||||
} from "@termix/plugin-sdk/ddl";
|
||||
} from "@termix-ssh/plugin-sdk/ddl";
|
||||
|
||||
// The splitter is shared with createTestDb in the SDK, so tests apply a
|
||||
// migration exactly the way this runner does.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* alert reaches nobody.
|
||||
*/
|
||||
|
||||
import type { PluginNotifyHub } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginNotifyHub } from "@termix-ssh/plugin-sdk/backend";
|
||||
import { hasCapability } from "./permissions.js";
|
||||
|
||||
interface HubRegistration {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
|
||||
import {
|
||||
DEFAULT_BACKEND_ENTRY,
|
||||
type PluginManifest,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
/**
|
||||
* Where user-installed plugins live. Resolved per call rather than captured at
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { createCurrentPluginPermissionGrantRepository } from "../database/repositories/factory.js";
|
||||
import { PluginCapabilityError } from "@termix/plugin-sdk/backend";
|
||||
import { PluginCapabilityError } from "@termix-ssh/plugin-sdk/backend";
|
||||
import { getActor } from "./actor.js";
|
||||
|
||||
const cache = new Map<string, Set<string>>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* bag, so deactivate clears every one of them.
|
||||
*/
|
||||
|
||||
import type { PluginSchedule } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginSchedule } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { DisposableBag } from "./disposables.js";
|
||||
|
||||
type Log = (message: string, error: unknown) => void;
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
import type {
|
||||
PluginManifest,
|
||||
PluginSettingsField,
|
||||
} from "@termix/plugin-sdk/manifest";
|
||||
} from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
coerceSettingValue,
|
||||
isRedactedSecret,
|
||||
validateSettingValue,
|
||||
} from "@termix/plugin-sdk/settings";
|
||||
} from "@termix-ssh/plugin-sdk/settings";
|
||||
import {
|
||||
createCurrentHostRepository,
|
||||
createCurrentPluginSettingsRepository,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import type {
|
||||
SyncEntityRegistration,
|
||||
SyncRow,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
|
||||
/** Core-only extras a plugin registration cannot set. */
|
||||
export interface CoreSyncEntityOptions {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* core keeps one import site.
|
||||
*/
|
||||
|
||||
export { buildTable } from "@termix/plugin-sdk/table-builder";
|
||||
export { buildTable } from "@termix-ssh/plugin-sdk/table-builder";
|
||||
export {
|
||||
createTableSql,
|
||||
adoptTableSql,
|
||||
dropTableSql,
|
||||
addColumnSql,
|
||||
keyedColumns,
|
||||
} from "@termix/plugin-sdk/ddl";
|
||||
} from "@termix-ssh/plugin-sdk/ddl";
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
import { sql } from "drizzle-orm";
|
||||
import { columnName, createTableSql } from "@termix/plugin-sdk/ddl";
|
||||
import { prefixedTableName } from "@termix/plugin-sdk/db";
|
||||
import type { PluginTableDefinition } from "@termix/plugin-sdk/db";
|
||||
import { columnName, createTableSql } from "@termix-ssh/plugin-sdk/ddl";
|
||||
import { prefixedTableName } from "@termix-ssh/plugin-sdk/db";
|
||||
import type { PluginTableDefinition } from "@termix-ssh/plugin-sdk/db";
|
||||
import {
|
||||
runStatement,
|
||||
selectRows,
|
||||
|
||||
@@ -25,7 +25,7 @@ import { WebSocketServer, type WebSocket } from "ws";
|
||||
import type {
|
||||
PluginWebSocketHandler,
|
||||
PluginWebSocketOptions,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import { recordConflict } from "./conflicts.js";
|
||||
import { extractWebSocketToken } from "../utils/ws-auth.js";
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
import os from "os";
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import {
|
||||
getEntity,
|
||||
listEntities,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import semver from "semver";
|
||||
import type { PluginDesktopMode } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginDesktopMode } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { syncLogger } from "../../utils/logger.js";
|
||||
import { sendCoreAlert } from "../../notify/core-notify.js";
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@ import express, {
|
||||
type Response,
|
||||
} from "express";
|
||||
import { and, eq, isNotNull } from "drizzle-orm";
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { AuthenticatedRequest } from "../../../types/index.js";
|
||||
import { AuthManager } from "../../utils/auth-manager.js";
|
||||
import { syncLogger } from "../../utils/logger.js";
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
import { and, eq } from "drizzle-orm";
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
hosts,
|
||||
sshCredentials,
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
*/
|
||||
|
||||
import { and, eq } from "drizzle-orm";
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { hosts, sshCredentials, sshFolders } from "../database/db/schema.js";
|
||||
import {
|
||||
createCurrentHostDefaultsRepository,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* for the wire like the host's own and a credential named by its syncId.
|
||||
*/
|
||||
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import type { HostProtocolLogin } from "../database/repositories/host-protocol-auth-repository.js";
|
||||
import { createCurrentHostProtocolAuthRepository } from "../database/repositories/factory.js";
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
import type { Response } from "express";
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import { listEntities } from "../../plugins/sync-registry.js";
|
||||
import { syncLogger } from "../../utils/logger.js";
|
||||
import { registerCoreSyncEntities } from "../entities.js";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* holds up the rest of the batch.
|
||||
*/
|
||||
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import { getEntity } from "../../plugins/sync-registry.js";
|
||||
import { PermissionManager } from "../../utils/permission-manager.js";
|
||||
import { syncLogger } from "../../utils/logger.js";
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import crypto from "crypto";
|
||||
import { and, eq, getTableColumns, type SQL } from "drizzle-orm";
|
||||
import type { SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type { SyncRow } from "@termix-ssh/plugin-sdk/backend";
|
||||
import { createCurrentRepositoryContext } from "../database/repositories/factory.js";
|
||||
import { DataCrypto } from "../utils/data-crypto.js";
|
||||
import { SystemCrypto } from "../utils/system-crypto.js";
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
*/
|
||||
|
||||
import crypto from "crypto";
|
||||
import type { SyncEntityReference, SyncRow } from "@termix/plugin-sdk/backend";
|
||||
import type {
|
||||
SyncEntityReference,
|
||||
SyncRow,
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
import { FieldCrypto } from "../utils/field-crypto.js";
|
||||
import type { RegisteredSyncEntity } from "../plugins/sync-registry.js";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
interface Row {
|
||||
pluginId: string;
|
||||
|
||||
@@ -28,7 +28,7 @@ describe("afterPack plugin SDK copy", () => {
|
||||
fs.mkdirSync(path.join(sdk, "src"));
|
||||
fs.writeFileSync(
|
||||
path.join(sdk, "package.json"),
|
||||
'{"name":"@termix/plugin-sdk"}',
|
||||
'{"name":"@termix-ssh/plugin-sdk"}',
|
||||
);
|
||||
fs.writeFileSync(path.join(sdk, "dist", "settings.js"), "export {};");
|
||||
fs.writeFileSync(path.join(sdk, "src", "settings.ts"), "");
|
||||
@@ -41,7 +41,7 @@ describe("afterPack plugin SDK copy", () => {
|
||||
resources,
|
||||
"app.asar.unpacked",
|
||||
"node_modules",
|
||||
"@termix",
|
||||
"@termix-ssh",
|
||||
"plugin-sdk",
|
||||
),
|
||||
);
|
||||
|
||||
@@ -37,7 +37,7 @@ vi.mock("../../../hosts/host-key-verifier.js", () => ({
|
||||
createHostVerifier: mocks.createHostVerifier,
|
||||
},
|
||||
}));
|
||||
vi.mock("@termix/plugin-sdk/ssh-certs", () => ({
|
||||
vi.mock("@termix-ssh/plugin-sdk/ssh-certs", () => ({
|
||||
applyCertificateAuth: mocks.applyCertificateAuth,
|
||||
}));
|
||||
vi.mock("../../../hosts/terminal-auth-helpers.js", () => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("../../../database/repositories/factory.js", () => ({}));
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
buildCatalog,
|
||||
catalogNamespaces,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
const rows = vi.hoisted(() => ({
|
||||
owned: [] as Array<Record<string, unknown>>,
|
||||
|
||||
@@ -22,7 +22,7 @@ vi.mock("../../utils/audit-logger.js", () => ({
|
||||
|
||||
import { createPluginContext, createPluginHandle } from "../../plugins/ctx.js";
|
||||
import { runAsActor } from "../../plugins/actor.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function contextFor(pluginId: string) {
|
||||
const manifest = {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import {
|
||||
createAuthState,
|
||||
fakeAuthManager,
|
||||
@@ -53,7 +53,8 @@ vi.mock("../../utils/trusted-proxy-auth.js", () => ({
|
||||
isTrustedProxyAuthEnabled: () => h.trustedProxy,
|
||||
}));
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -170,10 +171,9 @@ function setup() {
|
||||
request.ip ?? "unknown",
|
||||
"4:bob",
|
||||
);
|
||||
throw new (await import("@termix/plugin-sdk/backend")).LoginMethodError(
|
||||
"Invalid username or password",
|
||||
401,
|
||||
);
|
||||
throw new (
|
||||
await import("@termix-ssh/plugin-sdk/backend")
|
||||
).LoginMethodError("Invalid username or password", 401);
|
||||
}
|
||||
return {
|
||||
kind: "external",
|
||||
|
||||
@@ -28,7 +28,7 @@ vi.mock("../../utils/audit-logger.js", () => ({
|
||||
|
||||
import { createPluginContext, createPluginHandle } from "../../plugins/ctx.js";
|
||||
import { invalidatePluginPermissionCache } from "../../plugins/permissions.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function manifestFor(pluginId: string, capabilities: string[]): PluginManifest {
|
||||
return {
|
||||
|
||||
@@ -119,7 +119,7 @@ import {
|
||||
requireSecretResolver,
|
||||
resetSecretResolverRegistryForTests,
|
||||
} from "../../hosts/connect/secret-resolver-registry.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import ssh2 from "ssh2";
|
||||
import { setHostProtocolSource } from "../../hosts/protocol-auth/registry.js";
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ import {
|
||||
resetSyncRegistry,
|
||||
listEntityTypes,
|
||||
} from "../../plugins/sync-registry.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function manifestFor(pluginId: string, capabilities: string[]): PluginManifest {
|
||||
return {
|
||||
|
||||
@@ -36,7 +36,7 @@ vi.mock("../../utils/electron-ipc-bridge.js", () => ({
|
||||
|
||||
import { createPluginContext, createPluginHandle } from "../../plugins/ctx.js";
|
||||
import { invalidatePluginPermissionCache } from "../../plugins/permissions.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function manifestFor(pluginId: string, capabilities: string[]): PluginManifest {
|
||||
return {
|
||||
|
||||
@@ -36,7 +36,8 @@ const h = vi.hoisted(() => ({
|
||||
}));
|
||||
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -204,7 +205,8 @@ vi.mock("../../hosts/delete-host.js", () => ({
|
||||
}));
|
||||
|
||||
const { createPluginHosts } = await import("../../plugins/ctx-hosts.js");
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
function manifest(capabilities: string[]) {
|
||||
return {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type {
|
||||
PluginNotification,
|
||||
PluginNotifyHub,
|
||||
} from "@termix/plugin-sdk/backend";
|
||||
} from "@termix-ssh/plugin-sdk/backend";
|
||||
|
||||
const grants = new Map<string, string[]>();
|
||||
const auditEntries: Array<Record<string, unknown>> = [];
|
||||
@@ -81,7 +81,7 @@ import { createPluginContext, createPluginHandle } from "../../plugins/ctx.js";
|
||||
import { invalidatePluginPermissionCache } from "../../plugins/permissions.js";
|
||||
import { runAsActor } from "../../plugins/actor.js";
|
||||
import { clearNotifyHub } from "../../plugins/notify-hub.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function contextFor(
|
||||
capabilities: string[],
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -40,7 +41,8 @@ vi.mock("../../plugins/index.js", () => ({
|
||||
}));
|
||||
|
||||
const { createPluginPlugins } = await import("../../plugins/ctx-plugins.js");
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
const manifest = (capabilities: string[]) =>
|
||||
({ id: "reader", capabilities }) as unknown as PluginManifest;
|
||||
|
||||
@@ -7,7 +7,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
const h = vi.hoisted(() => ({ granted: new Set<string>() }));
|
||||
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -23,7 +24,8 @@ vi.mock("../../plugins/permissions.js", async () => {
|
||||
|
||||
const { createPluginProcess } = await import("../../plugins/ctx-process.js");
|
||||
const { DisposableBag } = await import("../../plugins/disposables.js");
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
const DECLARED = ["process:spawn", "network:outbound"];
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ vi.mock("../../utils/audit-logger.js", () => ({
|
||||
import { createPluginContext, createPluginHandle } from "../../plugins/ctx.js";
|
||||
import { invalidatePluginPermissionCache } from "../../plugins/permissions.js";
|
||||
import { runAsActor } from "../../plugins/actor.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function contextFor(capabilities: string[]) {
|
||||
grants.set("demo", capabilities);
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
clearServiceRegistry,
|
||||
getRegistration,
|
||||
} from "../../plugins/service-registry.js";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
function contextFor(pluginId: string, names?: string[]) {
|
||||
const manifest = {
|
||||
|
||||
@@ -22,7 +22,8 @@ vi.mock("../../utils/logger.js", () => {
|
||||
return { pluginLogger: log, sshLogger: log, logger: log, authLogger: log };
|
||||
});
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -142,7 +143,8 @@ const { classifyKeyboardInteractive } =
|
||||
await import("../../hosts/connect/keyboard-interactive.js");
|
||||
const { getLoginMethod, getSecondFactor } =
|
||||
await import("../../auth/registry.js");
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
function manifest(capabilities: string[], auth: Record<string, string[]> = {}) {
|
||||
return {
|
||||
@@ -647,7 +649,7 @@ describe("ctx.auth", () => {
|
||||
it("refuses enrolment when core policy forbids second factors", async () => {
|
||||
h.granted = new Set(["auth:provide"]);
|
||||
h.factors = [];
|
||||
const { LoginMethodError } = await import("@termix/plugin-sdk/backend");
|
||||
const { LoginMethodError } = await import("@termix-ssh/plugin-sdk/backend");
|
||||
h.policyError = new LoginMethodError("password login is off", 409);
|
||||
const auth = createPluginAuth({
|
||||
manifest: manifest(["auth:provide"], { secondFactors: ["pin"] }),
|
||||
|
||||
@@ -18,7 +18,8 @@ vi.mock("../../utils/logger.js", () => {
|
||||
return { pluginLogger: log, sshLogger: log, logger: log, authLogger: log };
|
||||
});
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -110,7 +111,7 @@ const { DisposableBag } = await import("../../plugins/disposables.js");
|
||||
const { registerSshAuthProvider, resetSshAuthRegistryForTests } =
|
||||
await import("../../hosts/connect/auth-provider-registry.js");
|
||||
const { PluginCapabilityError, PluginSshInteractionError } =
|
||||
await import("@termix/plugin-sdk/backend");
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
const ALL = ["ssh:connect", "credentials:use", "credentials:read"];
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ const h = vi.hoisted(() => ({
|
||||
}));
|
||||
|
||||
vi.mock("../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
return {
|
||||
assertCapability: async (
|
||||
pluginId: string,
|
||||
@@ -56,7 +57,8 @@ vi.mock("../../tls/acme-challenges.js", () => ({
|
||||
|
||||
const { createPluginSystem } = await import("../../plugins/ctx-system.js");
|
||||
const { DisposableBag } = await import("../../plugins/disposables.js");
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
let audits: Array<{ action: string; success: boolean }>;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
isValidPackageName,
|
||||
buildSudoCommand,
|
||||
parseUpgradable,
|
||||
} from "@termix/plugin-sdk/host-commands";
|
||||
} from "@termix-ssh/plugin-sdk/host-commands";
|
||||
|
||||
describe("parsePlatformProbe", () => {
|
||||
it("prefers dnf over yum when both are present", () => {
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
text,
|
||||
timestamp,
|
||||
varchar,
|
||||
} from "@termix/plugin-sdk/db";
|
||||
} from "@termix-ssh/plugin-sdk/db";
|
||||
import { createTableSql, dropTableSql } from "../../plugins/table-builder.js";
|
||||
import {
|
||||
adoptLegacyTableSql,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import crypto from "node:crypto";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { TestSqliteDatabase } from "../database/repositories/test-support.js";
|
||||
import type { DatabaseContext } from "../../database/repositories/database-context.js";
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ import {
|
||||
id,
|
||||
refUser,
|
||||
text,
|
||||
} from "@termix/plugin-sdk/db";
|
||||
import { adoptTableSql } from "@termix/plugin-sdk/ddl";
|
||||
import { createMockCtx, createTestDb } from "@termix/plugin-sdk/testing";
|
||||
} from "@termix-ssh/plugin-sdk/db";
|
||||
import { adoptTableSql } from "@termix-ssh/plugin-sdk/ddl";
|
||||
import { createMockCtx, createTestDb } from "@termix-ssh/plugin-sdk/testing";
|
||||
|
||||
let root: string;
|
||||
let pluginDir: string;
|
||||
|
||||
@@ -37,7 +37,8 @@ function secretHost(id: number): Record<string, unknown> {
|
||||
}
|
||||
|
||||
vi.mock("../../../plugins/permissions.js", async () => {
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
const granted = (capability: string, declared: readonly string[]) =>
|
||||
declared.includes(capability) && h.granted.has(capability);
|
||||
return {
|
||||
|
||||
@@ -27,7 +27,8 @@ const { createPluginContext, createPluginHandle } =
|
||||
const { invalidatePluginPermissionCache } =
|
||||
await import("../../../plugins/permissions.js");
|
||||
const { runAsActor } = await import("../../../plugins/actor.js");
|
||||
const { PluginCapabilityError } = await import("@termix/plugin-sdk/backend");
|
||||
const { PluginCapabilityError } =
|
||||
await import("@termix-ssh/plugin-sdk/backend");
|
||||
|
||||
const PLUGIN_ID = "walker";
|
||||
const ACTOR = "user-walker";
|
||||
|
||||
@@ -13,7 +13,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
collectOwnedIndexes,
|
||||
findUnownedTableWrites,
|
||||
} from "@termix/plugin-sdk/ddl";
|
||||
} from "@termix-ssh/plugin-sdk/ddl";
|
||||
|
||||
const state = vi.hoisted(() => ({
|
||||
db: null as unknown,
|
||||
|
||||
@@ -11,7 +11,7 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { PluginLoader, prefixesOverlap } from "../../../plugins/loader.js";
|
||||
import { parseManifest } from "../../../plugins/manifest.js";
|
||||
import { RESERVED_PLUGIN_IDS } from "@termix/plugin-sdk/manifest";
|
||||
import { RESERVED_PLUGIN_IDS } from "@termix-ssh/plugin-sdk/manifest";
|
||||
import { createFixturePlugin } from "../fixture-plugin.js";
|
||||
|
||||
vi.mock("../../../database/repositories/factory.js", () => ({
|
||||
|
||||
@@ -11,7 +11,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import express from "express";
|
||||
import type { AddressInfo } from "node:net";
|
||||
import type { Server } from "node:http";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
const state = vi.hoisted(() => ({
|
||||
userId: "user-1",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
interface Row {
|
||||
pluginId: string;
|
||||
|
||||
@@ -15,8 +15,8 @@ import {
|
||||
prefixedTableName,
|
||||
tablePrefix,
|
||||
adoptLegacyTable,
|
||||
} from "@termix/plugin-sdk/db";
|
||||
import { splitStatements } from "@termix/plugin-sdk/ddl";
|
||||
} from "@termix-ssh/plugin-sdk/db";
|
||||
import { splitStatements } from "@termix-ssh/plugin-sdk/ddl";
|
||||
import {
|
||||
adoptTableSql,
|
||||
createTableSql,
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
refUser,
|
||||
text,
|
||||
varchar,
|
||||
} from "@termix/plugin-sdk/db";
|
||||
} from "@termix-ssh/plugin-sdk/db";
|
||||
|
||||
let sqlite: Database.Database;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { PluginManifest } from "@termix/plugin-sdk/manifest";
|
||||
import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest";
|
||||
|
||||
const h = vi.hoisted(() => ({
|
||||
stored: new Map<string, unknown>(),
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
export type * from "@termix/plugin-sdk/desktop";
|
||||
export type * from "@termix-ssh/plugin-sdk/desktop";
|
||||
+2
-2
@@ -2,7 +2,7 @@ import type {
|
||||
HostProtocolAuthSummary,
|
||||
HostProtocolAuthType,
|
||||
HostSshOptions,
|
||||
} from "@termix/plugin-sdk/frontend";
|
||||
} from "@termix-ssh/plugin-sdk/frontend";
|
||||
import type { Request } from "express";
|
||||
import type { RefObject } from "react";
|
||||
import type { HostAuthOverrides } from "./auth-protocols.js";
|
||||
@@ -280,7 +280,7 @@ export interface CredentialBackend {
|
||||
*/
|
||||
export type HostTerminalConfig = Record<string, unknown>;
|
||||
|
||||
export type { HostSshOptions } from "@termix/plugin-sdk/frontend";
|
||||
export type { HostSshOptions } from "@termix-ssh/plugin-sdk/frontend";
|
||||
|
||||
// ============================================================================
|
||||
// TAB TYPES
|
||||
|
||||
Loaded 100 of 132 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user