pupt-lib 1.1.7 → 1.1.8
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.
package/dist/index.js
CHANGED
|
@@ -260,14 +260,9 @@ async function renderChildrenFallback(children, context) {
|
|
|
260
260
|
async function renderComponentWithValidation(type, componentName, props, children, context, renderFn) {
|
|
261
261
|
const schema = getSchema(type);
|
|
262
262
|
if (!schema) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
message: `Component "${componentName}" does not have a schema defined. All components must declare a static schema.`,
|
|
267
|
-
code: "missing_schema",
|
|
268
|
-
path: []
|
|
269
|
-
});
|
|
270
|
-
return renderChildrenFallback(children, context);
|
|
263
|
+
throw new Error(
|
|
264
|
+
`Component "${componentName}" does not have a schema defined. All components must declare a static schema.`
|
|
265
|
+
);
|
|
271
266
|
}
|
|
272
267
|
const validationErrors = validateProps(componentName, { ...props, children }, schema);
|
|
273
268
|
if (validationErrors.length > 0) {
|
|
@@ -38310,6 +38305,8 @@ async function evaluateModule(code, options) {
|
|
|
38310
38305
|
);
|
|
38311
38306
|
}
|
|
38312
38307
|
const BUILTIN_COMPONENTS = [
|
|
38308
|
+
// Base class for custom components
|
|
38309
|
+
"Component",
|
|
38313
38310
|
// Structural
|
|
38314
38311
|
"Prompt",
|
|
38315
38312
|
"Section",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* List of all built-in components that should be auto-imported for .prompt files.
|
|
7
7
|
*/
|
|
8
|
-
export declare const BUILTIN_COMPONENTS: readonly ["Prompt", "Section", "Role", "Task", "Context", "Constraint", "Format", "Audience", "Tone", "SuccessCriteria", "Criterion", "UUID", "Timestamp", "DateTime", "Hostname", "Username", "Cwd", "Uses", "If", "ForEach", "Example", "Examples", "ExampleInput", "ExampleOutput", "Steps", "Step", "Code", "Data", "File", "Json", "Xml", "PostExecution", "ReviewFile", "OpenUrl", "RunCommand"];
|
|
8
|
+
export declare const BUILTIN_COMPONENTS: readonly ["Component", "Prompt", "Section", "Role", "Task", "Context", "Constraint", "Format", "Audience", "Tone", "SuccessCriteria", "Criterion", "UUID", "Timestamp", "DateTime", "Hostname", "Username", "Cwd", "Uses", "If", "ForEach", "Example", "Examples", "ExampleInput", "ExampleOutput", "Steps", "Step", "Code", "Data", "File", "Json", "Xml", "PostExecution", "ReviewFile", "OpenUrl", "RunCommand"];
|
|
9
9
|
/**
|
|
10
10
|
* Ask components that need special handling (Ask namespace + individual exports)
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocessor.d.ts","sourceRoot":"","sources":["../../src/services/preprocessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"preprocessor.d.ts","sourceRoot":"","sources":["../../src/services/preprocessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,qZA8CrB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc,sNAiBjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAahD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAuBnF"}
|