@constela/start 1.8.24 → 1.8.25
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.
|
@@ -770,8 +770,6 @@ async function mdxContentToNode(content, options) {
|
|
|
770
770
|
import { existsSync as existsSync3, readFileSync } from "fs";
|
|
771
771
|
import { basename, dirname, extname as extname2, join as join3 } from "path";
|
|
772
772
|
import fg2 from "fast-glob";
|
|
773
|
-
import { isAiDataSource } from "@constela/core";
|
|
774
|
-
import { createDslGenerator } from "@constela/ai";
|
|
775
773
|
var mdxContentToNode2 = mdxContentToNode;
|
|
776
774
|
function resolveJsonRefs(json) {
|
|
777
775
|
const cloned = JSON.parse(JSON.stringify(json));
|
|
@@ -1101,19 +1099,6 @@ async function loadApi(url, transform) {
|
|
|
1101
1099
|
throw new Error(`Network error: ${error.message}`);
|
|
1102
1100
|
}
|
|
1103
1101
|
}
|
|
1104
|
-
async function loadAi(dataSource, generator) {
|
|
1105
|
-
const gen = generator ?? createDslGenerator({
|
|
1106
|
-
provider: dataSource.provider
|
|
1107
|
-
});
|
|
1108
|
-
const result = await gen.generate({
|
|
1109
|
-
prompt: dataSource.prompt,
|
|
1110
|
-
output: dataSource.output
|
|
1111
|
-
});
|
|
1112
|
-
if (!result.validated && result.errors && result.errors.length > 0) {
|
|
1113
|
-
throw new Error(`AI generated DSL validation failed: ${result.errors.join(", ")}`);
|
|
1114
|
-
}
|
|
1115
|
-
return result.dsl;
|
|
1116
|
-
}
|
|
1117
1102
|
function evaluateParamExpression(expr, item) {
|
|
1118
1103
|
switch (expr.expr) {
|
|
1119
1104
|
case "lit":
|
|
@@ -1226,12 +1211,6 @@ var DataLoader = class {
|
|
|
1226
1211
|
}
|
|
1227
1212
|
data = await loadApi(dataSource.url, dataSource.transform);
|
|
1228
1213
|
break;
|
|
1229
|
-
case "ai":
|
|
1230
|
-
if (!isAiDataSource(dataSource)) {
|
|
1231
|
-
throw new Error(`Invalid AI data source '${name}'`);
|
|
1232
|
-
}
|
|
1233
|
-
data = await loadAi(dataSource);
|
|
1234
|
-
break;
|
|
1235
1214
|
default:
|
|
1236
1215
|
throw new Error(`Unknown data source type: ${dataSource.type}`);
|
|
1237
1216
|
}
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/start",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.25",
|
|
4
4
|
"description": "Meta-framework for Constela applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,12 +44,11 @@
|
|
|
44
44
|
"@tailwindcss/postcss": "^4.0.0",
|
|
45
45
|
"tailwindcss": "^4.0.0",
|
|
46
46
|
"ws": "^8.18.0",
|
|
47
|
+
"@constela/compiler": "0.14.6",
|
|
48
|
+
"@constela/core": "0.16.1",
|
|
49
|
+
"@constela/server": "12.0.1",
|
|
47
50
|
"@constela/router": "18.0.0",
|
|
48
|
-
"@constela/
|
|
49
|
-
"@constela/server": "12.0.0",
|
|
50
|
-
"@constela/core": "0.16.0",
|
|
51
|
-
"@constela/ai": "1.0.0",
|
|
52
|
-
"@constela/runtime": "0.19.4"
|
|
51
|
+
"@constela/runtime": "0.19.5"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
54
|
"@types/ws": "^8.5.0",
|