feat: move snippets backend and tables into a plugin (B2)

This commit is contained in:
LukeGus committed 2026-09-23 08:58:53 -05:00
1 parent fdedca39fd
commit e07221eaf3
51 files changed
+28426 -3553

No files matched your search

+3 -2
View File
@@ -52,7 +52,8 @@ export { default } from ${target};`
}
const require = createRequire(path.join(repoRoot, "package.json"));
const names = Object.keys(require(specifier)).filter(
(name) => name !== "default" && name !== "__esModule" && IDENTIFIER.test(name),
(name) =>
name !== "default" && name !== "__esModule" && IDENTIFIER.test(name),
);
const lines = [`import * as m from ${JSON.stringify(specifier)};`];
lines.push("const d = m.default ?? m;");
@@ -140,7 +141,7 @@ export function termixPluginHost({ repoRoot, sdkUiEntry, sdkFrontendEntry }) {
"}",
"for (const [file, load] of Object.entries(locales)) {",
' const parts = file.split("/");',
' const id = parts[2];',
" const id = parts[2];",
' const name = parts[parts.length - 1].replace(/\\.json$/, "");',
" (workspaceLocales[id] ??= {})[name] = load;",
"}",