@elevasis/ui 2.26.0 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { resolve } from 'path';
3
+ import { spawnSync } from 'child_process';
3
4
  import { runKnowledgeCodegen } from '@elevasis/sdk/node';
4
5
 
5
6
  // src/vite-plugin-knowledge/index.ts
@@ -41,13 +42,31 @@ function detectLayout(viteRoot) {
41
42
  }
42
43
  function knowledgePlugin() {
43
44
  let layout;
45
+ async function runCodegen() {
46
+ if (layout.mode === "monorepo") {
47
+ const result = spawnSync(
48
+ "pnpm",
49
+ ["-C", "packages/ui", "exec", "tsx", "scripts/run-knowledge-bodies-codegen.ts"],
50
+ {
51
+ cwd: layout.projectRoot,
52
+ encoding: "utf8",
53
+ shell: process.platform === "win32"
54
+ }
55
+ );
56
+ if (result.status !== 0) {
57
+ throw new Error(result.error?.message || result.stderr || result.stdout || "knowledge codegen failed");
58
+ }
59
+ return;
60
+ }
61
+ await runKnowledgeCodegen(layout);
62
+ }
44
63
  return {
45
64
  name: "elevasis:knowledge",
46
65
  configResolved(config) {
47
66
  layout = detectLayout(config.root);
48
67
  },
49
68
  async buildStart() {
50
- await runKnowledgeCodegen(layout);
69
+ await runCodegen();
51
70
  if (this.meta.watchMode) {
52
71
  for (const p of layout.watchPaths) this.addWatchFile(p);
53
72
  }
@@ -56,7 +75,7 @@ function knowledgePlugin() {
56
75
  const watched = layout.watchPaths.some((p) => file === p || file.startsWith(p + "/") || file.startsWith(p + "\\"));
57
76
  if (!watched) return;
58
77
  try {
59
- await runKnowledgeCodegen(layout);
78
+ await runCodegen();
60
79
  } catch (err) {
61
80
  server.config.logger.error(`[knowledge-plugin] codegen failed: ${String(err)}`);
62
81
  return;
@@ -1,5 +1,5 @@
1
- import { knowledgePlugin } from '../chunk-KCGGA36K.js';
2
- export { knowledgePlugin } from '../chunk-KCGGA36K.js';
1
+ import { knowledgePlugin } from '../chunk-MYEOTM7D.js';
2
+ export { knowledgePlugin } from '../chunk-MYEOTM7D.js';
3
3
  import '../chunk-I2KLQ2HA.js';
4
4
 
5
5
  // src/vite/index.ts
@@ -1,2 +1,2 @@
1
- export { knowledgePlugin } from '../chunk-KCGGA36K.js';
1
+ export { knowledgePlugin } from '../chunk-MYEOTM7D.js';
2
2
  import '../chunk-I2KLQ2HA.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/ui",
3
- "version": "2.26.0",
3
+ "version": "2.27.0",
4
4
  "description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -247,11 +247,11 @@
247
247
  "@testing-library/jest-dom": "^6.9.1",
248
248
  "msw": "^2.11.0",
249
249
  "vitest": "^3.2.4",
250
- "@elevasis/sdk": "1.15.1",
251
- "@repo/core": "0.16.0",
252
- "@repo/eslint-config": "0.0.0",
250
+ "@elevasis/sdk": "1.16.0",
253
251
  "@repo/typescript-config": "0.0.0",
254
- "@repo/elevasis-core": "1.0.0"
252
+ "@repo/core": "0.17.0",
253
+ "@repo/elevasis-core": "1.0.0",
254
+ "@repo/eslint-config": "0.0.0"
255
255
  },
256
256
  "dependencies": {
257
257
  "@dagrejs/dagre": "^1.1.4",