mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-13 07:09:20 +00:00
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
/**
|
|
* Host-provided packages.
|
|
*
|
|
* These ship with the Termix server and are never bundled into a plugin:
|
|
* bundling them would give each plugin its own copy of express or React, and
|
|
* a second ssh2 would mean a second set of native bindings. A plugin may
|
|
* depend on anything outside these lists, and that does get bundled.
|
|
*
|
|
* A plugin lists the ones it uses as peerDependencies. Only add a package here
|
|
* when core itself ships it; a library one plugin needs belongs in that
|
|
* plugin's own dependencies, so it can update without a core release.
|
|
*
|
|
* Node builtins are external automatically through platform: "node".
|
|
*/
|
|
|
|
export const BACKEND_EXTERNALS = [
|
|
"@termix/plugin-sdk",
|
|
"@termix/plugin-sdk/*",
|
|
"express",
|
|
"ssh2",
|
|
"ws",
|
|
"multer",
|
|
"cookie-parser",
|
|
"axios",
|
|
"drizzle-orm",
|
|
"drizzle-orm/*",
|
|
// Native image processing, loaded on first use by the terminal's image upload.
|
|
"sharp",
|
|
];
|
|
|
|
/**
|
|
* Resolved by the page's import map to the shell's own copies, because these
|
|
* must be one instance: React, i18next, the toast store, and the SDK entries
|
|
* that share state with core. Anything else a plugin imports is bundled.
|
|
*/
|
|
export const FRONTEND_EXTERNALS = [
|
|
"react",
|
|
"react-dom",
|
|
"react/jsx-runtime",
|
|
"react-dom/client",
|
|
"i18next",
|
|
"react-i18next",
|
|
"sonner",
|
|
"@termix/plugin-sdk/frontend",
|
|
"@termix/plugin-sdk/ui",
|
|
];
|