diff --git a/docker/Dockerfile b/docker/Dockerfile index 90433e060..157708a49 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 diff --git a/docker/nginx-https.conf b/docker/nginx-https.conf index 391ac0766..2cda0abff 100644 --- a/docker/nginx-https.conf +++ b/docker/nginx-https.conf @@ -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; diff --git a/docker/nginx.conf b/docker/nginx.conf index 57c2bf752..d9cfda5a3 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -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; diff --git a/package-lock.json b/package-lock.json index 7140753f8..8be03ed14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5965,7 +5965,7 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/@termix/plugin-sdk": { + "node_modules/@termix-ssh/plugin-sdk": { "resolved": "packages/plugin-sdk", "link": true }, @@ -15075,7 +15075,7 @@ } }, "packages/plugin-sdk": { - "name": "@termix/plugin-sdk", + "name": "@termix-ssh/plugin-sdk", "version": "1.0.0", "license": "Apache-2.0", "dependencies": { @@ -15124,1119 +15124,6 @@ "optional": true } } - }, - "plugins/acme-ssl": { - "name": "@termix-plugin/acme-ssl", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "acme-client": "^5.4.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/ai": { - "name": "@termix-plugin/ai", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@anthropic-ai/sdk": "^0.120.0", - "lucide-react": "^1.33.0", - "react-markdown": "^10.1.0", - "remark-gfm": "^4.0.1" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/alerts": { - "name": "@termix-plugin/alerts", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0", - "nodemailer": "^10.0.10" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/automations": { - "name": "@termix-plugin/automations", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/docker": { - "name": "@termix-plugin/docker", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@xterm/addon-clipboard": "^0.2.0", - "@xterm/addon-fit": "^0.11.0", - "@xterm/addon-web-links": "^0.12.0", - "@xterm/xterm": "^6.0.0", - "lucide-react": "^1.33.0", - "react-xtermjs": "^1.0.10" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0", - "ws": "^8.21.3" - } - }, - "plugins/file-manager": { - "name": "@termix-plugin/file-manager", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@codemirror/autocomplete": "^6.20.3", - "@codemirror/commands": "^6.11.1", - "@codemirror/search": "^6.7.2", - "@codemirror/theme-one-dark": "^6.1.3", - "@codemirror/view": "^6.43.12", - "@monaco-editor/react": "^4.7.0", - "@tanstack/react-virtual": "^3.14.13", - "@uiw/codemirror-extensions-langs": "^4.25.11", - "@uiw/react-codemirror": "^4.25.11", - "busboy": "^1.6.0", - "jszip": "^3.10.2", - "lucide-react": "^1.33.0", - "motion": "^13.1.1", - "pdfjs-dist": "5.4.296", - "react-h5-audio-player": "^3.10.2", - "react-icons": "^5.7.0", - "react-markdown": "^10.1.0", - "react-pdf": "^10.5.0", - "react-photo-view": "^1.2.7", - "react-syntax-highlighter": "^16.1.1", - "remark-gfm": "^4.0.1" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/jest-dom": "^7.0.1", - "@testing-library/react": "^16.3.3", - "@testing-library/user-event": "^14.6.7", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "axios": "^1.19.0", - "cookie-parser": "^1.4.7", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "i18next": "^26.4.2", - "react": "^19.2.8", - "react-dom": "^19.2.8", - "react-i18next": "^17.0.14", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/fleets": { - "name": "@termix-plugin/fleets", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "clsx": "^2.1.1", - "jszip": "^3.10.2", - "lucide-react": "^1.33.0", - "tailwind-merge": "^3.5.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "multer": "^2.3.0", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/homepage": { - "name": "@termix-plugin/homepage", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8" - } - }, - "plugins/host-metrics": { - "name": "@termix-plugin/host-metrics", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/jest-dom": "^7.0.1", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/ldap": { - "name": "@termix-plugin/ldap", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "ldapjs": "^3.0.7", - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/network-topology": { - "name": "@termix-plugin/network-topology", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "cytoscape": "^3.34.3", - "lucide-react": "^1.33.0", - "react-cytoscapejs": "^2.0.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8" - } - }, - "plugins/opkssh": { - "name": "@termix-plugin/opkssh", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "js-yaml": "^5.2.3", - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "axios": "^1.19.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/proxmox": { - "name": "@termix-plugin/proxmox", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/remote-desktop": { - "name": "@termix-plugin/remote-desktop", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "guacamole-common-js": "^1.5.0", - "guacamole-lite": "^1.2.0", - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "express": "^5.2.1", - "react": "^19.2.8", - "react-i18next": "^17.0.14", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/secret-sources": { - "name": "@termix-plugin/secret-sources", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/serial": { - "name": "@termix-plugin/serial", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@xterm/addon-fit": "^0.11.0", - "@xterm/xterm": "^6.0.0", - "lucide-react": "^1.33.0", - "react-xtermjs": "^1.0.10", - "serialport": "^13.0.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "react": "^19.2.8", - "ws": "^8.21.3" - } - }, - "plugins/session-recording": { - "name": "@termix-plugin/session-recording", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@xterm/addon-fit": "^0.11.0", - "@xterm/xterm": "^6.0.0", - "guacamole-common-js": "^1.5.0", - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8" - } - }, - "plugins/session-sharing": { - "name": "@termix-plugin/session-sharing", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@xterm/addon-fit": "^0.11.0", - "@xterm/xterm": "^6.0.0", - "lucide-react": "^1.33.0", - "react-xtermjs": "^1.0.10", - "redis": "^6.2.1" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ws": "^8.21.3" - } - }, - "plugins/snippets": { - "name": "@termix-plugin/snippets", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/ssh-terminal": { - "name": "@termix-plugin/ssh-terminal", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@xterm/addon-clipboard": "^0.2.0", - "@xterm/addon-fit": "^0.11.0", - "@xterm/addon-search": "^0.16.0", - "@xterm/addon-unicode11": "^0.9.0", - "@xterm/addon-web-links": "^0.12.0", - "@xterm/xterm": "^6.0.0", - "lucide-react": "^1.33.0", - "react-xtermjs": "^1.0.10" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/jest-dom": "^7.0.1", - "@testing-library/react": "^16.3.3", - "@testing-library/user-event": "^14.6.7", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "multer": "^2.3.0", - "react": "^19.2.8", - "react-dom": "^19.2.8", - "sharp": "^0.35.4", - "sonner": "^2.0.8", - "ssh2": "^1.17.0", - "ws": "^8.21.3" - } - }, - "plugins/sso": { - "name": "@termix-plugin/sso", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "jose": "^6.2.12", - "lucide-react": "^1.33.0", - "undici": "^8.10.2" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/step-ca": { - "name": "@termix-plugin/step-ca", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0", - "redis": "^6.2.1" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/tailscale": { - "name": "@termix-plugin/tailscale", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@testing-library/user-event": "^14.6.7", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/telemetry": { - "name": "@termix-plugin/telemetry", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "drizzle-orm": "^0.45.2" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/termix-identity": { - "name": "@termix-plugin/termix-identity", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/tmux-monitor": { - "name": "@termix-plugin/tmux-monitor", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "ssh2": "^1.17.0" - } - }, - "plugins/totp": { - "name": "@termix-plugin/totp", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0", - "qrcode": "^1.5.4", - "speakeasy": "^2.0.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/tunnels": { - "name": "@termix-plugin/tunnels", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0", - "ws": "^8.21.3" - } - }, - "plugins/vault": { - "name": "@termix-plugin/vault", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8", - "ssh2": "^1.17.0" - } - }, - "plugins/wake-on-lan": { - "name": "@termix-plugin/wake-on-lan", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "express": "^5.2.1", - "sonner": "^2.0.8" - } - }, - "plugins/warpgate": { - "name": "@termix-plugin/warpgate", - "version": "1.0.0", - "extraneous": true, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0" - } - }, - "plugins/web-endpoint": { - "name": "@termix-plugin/web-endpoint", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/jest-dom": "^7.0.1", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "axios": "^1.19.0", - "express": "^5.2.1", - "i18next": "^26.4.2", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/webauthn": { - "name": "@termix-plugin/webauthn", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "@simplewebauthn/browser": "^13.3.0", - "@simplewebauthn/server": "^13.3.2", - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } - }, - "plugins/workspaces": { - "name": "@termix-plugin/workspaces", - "version": "1.0.0", - "extraneous": true, - "dependencies": { - "lucide-react": "^1.33.0" - }, - "devDependencies": { - "@commitlint/cli": "^21.2.2", - "@commitlint/config-conventional": "^21.2.0", - "@termix/plugin-sdk": "^1.0.0", - "@testing-library/dom": "^10.4.2", - "@testing-library/react": "^16.3.3", - "@types/node": "^26.2.0", - "@types/react": "^19.2.18", - "@types/react-dom": "^19.2.4", - "better-sqlite3": "^13.0.3", - "husky": "^9.1.7", - "jsdom": "^30.0.1", - "lint-staged": "^17.2.0", - "prettier": "3.9.9", - "vitest": "^4.1.11" - }, - "peerDependencies": { - "@termix/plugin-sdk": "^1.0.0", - "drizzle-orm": "^0.45.2", - "express": "^5.2.1", - "react": "^19.2.8", - "sonner": "^2.0.8" - } } } } diff --git a/package.json b/package.json index 89515051e..e735ae084 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/packages/plugin-sdk/README.md b/packages/plugin-sdk/README.md index 51076531e..4e61ccd1c 100644 --- a/packages/plugin-sdk/README.md +++ b/packages/plugin-sdk/README.md @@ -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).
## 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 ```
diff --git a/packages/plugin-sdk/cli/commands/migrations.mjs b/packages/plugin-sdk/cli/commands/migrations.mjs index 05f7c9b6f..7114e5af3 100644 --- a/packages/plugin-sdk/cli/commands/migrations.mjs +++ b/packages/plugin-sdk/cli/commands/migrations.mjs @@ -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"); diff --git a/packages/plugin-sdk/cli/commands/validate.mjs b/packages/plugin-sdk/cli/commands/validate.mjs index 64ce5f2ec..028bd0daf 100644 --- a/packages/plugin-sdk/cli/commands/validate.mjs +++ b/packages/plugin-sdk/cli/commands/validate.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; diff --git a/packages/plugin-sdk/cli/lib/externals.mjs b/packages/plugin-sdk/cli/lib/externals.mjs index a9a0e8231..894acfdd7 100644 --- a/packages/plugin-sdk/cli/lib/externals.mjs +++ b/packages/plugin-sdk/cli/lib/externals.mjs @@ -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", ]; diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index 0414552a9..e2c40153c 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -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", diff --git a/packages/plugin-sdk/src/frontend.ts b/packages/plugin-sdk/src/frontend.ts index 721d60123..0afbe4f17 100644 --- a/packages/plugin-sdk/src/frontend.ts +++ b/packages/plugin-sdk/src/frontend.ts @@ -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; } @@ -897,7 +897,7 @@ export interface TermixApp extends TermixAppInfo { invokeAction: (id: string, ...args: unknown[]) => Promise; /** * 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; @@ -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; diff --git a/packages/plugin-sdk/src/testing.ts b/packages/plugin-sdk/src/testing.ts index 3f5daf2d4..e518af2ea 100644 --- a/packages/plugin-sdk/src/testing.ts +++ b/packages/plugin-sdk/src/testing.ts @@ -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; } -const TEST_HOST = "@termix/plugin-host/testing"; +const TEST_HOST = "@termix-ssh/plugin-host/testing"; export async function renderWithApp( plugin: FrontendPluginModule, diff --git a/packages/plugin-sdk/src/vitest-preset.ts b/packages/plugin-sdk/src/vitest-preset.ts index c3361958d..b9e8d48e8 100644 --- a/packages/plugin-sdk/src/vitest-preset.ts +++ b/packages/plugin-sdk/src/vitest-preset.ts @@ -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 = { ...(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}"], }, }, diff --git a/packaging/build/after-pack.cjs b/packaging/build/after-pack.cjs index 869b04c35..c60505444 100644 --- a/packaging/build/after-pack.cjs +++ b/packaging/build/after-pack.cjs @@ -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"); diff --git a/scripts/build-sdk-host.mjs b/scripts/build-sdk-host.mjs index a1e4a752b..71d455459 100644 --- a/scripts/build-sdk-host.mjs +++ b/scripts/build-sdk-host.mjs @@ -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 }); diff --git a/scripts/check-sdk-ui-exports.cjs b/scripts/check-sdk-ui-exports.cjs index ca20bec7a..21ee67f3b 100644 --- a/scripts/check-sdk-ui-exports.cjs +++ b/scripts/check-sdk-ui-exports.cjs @@ -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}`); } diff --git a/scripts/lib/plugin-import-map.mjs b/scripts/lib/plugin-import-map.mjs index cc96be82c..129864ffa 100644 --- a/scripts/lib/plugin-import-map.mjs +++ b/scripts/lib/plugin-import-map.mjs @@ -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() { diff --git a/scripts/vite-plugin-termix-plugins.mjs b/scripts/vite-plugin-termix-plugins.mjs index b5bedae4d..2dd7ad634 100644 --- a/scripts/vite-plugin-termix-plugins.mjs +++ b/scripts/vite-plugin-termix-plugins.mjs @@ -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`); diff --git a/src/backend/auth/registry.ts b/src/backend/auth/registry.ts index 984dc4b4b..916f5af62 100644 --- a/src/backend/auth/registry.ts +++ b/src/backend/auth/registry.ts @@ -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 }; diff --git a/src/backend/auth/types.ts b/src/backend/auth/types.ts index 8f803795a..938c6d8f9 100644 --- a/src/backend/auth/types.ts +++ b/src/backend/auth/types.ts @@ -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 { diff --git a/src/backend/database/routes/host-plugin-settings.ts b/src/backend/database/routes/host-plugin-settings.ts index 2f0ce34ae..4e5e2008b 100644 --- a/src/backend/database/routes/host-plugin-settings.ts +++ b/src/backend/database/routes/host-plugin-settings.ts @@ -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"; diff --git a/src/backend/database/routes/keybinding-validation.ts b/src/backend/database/routes/keybinding-validation.ts index f616e706d..a6e21901c 100644 --- a/src/backend/database/routes/keybinding-validation.ts +++ b/src/backend/database/routes/keybinding-validation.ts @@ -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; diff --git a/src/backend/database/routes/plugin-api-routes.ts b/src/backend/database/routes/plugin-api-routes.ts index 76be9f37d..93ebedcae 100644 --- a/src/backend/database/routes/plugin-api-routes.ts +++ b/src/backend/database/routes/plugin-api-routes.ts @@ -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(); diff --git a/src/backend/database/routes/plugins.ts b/src/backend/database/routes/plugins.ts index 25cc60534..cfa19f433 100644 --- a/src/backend/database/routes/plugins.ts +++ b/src/backend/database/routes/plugins.ts @@ -32,7 +32,7 @@ import { import type { PluginManifest, PluginSettingsField, -} from "@termix/plugin-sdk/manifest"; +} from "@termix-ssh/plugin-sdk/manifest"; const router = express.Router(); diff --git a/src/backend/hosts/connect/builtin-providers.ts b/src/backend/hosts/connect/builtin-providers.ts index aa54dd585..7bd87f82c 100644 --- a/src/backend/hosts/connect/builtin-providers.ts +++ b/src/backend/hosts/connect/builtin-providers.ts @@ -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, diff --git a/src/backend/hosts/defaults/catalog.ts b/src/backend/hosts/defaults/catalog.ts index b8d019546..9e66b74c5 100644 --- a/src/backend/hosts/defaults/catalog.ts +++ b/src/backend/hosts/defaults/catalog.ts @@ -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, diff --git a/src/backend/hosts/defaults/materialize.ts b/src/backend/hosts/defaults/materialize.ts index e0edf7280..954b0cc4a 100644 --- a/src/backend/hosts/defaults/materialize.ts +++ b/src/backend/hosts/defaults/materialize.ts @@ -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, diff --git a/src/backend/hosts/defaults/personal.ts b/src/backend/hosts/defaults/personal.ts index 96f64805f..852e182d8 100644 --- a/src/backend/hosts/defaults/personal.ts +++ b/src/backend/hosts/defaults/personal.ts @@ -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 { diff --git a/src/backend/hosts/defaults/service.ts b/src/backend/hosts/defaults/service.ts index 8cb070651..97d2970d7 100644 --- a/src/backend/hosts/defaults/service.ts +++ b/src/backend/hosts/defaults/service.ts @@ -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"; diff --git a/src/backend/hosts/protocol-auth/registry.ts b/src/backend/hosts/protocol-auth/registry.ts index 0855aa81f..0275c3987 100644 --- a/src/backend/hosts/protocol-auth/registry.ts +++ b/src/backend/hosts/protocol-auth/registry.ts @@ -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 { diff --git a/src/backend/hosts/ssh-options.ts b/src/backend/hosts/ssh-options.ts index 241fd2634..5b0c4dc5c 100644 --- a/src/backend/hosts/ssh-options.ts +++ b/src/backend/hosts/ssh-options.ts @@ -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 }; diff --git a/src/backend/notify/core-notify.ts b/src/backend/notify/core-notify.ts index 1f3b8c5b5..1c78003dc 100644 --- a/src/backend/notify/core-notify.ts +++ b/src/backend/notify/core-notify.ts @@ -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"; diff --git a/src/backend/plugins/assets.ts b/src/backend/plugins/assets.ts index 873724593..94e1b9910 100644 --- a/src/backend/plugins/assets.ts +++ b/src/backend/plugins/assets.ts @@ -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 & diff --git a/src/backend/plugins/ctx-credentials.ts b/src/backend/plugins/ctx-credentials.ts index 5074a4fb8..8b3519151 100644 --- a/src/backend/plugins/ctx-credentials.ts +++ b/src/backend/plugins/ctx-credentials.ts @@ -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"; diff --git a/src/backend/plugins/ctx-hosts.ts b/src/backend/plugins/ctx-hosts.ts index 421ef84eb..d4ea27262 100644 --- a/src/backend/plugins/ctx-hosts.ts +++ b/src/backend/plugins/ctx-hosts.ts @@ -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"; diff --git a/src/backend/plugins/ctx-notify.ts b/src/backend/plugins/ctx-notify.ts index fbe4aebe6..a7c510ba4 100644 --- a/src/backend/plugins/ctx-notify.ts +++ b/src/backend/plugins/ctx-notify.ts @@ -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"; diff --git a/src/backend/plugins/ctx-plugins.ts b/src/backend/plugins/ctx-plugins.ts index d1499c889..7edba02db 100644 --- a/src/backend/plugins/ctx-plugins.ts +++ b/src/backend/plugins/ctx-plugins.ts @@ -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 { diff --git a/src/backend/plugins/ctx-process.ts b/src/backend/plugins/ctx-process.ts index 34b71d5c6..c72e015c1 100644 --- a/src/backend/plugins/ctx-process.ts +++ b/src/backend/plugins/ctx-process.ts @@ -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"; diff --git a/src/backend/plugins/ctx-ssh-auth.ts b/src/backend/plugins/ctx-ssh-auth.ts index 37228419c..bc67adc59 100644 --- a/src/backend/plugins/ctx-ssh-auth.ts +++ b/src/backend/plugins/ctx-ssh-auth.ts @@ -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, diff --git a/src/backend/plugins/ctx-system.ts b/src/backend/plugins/ctx-system.ts index b0360392d..288e171e7 100644 --- a/src/backend/plugins/ctx-system.ts +++ b/src/backend/plugins/ctx-system.ts @@ -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"; diff --git a/src/backend/plugins/ctx.ts b/src/backend/plugins/ctx.ts index ad197877c..ed55cfdab 100644 --- a/src/backend/plugins/ctx.ts +++ b/src/backend/plugins/ctx.ts @@ -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, diff --git a/src/backend/plugins/data.ts b/src/backend/plugins/data.ts index b8f101bb7..dc1fc8e66 100644 --- a/src/backend/plugins/data.ts +++ b/src/backend/plugins/data.ts @@ -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, diff --git a/src/backend/plugins/http.ts b/src/backend/plugins/http.ts index daafc078c..b7a2196aa 100644 --- a/src/backend/plugins/http.ts +++ b/src/backend/plugins/http.ts @@ -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"; diff --git a/src/backend/plugins/loader.ts b/src/backend/plugins/loader.ts index e8d668711..97c5d81bb 100644 --- a/src/backend/plugins/loader.ts +++ b/src/backend/plugins/loader.ts @@ -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" diff --git a/src/backend/plugins/manifest.ts b/src/backend/plugins/manifest.ts index 7b099e694..f9e293355 100644 --- a/src/backend/plugins/manifest.ts +++ b/src/backend/plugins/manifest.ts @@ -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"; diff --git a/src/backend/plugins/migrations.ts b/src/backend/plugins/migrations.ts index 120035662..984714508 100644 --- a/src/backend/plugins/migrations.ts +++ b/src/backend/plugins/migrations.ts @@ -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. diff --git a/src/backend/plugins/notify-hub.ts b/src/backend/plugins/notify-hub.ts index db3888659..e67ee3d7e 100644 --- a/src/backend/plugins/notify-hub.ts +++ b/src/backend/plugins/notify-hub.ts @@ -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 { diff --git a/src/backend/plugins/paths.ts b/src/backend/plugins/paths.ts index 5b63a2bdf..eb89b51ca 100644 --- a/src/backend/plugins/paths.ts +++ b/src/backend/plugins/paths.ts @@ -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 diff --git a/src/backend/plugins/permissions.ts b/src/backend/plugins/permissions.ts index e41a72679..f0bb8b420 100644 --- a/src/backend/plugins/permissions.ts +++ b/src/backend/plugins/permissions.ts @@ -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>(); diff --git a/src/backend/plugins/schedule.ts b/src/backend/plugins/schedule.ts index 9f9a8d4b2..f7aa90f12 100644 --- a/src/backend/plugins/schedule.ts +++ b/src/backend/plugins/schedule.ts @@ -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; diff --git a/src/backend/plugins/settings.ts b/src/backend/plugins/settings.ts index 650d2be34..f55c523e3 100644 --- a/src/backend/plugins/settings.ts +++ b/src/backend/plugins/settings.ts @@ -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, diff --git a/src/backend/plugins/sync-registry.ts b/src/backend/plugins/sync-registry.ts index 247d430b9..778bcd908 100644 --- a/src/backend/plugins/sync-registry.ts +++ b/src/backend/plugins/sync-registry.ts @@ -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 { diff --git a/src/backend/plugins/table-builder.ts b/src/backend/plugins/table-builder.ts index e4d4d5605..b39b32e97 100644 --- a/src/backend/plugins/table-builder.ts +++ b/src/backend/plugins/table-builder.ts @@ -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"; diff --git a/src/backend/plugins/user-data.ts b/src/backend/plugins/user-data.ts index d6a333758..3c6e9e436 100644 --- a/src/backend/plugins/user-data.ts +++ b/src/backend/plugins/user-data.ts @@ -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, diff --git a/src/backend/plugins/ws.ts b/src/backend/plugins/ws.ts index d431421d1..5ca9bc768 100644 --- a/src/backend/plugins/ws.ts +++ b/src/backend/plugins/ws.ts @@ -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"; diff --git a/src/backend/sync/client/engine.ts b/src/backend/sync/client/engine.ts index 8d55d6aa5..f4152ebf3 100644 --- a/src/backend/sync/client/engine.ts +++ b/src/backend/sync/client/engine.ts @@ -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, diff --git a/src/backend/sync/client/plugins.ts b/src/backend/sync/client/plugins.ts index 8a77cc6b9..33eaab5d6 100644 --- a/src/backend/sync/client/plugins.ts +++ b/src/backend/sync/client/plugins.ts @@ -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 { diff --git a/src/backend/sync/client/routes.ts b/src/backend/sync/client/routes.ts index 65f8ed438..e6d53ae58 100644 --- a/src/backend/sync/client/routes.ts +++ b/src/backend/sync/client/routes.ts @@ -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"; diff --git a/src/backend/sync/entities.ts b/src/backend/sync/entities.ts index 716754530..4d969ed01 100644 --- a/src/backend/sync/entities.ts +++ b/src/backend/sync/entities.ts @@ -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, diff --git a/src/backend/sync/host-defaults.ts b/src/backend/sync/host-defaults.ts index c36a8eda1..9a306e37d 100644 --- a/src/backend/sync/host-defaults.ts +++ b/src/backend/sync/host-defaults.ts @@ -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, diff --git a/src/backend/sync/host-protocol-auth.ts b/src/backend/sync/host-protocol-auth.ts index ea195269f..769d7dec0 100644 --- a/src/backend/sync/host-protocol-auth.ts +++ b/src/backend/sync/host-protocol-auth.ts @@ -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 { diff --git a/src/backend/sync/server/feed.ts b/src/backend/sync/server/feed.ts index 5f7de00da..3d3877726 100644 --- a/src/backend/sync/server/feed.ts +++ b/src/backend/sync/server/feed.ts @@ -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"; diff --git a/src/backend/sync/server/push.ts b/src/backend/sync/server/push.ts index e32717393..6cf4b41ee 100644 --- a/src/backend/sync/server/push.ts +++ b/src/backend/sync/server/push.ts @@ -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"; diff --git a/src/backend/sync/store.ts b/src/backend/sync/store.ts index 793b6c821..1a82773ae 100644 --- a/src/backend/sync/store.ts +++ b/src/backend/sync/store.ts @@ -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"; diff --git a/src/backend/sync/wire.ts b/src/backend/sync/wire.ts index 8356bebb8..8009528c6 100644 --- a/src/backend/sync/wire.ts +++ b/src/backend/sync/wire.ts @@ -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"; diff --git a/src/backend/tests/database/routes/host-plugin-settings.test.ts b/src/backend/tests/database/routes/host-plugin-settings.test.ts index d3b6267c5..5f459cb02 100644 --- a/src/backend/tests/database/routes/host-plugin-settings.test.ts +++ b/src/backend/tests/database/routes/host-plugin-settings.test.ts @@ -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; diff --git a/src/backend/tests/electron/after-pack.test.ts b/src/backend/tests/electron/after-pack.test.ts index bceb44609..e69137588 100644 --- a/src/backend/tests/electron/after-pack.test.ts +++ b/src/backend/tests/electron/after-pack.test.ts @@ -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", ), ); diff --git a/src/backend/tests/hosts/connect/pipeline.test.ts b/src/backend/tests/hosts/connect/pipeline.test.ts index c93ce6c21..f42ecf8ba 100644 --- a/src/backend/tests/hosts/connect/pipeline.test.ts +++ b/src/backend/tests/hosts/connect/pipeline.test.ts @@ -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", () => ({ diff --git a/src/backend/tests/hosts/defaults/catalog.test.ts b/src/backend/tests/hosts/defaults/catalog.test.ts index b878463d8..fbaebd7e1 100644 --- a/src/backend/tests/hosts/defaults/catalog.test.ts +++ b/src/backend/tests/hosts/defaults/catalog.test.ts @@ -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, diff --git a/src/backend/tests/hosts/defaults/service.test.ts b/src/backend/tests/hosts/defaults/service.test.ts index 457a3c6a7..aaee13d77 100644 --- a/src/backend/tests/hosts/defaults/service.test.ts +++ b/src/backend/tests/hosts/defaults/service.test.ts @@ -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>, diff --git a/src/backend/tests/plugins/ctx-audit.test.ts b/src/backend/tests/plugins/ctx-audit.test.ts index 7eef84faa..f28aaedc7 100644 --- a/src/backend/tests/plugins/ctx-audit.test.ts +++ b/src/backend/tests/plugins/ctx-audit.test.ts @@ -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 = { diff --git a/src/backend/tests/plugins/ctx-auth-login.test.ts b/src/backend/tests/plugins/ctx-auth-login.test.ts index 89c2f023d..9bfb69ffd 100644 --- a/src/backend/tests/plugins/ctx-auth-login.test.ts +++ b/src/backend/tests/plugins/ctx-auth-login.test.ts @@ -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", diff --git a/src/backend/tests/plugins/ctx-capabilities.test.ts b/src/backend/tests/plugins/ctx-capabilities.test.ts index 237d9da98..f6853e976 100644 --- a/src/backend/tests/plugins/ctx-capabilities.test.ts +++ b/src/backend/tests/plugins/ctx-capabilities.test.ts @@ -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 { diff --git a/src/backend/tests/plugins/ctx-credentials.test.ts b/src/backend/tests/plugins/ctx-credentials.test.ts index 867a44861..7615d9f41 100644 --- a/src/backend/tests/plugins/ctx-credentials.test.ts +++ b/src/backend/tests/plugins/ctx-credentials.test.ts @@ -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"; diff --git a/src/backend/tests/plugins/ctx-db.test.ts b/src/backend/tests/plugins/ctx-db.test.ts index 8586c4e3b..4de1200f1 100644 --- a/src/backend/tests/plugins/ctx-db.test.ts +++ b/src/backend/tests/plugins/ctx-db.test.ts @@ -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 { diff --git a/src/backend/tests/plugins/ctx-desktop.test.ts b/src/backend/tests/plugins/ctx-desktop.test.ts index 3b2c27bf1..b48831b6f 100644 --- a/src/backend/tests/plugins/ctx-desktop.test.ts +++ b/src/backend/tests/plugins/ctx-desktop.test.ts @@ -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 { diff --git a/src/backend/tests/plugins/ctx-hosts.test.ts b/src/backend/tests/plugins/ctx-hosts.test.ts index 7e2fd982d..a3f74e30d 100644 --- a/src/backend/tests/plugins/ctx-hosts.test.ts +++ b/src/backend/tests/plugins/ctx-hosts.test.ts @@ -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 { diff --git a/src/backend/tests/plugins/ctx-notify.test.ts b/src/backend/tests/plugins/ctx-notify.test.ts index 8a8a00a6a..dea6ff4d2 100644 --- a/src/backend/tests/plugins/ctx-notify.test.ts +++ b/src/backend/tests/plugins/ctx-notify.test.ts @@ -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(); const auditEntries: Array> = []; @@ -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[], diff --git a/src/backend/tests/plugins/ctx-plugins.test.ts b/src/backend/tests/plugins/ctx-plugins.test.ts index 8c2d0e499..0479480a0 100644 --- a/src/backend/tests/plugins/ctx-plugins.test.ts +++ b/src/backend/tests/plugins/ctx-plugins.test.ts @@ -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; diff --git a/src/backend/tests/plugins/ctx-process.test.ts b/src/backend/tests/plugins/ctx-process.test.ts index 139774e92..29acdc4b8 100644 --- a/src/backend/tests/plugins/ctx-process.test.ts +++ b/src/backend/tests/plugins/ctx-process.test.ts @@ -7,7 +7,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; const h = vi.hoisted(() => ({ granted: new Set() })); 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"]; diff --git a/src/backend/tests/plugins/ctx-secrets.test.ts b/src/backend/tests/plugins/ctx-secrets.test.ts index 3b6c655b9..5abc8c631 100644 --- a/src/backend/tests/plugins/ctx-secrets.test.ts +++ b/src/backend/tests/plugins/ctx-secrets.test.ts @@ -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); diff --git a/src/backend/tests/plugins/ctx-services.test.ts b/src/backend/tests/plugins/ctx-services.test.ts index e21e20d1b..61464f5c8 100644 --- a/src/backend/tests/plugins/ctx-services.test.ts +++ b/src/backend/tests/plugins/ctx-services.test.ts @@ -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 = { diff --git a/src/backend/tests/plugins/ctx-ssh-auth.test.ts b/src/backend/tests/plugins/ctx-ssh-auth.test.ts index c735d1bc0..3d701ac0f 100644 --- a/src/backend/tests/plugins/ctx-ssh-auth.test.ts +++ b/src/backend/tests/plugins/ctx-ssh-auth.test.ts @@ -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 = {}) { 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"] }), diff --git a/src/backend/tests/plugins/ctx-ssh-interactive.test.ts b/src/backend/tests/plugins/ctx-ssh-interactive.test.ts index 38f7c7635..904accc5c 100644 --- a/src/backend/tests/plugins/ctx-ssh-interactive.test.ts +++ b/src/backend/tests/plugins/ctx-ssh-interactive.test.ts @@ -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"]; diff --git a/src/backend/tests/plugins/ctx-system.test.ts b/src/backend/tests/plugins/ctx-system.test.ts index bca0f91c9..21491acec 100644 --- a/src/backend/tests/plugins/ctx-system.test.ts +++ b/src/backend/tests/plugins/ctx-system.test.ts @@ -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 }>; diff --git a/src/backend/tests/plugins/host-commands.test.ts b/src/backend/tests/plugins/host-commands.test.ts index 77c95bf8b..c8ed06f23 100644 --- a/src/backend/tests/plugins/host-commands.test.ts +++ b/src/backend/tests/plugins/host-commands.test.ts @@ -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", () => { diff --git a/src/backend/tests/plugins/plugin-data.test.ts b/src/backend/tests/plugins/plugin-data.test.ts index b868cd637..6c6e61fdd 100644 --- a/src/backend/tests/plugins/plugin-data.test.ts +++ b/src/backend/tests/plugins/plugin-data.test.ts @@ -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, diff --git a/src/backend/tests/plugins/protocol-auth-fixture.test.ts b/src/backend/tests/plugins/protocol-auth-fixture.test.ts index 177a67f84..5892a8631 100644 --- a/src/backend/tests/plugins/protocol-auth-fixture.test.ts +++ b/src/backend/tests/plugins/protocol-auth-fixture.test.ts @@ -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"; diff --git a/src/backend/tests/plugins/sdk-testing.test.ts b/src/backend/tests/plugins/sdk-testing.test.ts index 5e4857688..4dcf35744 100644 --- a/src/backend/tests/plugins/sdk-testing.test.ts +++ b/src/backend/tests/plugins/sdk-testing.test.ts @@ -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; diff --git a/src/backend/tests/plugins/security/credential-shapes.test.ts b/src/backend/tests/plugins/security/credential-shapes.test.ts index 498d715b0..6aa375fff 100644 --- a/src/backend/tests/plugins/security/credential-shapes.test.ts +++ b/src/backend/tests/plugins/security/credential-shapes.test.ts @@ -37,7 +37,8 @@ function secretHost(id: number): Record { } 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 { diff --git a/src/backend/tests/plugins/security/ctx-guards.test.ts b/src/backend/tests/plugins/security/ctx-guards.test.ts index 87b659acc..a2d83b39b 100644 --- a/src/backend/tests/plugins/security/ctx-guards.test.ts +++ b/src/backend/tests/plugins/security/ctx-guards.test.ts @@ -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"; diff --git a/src/backend/tests/plugins/security/data.test.ts b/src/backend/tests/plugins/security/data.test.ts index f82e32b8b..dfcd2cdf0 100644 --- a/src/backend/tests/plugins/security/data.test.ts +++ b/src/backend/tests/plugins/security/data.test.ts @@ -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, diff --git a/src/backend/tests/plugins/security/discovery.test.ts b/src/backend/tests/plugins/security/discovery.test.ts index 8108e8714..61f396d27 100644 --- a/src/backend/tests/plugins/security/discovery.test.ts +++ b/src/backend/tests/plugins/security/discovery.test.ts @@ -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", () => ({ diff --git a/src/backend/tests/plugins/settings-routes.test.ts b/src/backend/tests/plugins/settings-routes.test.ts index b1e58f1b2..e7de470cd 100644 --- a/src/backend/tests/plugins/settings-routes.test.ts +++ b/src/backend/tests/plugins/settings-routes.test.ts @@ -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", diff --git a/src/backend/tests/plugins/settings.test.ts b/src/backend/tests/plugins/settings.test.ts index ae7e58ffd..a962ccad2 100644 --- a/src/backend/tests/plugins/settings.test.ts +++ b/src/backend/tests/plugins/settings.test.ts @@ -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; diff --git a/src/backend/tests/plugins/table-ddl.test.ts b/src/backend/tests/plugins/table-ddl.test.ts index 2f36df4d0..2cb41d285 100644 --- a/src/backend/tests/plugins/table-ddl.test.ts +++ b/src/backend/tests/plugins/table-ddl.test.ts @@ -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, diff --git a/src/backend/tests/plugins/user-data.test.ts b/src/backend/tests/plugins/user-data.test.ts index d93bea668..fab4485fd 100644 --- a/src/backend/tests/plugins/user-data.test.ts +++ b/src/backend/tests/plugins/user-data.test.ts @@ -15,7 +15,7 @@ import { refUser, text, varchar, -} from "@termix/plugin-sdk/db"; +} from "@termix-ssh/plugin-sdk/db"; let sqlite: Database.Database; diff --git a/src/backend/tests/sync/host-plugin-settings.test.ts b/src/backend/tests/sync/host-plugin-settings.test.ts index 424d94574..ddfeb5a06 100644 --- a/src/backend/tests/sync/host-plugin-settings.test.ts +++ b/src/backend/tests/sync/host-plugin-settings.test.ts @@ -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(), diff --git a/src/types/electron.d.ts b/src/types/electron.d.ts index 1eedf93ad..20abeb4e6 100644 --- a/src/types/electron.d.ts +++ b/src/types/electron.d.ts @@ -1 +1 @@ -export type * from "@termix/plugin-sdk/desktop"; +export type * from "@termix-ssh/plugin-sdk/desktop"; diff --git a/src/types/index.ts b/src/types/index.ts index 0e8f5b2c3..7606a6992 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -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; -export type { HostSshOptions } from "@termix/plugin-sdk/frontend"; +export type { HostSshOptions } from "@termix-ssh/plugin-sdk/frontend"; // ============================================================================ // TAB TYPES diff --git a/src/types/ui-types.ts b/src/types/ui-types.ts index 26abe1f16..1eae6c98d 100644 --- a/src/types/ui-types.ts +++ b/src/types/ui-types.ts @@ -6,7 +6,7 @@ import type { } from "./index.js"; import type { HostAuthOverrides } from "./auth-protocols.js"; import type { DefaultOverrides } from "./host-defaults.js"; -import type { QuickConnectLogin } from "@termix/plugin-sdk/frontend"; +import type { QuickConnectLogin } from "@termix-ssh/plugin-sdk/frontend"; export type Host = { id: string; diff --git a/src/ui/AppShell.tsx b/src/ui/AppShell.tsx index cfe3c3549..ce5b43cae 100644 --- a/src/ui/AppShell.tsx +++ b/src/ui/AppShell.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-refresh/only-export-components */ /* eslint-disable react-hooks/exhaustive-deps */ -import type { TabHandle } from "@termix/plugin-sdk/frontend"; +import type { TabHandle } from "@termix-ssh/plugin-sdk/frontend"; import { toast } from "sonner"; import { useTranslation } from "react-i18next"; import { Sheet, SheetContent } from "@/components/sheet"; diff --git a/src/ui/api/plugins-api.ts b/src/ui/api/plugins-api.ts index 4a778bdc9..f8ee09854 100644 --- a/src/ui/api/plugins-api.ts +++ b/src/ui/api/plugins-api.ts @@ -84,7 +84,7 @@ export interface PluginContributions { export { isRedactedSecret, type RedactedSecret, -} from "@termix/plugin-sdk/settings"; +} from "@termix-ssh/plugin-sdk/settings"; export type PluginSettingsValues = Record; diff --git a/src/ui/components/connection/ConnectionGate.tsx b/src/ui/components/connection/ConnectionGate.tsx index e7349da8c..18b950dff 100644 --- a/src/ui/components/connection/ConnectionGate.tsx +++ b/src/ui/components/connection/ConnectionGate.tsx @@ -8,7 +8,7 @@ import { useState, } from "react"; import type React from "react"; -import { useConnectionRetry } from "@termix/plugin-sdk/frontend"; +import { useConnectionRetry } from "@termix-ssh/plugin-sdk/frontend"; import { ConnectionLogProvider, useConnectionLog, diff --git a/src/ui/lib/plugin-transport.ts b/src/ui/lib/plugin-transport.ts index 3aa376918..9fafe1eef 100644 --- a/src/ui/lib/plugin-transport.ts +++ b/src/ui/lib/plugin-transport.ts @@ -12,7 +12,7 @@ * - Electron pointed at a remote Termix server, for hosts whose connection * origin resolves there. * - * A7 re-exports both through @termix/plugin-sdk/frontend. They live here for + * A7 re-exports both through @termix-ssh/plugin-sdk/frontend. They live here for * now because plugin frontends are still bundled with the shell. */ diff --git a/src/ui/manage/ManageTab.tsx b/src/ui/manage/ManageTab.tsx index 9f74c5a8f..cfa069e8f 100644 --- a/src/ui/manage/ManageTab.tsx +++ b/src/ui/manage/ManageTab.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { KeyRound, LibraryBig, Plus, Server, Trash2 } from "lucide-react"; import { toast } from "sonner"; -import type { HostDraft } from "@termix/plugin-sdk/frontend"; +import type { HostDraft } from "@termix-ssh/plugin-sdk/frontend"; import { Button } from "@/components/button"; import { EmptyState } from "@/components/empty-state"; import { FakeSwitch } from "@/components/section-card"; diff --git a/src/ui/manage/manage-requests.ts b/src/ui/manage/manage-requests.ts index 43b31af48..ce3d71b60 100644 --- a/src/ui/manage/manage-requests.ts +++ b/src/ui/manage/manage-requests.ts @@ -1,4 +1,4 @@ -import type { HostDraft } from "@termix/plugin-sdk/frontend"; +import type { HostDraft } from "@termix-ssh/plugin-sdk/frontend"; import type { HostDefaultsLevel } from "@/types/host-defaults"; export type ManageMode = "hosts" | "credentials" | "defaults"; diff --git a/src/ui/plugin-host/app.ts b/src/ui/plugin-host/app.ts index ab4106480..e17060487 100644 --- a/src/ui/plugin-host/app.ts +++ b/src/ui/plugin-host/app.ts @@ -3,7 +3,7 @@ import type { Disposer, PluginManifest, TermixApp, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import { PLUGIN_SETTINGS_CHANGED_EVENT, type PluginContributions, diff --git a/src/ui/plugin-host/auth-registry.ts b/src/ui/plugin-host/auth-registry.ts index 9cbebcf40..741cfe7f1 100644 --- a/src/ui/plugin-host/auth-registry.ts +++ b/src/ui/plugin-host/auth-registry.ts @@ -2,7 +2,7 @@ import type { ComponentType } from "react"; import type { LoginMethodUIProps, SecondFactorUIProps, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import { createRegistry } from "@/lib/registry"; /** diff --git a/src/ui/plugin-host/bridge.ts b/src/ui/plugin-host/bridge.ts index 39a668fcd..978b8bb07 100644 --- a/src/ui/plugin-host/bridge.ts +++ b/src/ui/plugin-host/bridge.ts @@ -15,7 +15,7 @@ import { type PluginHostRecord, type SettingsScope, type SettingsState, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import { usePermissions } from "@/hooks/use-permissions"; import { useTheme } from "@/components/theme-provider"; import { createPluginApi, pluginApiFor } from "@/lib/plugin-transport"; diff --git a/src/ui/plugin-host/loader.ts b/src/ui/plugin-host/loader.ts index 9df378716..2c3947f22 100644 --- a/src/ui/plugin-host/loader.ts +++ b/src/ui/plugin-host/loader.ts @@ -2,7 +2,7 @@ import type { ResourceKey } from "i18next"; import type { FrontendModule, PluginManifest, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import i18n, { setPluginLocaleResolver } from "@/i18n/i18n"; import { getPlugins, type PluginSummary } from "@/api/plugins-api"; import { getBackendUrl } from "@/main-axios"; diff --git a/src/ui/plugin-host/sdk-ui.ts b/src/ui/plugin-host/sdk-ui.ts index f7bebc6a0..904357fd6 100644 --- a/src/ui/plugin-host/sdk-ui.ts +++ b/src/ui/plugin-host/sdk-ui.ts @@ -1,5 +1,5 @@ /** - * @termix/plugin-sdk/ui: the shell's components, for plugins. + * @termix-ssh/plugin-sdk/ui: the shell's components, for plugins. * * Everything exported here is public API. A plugin builds its UI from these * so it looks like the rest of the app and picks up theme changes, and it @@ -244,7 +244,7 @@ export { remoteServerUrl as linkedServerUrl } from "@/plugin-host/desktop"; // Dashboard reads. The calls a plugin makes on the user's behalf (recent // activity, sudo autofill, open tabs, keybindings) are typed in -// @termix/plugin-sdk/frontend instead. +// @termix-ssh/plugin-sdk/frontend instead. export { getRecentActivity, getUptime, diff --git a/src/ui/plugin-host/testing-host.tsx b/src/ui/plugin-host/testing-host.tsx index 08f2b98ca..564f4afc5 100644 --- a/src/ui/plugin-host/testing-host.tsx +++ b/src/ui/plugin-host/testing-host.tsx @@ -1,5 +1,5 @@ /** - * The Termix side of @termix/plugin-sdk/testing's renderWithApp. + * The Termix side of @termix-ssh/plugin-sdk/testing's renderWithApp. * * Activates a plugin against the real registries, the real app object and * the real SDK bridge, then renders whatever it registered with Testing @@ -12,13 +12,13 @@ import { render } from "@testing-library/react"; import type { HostActionContribution, PluginManifest, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import type { FrontendPluginModule, RenderWithAppOptions, RenderedPluginApp, ShellCall, -} from "@termix/plugin-sdk/testing"; +} from "@termix-ssh/plugin-sdk/testing"; import i18n from "@/i18n/i18n"; import type { PluginSummary } from "@/api/plugins-api"; import { ThemeProvider } from "@/components/theme-provider"; diff --git a/src/ui/settings/settings-fields-util.ts b/src/ui/settings/settings-fields-util.ts index 5aa83e0ce..78fe9fce4 100644 --- a/src/ui/settings/settings-fields-util.ts +++ b/src/ui/settings/settings-fields-util.ts @@ -1,4 +1,4 @@ -import { isFieldActive } from "@termix/plugin-sdk/settings"; +import { isFieldActive } from "@termix-ssh/plugin-sdk/settings"; import type { PluginSettingsField } from "@/api/plugins-api"; /** diff --git a/src/ui/shell/tab-registry.ts b/src/ui/shell/tab-registry.ts index dadd4d437..f820cccbf 100644 --- a/src/ui/shell/tab-registry.ts +++ b/src/ui/shell/tab-registry.ts @@ -1,6 +1,6 @@ import type { ConfirmOptions } from "@/components/surface/surface-scope"; import type { ComponentType, Ref } from "react"; -import type { HostDraft } from "@termix/plugin-sdk/frontend"; +import type { HostDraft } from "@termix-ssh/plugin-sdk/frontend"; import type { Host, Tab } from "@/types/ui-types"; import { createRegistry } from "@/lib/registry"; import { viewOwner } from "@/plugin-host/view-ownership"; diff --git a/src/ui/sidebar/HostEditor.tsx b/src/ui/sidebar/HostEditor.tsx index a8854d185..ee74ab588 100644 --- a/src/ui/sidebar/HostEditor.tsx +++ b/src/ui/sidebar/HostEditor.tsx @@ -90,8 +90,8 @@ import { import { useSshAuthEditors } from "@/plugin-host/auth-registry"; import { useSshAuthProviders } from "@/hooks/useSshAuthProviders"; import { SshAuthProviderFields } from "./SshAuthProviderFields"; -import type { PluginSettingsField } from "@termix/plugin-sdk/manifest"; -import type { HostDraft } from "@termix/plugin-sdk/frontend"; +import type { PluginSettingsField } from "@termix-ssh/plugin-sdk/manifest"; +import type { HostDraft } from "@termix-ssh/plugin-sdk/frontend"; import { PluginComponent } from "@/plugin-host/component-registry"; import { toCredentialOption, diff --git a/src/ui/sidebar/HostEditorData.ts b/src/ui/sidebar/HostEditorData.ts index 2ac189b5c..e9b0768e0 100644 --- a/src/ui/sidebar/HostEditorData.ts +++ b/src/ui/sidebar/HostEditorData.ts @@ -5,7 +5,7 @@ import { type HostDraft, type HostProtocolAuthForm, type HostProtocolAuthSummary, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import type { DefaultOverrides } from "@/types/host-defaults"; import { listHostProtocols, diff --git a/src/ui/sidebar/SshAuthProviderFields.tsx b/src/ui/sidebar/SshAuthProviderFields.tsx index 36d2820ed..61d0e6391 100644 --- a/src/ui/sidebar/SshAuthProviderFields.tsx +++ b/src/ui/sidebar/SshAuthProviderFields.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; -import type { PluginSettingsField } from "@termix/plugin-sdk/manifest"; +import type { PluginSettingsField } from "@termix-ssh/plugin-sdk/manifest"; import { SettingsFieldRow } from "@/settings/SettingsFields"; import { getPluginHostSettings, diff --git a/src/ui/ssh/dialogs/TOTPDialog.tsx b/src/ui/ssh/dialogs/TOTPDialog.tsx index 7b4673e08..acbe73fc8 100644 --- a/src/ui/ssh/dialogs/TOTPDialog.tsx +++ b/src/ui/ssh/dialogs/TOTPDialog.tsx @@ -7,7 +7,7 @@ import { } from "@/components/surface/prompt-styles"; import { Shield, Loader2 } from "lucide-react"; import { useTranslation } from "react-i18next"; -import type { MFAPromptMode } from "@termix/plugin-sdk/frontend"; +import type { MFAPromptMode } from "@termix-ssh/plugin-sdk/frontend"; export type { MFAPromptMode }; diff --git a/src/ui/tests/auth/AuthLoginMethods.test.tsx b/src/ui/tests/auth/AuthLoginMethods.test.tsx index 57bb87b8f..8a0803216 100644 --- a/src/ui/tests/auth/AuthLoginMethods.test.tsx +++ b/src/ui/tests/auth/AuthLoginMethods.test.tsx @@ -18,7 +18,7 @@ import { import type { LoginMethodUIProps, SecondFactorUIProps, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; const mainAxios = vi.hoisted(() => ({ loginUser: vi.fn(), diff --git a/src/ui/tests/plugin-host/cli-bundle.test.tsx b/src/ui/tests/plugin-host/cli-bundle.test.tsx index 76e2a870c..b04a65a77 100644 --- a/src/ui/tests/plugin-host/cli-bundle.test.tsx +++ b/src/ui/tests/plugin-host/cli-bundle.test.tsx @@ -17,7 +17,7 @@ import { renderWithApp, type FrontendPluginModule, type RenderedPluginApp, -} from "@termix/plugin-sdk/testing"; +} from "@termix-ssh/plugin-sdk/testing"; import { resetPanels } from "@/shell/panel-registry"; import { resetPluginStore } from "@/plugin-host/plugin-store"; @@ -48,7 +48,7 @@ afterAll(async () => { describe("a CLI-built plugin bundle", () => { it("leaves React and the SDK out of the bundle", () => { expect(bundle).toMatch(/from\s*"react"/); - expect(bundle).toMatch(/from\s*"@termix\/plugin-sdk\/frontend"/); + expect(bundle).toMatch(/from\s*"@termix-ssh\/plugin-sdk\/frontend"/); expect(bundle).not.toMatch(/react\.production|react\.development/); }); diff --git a/src/ui/tests/plugin-host/fixtures/hook-plugin/src/frontend/index.tsx b/src/ui/tests/plugin-host/fixtures/hook-plugin/src/frontend/index.tsx index fee1efca7..3563e2c1d 100644 --- a/src/ui/tests/plugin-host/fixtures/hook-plugin/src/frontend/index.tsx +++ b/src/ui/tests/plugin-host/fixtures/hook-plugin/src/frontend/index.tsx @@ -1,5 +1,8 @@ import { useState } from "react"; -import { useTranslation, type TermixApp } from "@termix/plugin-sdk/frontend"; +import { + useTranslation, + type TermixApp, +} from "@termix-ssh/plugin-sdk/frontend"; function Counter() { const { t } = useTranslation(); diff --git a/src/ui/tests/plugin-host/host-scope.test.tsx b/src/ui/tests/plugin-host/host-scope.test.tsx index a6eed8890..91f8d6de2 100644 --- a/src/ui/tests/plugin-host/host-scope.test.tsx +++ b/src/ui/tests/plugin-host/host-scope.test.tsx @@ -6,12 +6,12 @@ import { useHost, type PluginHostRecord, type TermixApp, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import { renderWithApp, type RenderedPluginApp, -} from "@termix/plugin-sdk/testing"; -import type { PluginManifest } from "@termix/plugin-sdk/manifest"; +} from "@termix-ssh/plugin-sdk/testing"; +import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest"; import { scopeHost, scopeHostArgs, diff --git a/src/ui/tests/plugin-host/loader.test.tsx b/src/ui/tests/plugin-host/loader.test.tsx index acd56dbfe..c5992fb62 100644 --- a/src/ui/tests/plugin-host/loader.test.tsx +++ b/src/ui/tests/plugin-host/loader.test.tsx @@ -1,6 +1,9 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { Puzzle } from "lucide-react"; -import type { FrontendModule, TermixApp } from "@termix/plugin-sdk/frontend"; +import type { + FrontendModule, + TermixApp, +} from "@termix-ssh/plugin-sdk/frontend"; import type { PluginSummary } from "@/api/plugins-api"; import { configurePluginLoader, diff --git a/src/ui/tests/plugin-host/registries.test.tsx b/src/ui/tests/plugin-host/registries.test.tsx index 20dd302e9..3b89f9611 100644 --- a/src/ui/tests/plugin-host/registries.test.tsx +++ b/src/ui/tests/plugin-host/registries.test.tsx @@ -10,12 +10,12 @@ import { usePermission, useTranslation, type TermixApp, -} from "@termix/plugin-sdk/frontend"; +} from "@termix-ssh/plugin-sdk/frontend"; import { renderWithApp, type RenderedPluginApp, -} from "@termix/plugin-sdk/testing"; -import type { PluginManifest } from "@termix/plugin-sdk/manifest"; +} from "@termix-ssh/plugin-sdk/testing"; +import type { PluginManifest } from "@termix-ssh/plugin-sdk/manifest"; import { NavigationVisibilityToggles } from "@/sidebar/NavigationVisibilityToggles"; import { hostActionsFor, diff --git a/src/ui/tests/plugin-host/security/guards.test.tsx b/src/ui/tests/plugin-host/security/guards.test.tsx index b29345a0b..b1ee67d20 100644 --- a/src/ui/tests/plugin-host/security/guards.test.tsx +++ b/src/ui/tests/plugin-host/security/guards.test.tsx @@ -1,7 +1,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { render, screen } from "@testing-library/react"; import { Puzzle } from "lucide-react"; -import type { FrontendModule } from "@termix/plugin-sdk/frontend"; +import type { FrontendModule } from "@termix-ssh/plugin-sdk/frontend"; import type { PluginSummary } from "@/api/plugins-api"; import { configurePluginLoader, diff --git a/src/ui/tests/plugin-host/slots-and-i18n.test.tsx b/src/ui/tests/plugin-host/slots-and-i18n.test.tsx index 232e28535..5d8346648 100644 --- a/src/ui/tests/plugin-host/slots-and-i18n.test.tsx +++ b/src/ui/tests/plugin-host/slots-and-i18n.test.tsx @@ -1,10 +1,13 @@ import { afterEach, describe, expect, it } from "vitest"; import { render, screen } from "@testing-library/react"; -import { useTranslation, type TermixApp } from "@termix/plugin-sdk/frontend"; +import { + useTranslation, + type TermixApp, +} from "@termix-ssh/plugin-sdk/frontend"; import { renderWithApp, type RenderedPluginApp, -} from "@termix/plugin-sdk/testing"; +} from "@termix-ssh/plugin-sdk/testing"; import { ComponentSlot } from "@/shell/ActionSlot"; import { resetActionRegistry } from "@/shell/action-registry"; import { resetPluginStore } from "@/plugin-host/plugin-store"; diff --git a/src/ui/tests/sidebar/HostEditorData.test.ts b/src/ui/tests/sidebar/HostEditorData.test.ts index 8a7bc8b8c..9e4601cbb 100644 --- a/src/ui/tests/sidebar/HostEditorData.test.ts +++ b/src/ui/tests/sidebar/HostEditorData.test.ts @@ -9,7 +9,7 @@ import { type HostProtocols, } from "../../sidebar/HostEditorData"; import type { Host } from "@/types/ui-types"; -import { HOST_PROTOCOL_SECRET_KEPT } from "@termix/plugin-sdk/frontend"; +import { HOST_PROTOCOL_SECRET_KEPT } from "@termix-ssh/plugin-sdk/frontend"; const sshOnly: HostProtocols = { enableSsh: true, diff --git a/tsconfig.app.json b/tsconfig.app.json index 97c4765d8..cd1e11b47 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -28,8 +28,10 @@ "noImplicitOverride": false, "noEmitOnError": false, "paths": { - "@termix/plugin-sdk/frontend": ["./packages/plugin-sdk/src/frontend.ts"], - "@termix/plugin-sdk/ui": ["./src/ui/plugin-host/sdk-ui.ts"], + "@termix-ssh/plugin-sdk/frontend": [ + "./packages/plugin-sdk/src/frontend.ts" + ], + "@termix-ssh/plugin-sdk/ui": ["./src/ui/plugin-host/sdk-ui.ts"], "@/types": ["./src/types/index.ts"], "@/types/*": ["./src/types/*"], "@/*": ["./src/ui/*"] diff --git a/vite.config.ts b/vite.config.ts index 03076e2cd..94f1e0a35 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -95,8 +95,8 @@ export default defineConfig({ }, resolve: { alias: { - "@termix/plugin-sdk/frontend": sdkFrontendEntry, - "@termix/plugin-sdk/ui": sdkUiEntry, + "@termix-ssh/plugin-sdk/frontend": sdkFrontendEntry, + "@termix-ssh/plugin-sdk/ui": sdkUiEntry, "@/types": path.resolve(__dirname, "./src/types"), "@": path.resolve(__dirname, "./src/ui"), }, diff --git a/vitest.config.ts b/vitest.config.ts index 01aa2aed4..e6a0b2315 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,18 +5,18 @@ export default defineConfig({ resolve: { alias: [ { - find: "@termix/plugin-sdk/frontend", + find: "@termix-ssh/plugin-sdk/frontend", replacement: path.resolve( __dirname, "./packages/plugin-sdk/src/frontend.ts", ), }, { - find: "@termix/plugin-sdk/ui", + find: "@termix-ssh/plugin-sdk/ui", replacement: path.resolve(__dirname, "./src/ui/plugin-host/sdk-ui.ts"), }, { - find: "@termix/plugin-host/testing", + find: "@termix-ssh/plugin-host/testing", replacement: path.resolve( __dirname, "./src/ui/plugin-host/testing-host.tsx", diff --git a/vitest.setup.ts b/vitest.setup.ts index fe27dc3b0..5eb8a2363 100644 --- a/vitest.setup.ts +++ b/vitest.setup.ts @@ -4,4 +4,4 @@ * The polyfills live in the SDK so core and every plugin suite share one copy. */ -import "@termix/plugin-sdk/testing/setup"; +import "@termix-ssh/plugin-sdk/testing/setup";