@flowrunner/cli 0.1.9-dev.2 → 0.1.10
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/ai-docs/instructions/service-code-format/03-parameters.md +22 -7
- package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +4 -1
- package/ai-docs/instructions/service-code-format/16-gotchas.md +8 -0
- package/dist/cli.js +11 -3
- package/dist/cli.js.map +2 -2
- package/dist/index.js +10 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/runtime/index.js +10 -2
- package/runtime/index.js.map +2 -2
- package/templates/qa-test/files/src/index.js +7 -5
package/dist/index.js
CHANGED
|
@@ -5159,7 +5159,10 @@ function isDynamicPropsSlot(source, topLevel) {
|
|
|
5159
5159
|
function assertDynamicProps(schema, name, siblings, source, path19) {
|
|
5160
5160
|
const ins = inspect(schema);
|
|
5161
5161
|
const spec = ins.meta.frDynamicProps;
|
|
5162
|
-
if (!spec
|
|
5162
|
+
if (!spec) {
|
|
5163
|
+
return;
|
|
5164
|
+
}
|
|
5165
|
+
if (typeof spec.id === "string" && !("execute" in spec)) {
|
|
5163
5166
|
return;
|
|
5164
5167
|
}
|
|
5165
5168
|
if (typeof spec.execute !== "function") {
|
|
@@ -6077,6 +6080,11 @@ function extendPrototype() {
|
|
|
6077
6080
|
return this.meta({ frLabels: byValue });
|
|
6078
6081
|
};
|
|
6079
6082
|
proto.dynamicProps = function dynamicProps(spec) {
|
|
6083
|
+
if (!spec || typeof spec !== "object") {
|
|
6084
|
+
throw new Error(
|
|
6085
|
+
"`.dynamicProps()` takes `{ dependsOn, execute }` \u2014 the params the fields depend on, and a function that returns them. e.g. .dynamicProps({ dependsOn: ['tableName'], execute: async ({ criteria }) => ({ \u2026 }) })"
|
|
6086
|
+
);
|
|
6087
|
+
}
|
|
6080
6088
|
return this.meta({ frDynamicProps: spec });
|
|
6081
6089
|
};
|
|
6082
6090
|
proto.map = function map() {
|
|
@@ -6747,7 +6755,7 @@ var ActionMethod = class extends ExtensionMethod {
|
|
|
6747
6755
|
dynamicPropsFields() {
|
|
6748
6756
|
return this.params.fields().flatMap(([name, schema]) => {
|
|
6749
6757
|
const def = inspect(schema).meta.frDynamicProps;
|
|
6750
|
-
return def && "execute" in def ? [[name, def]] : [];
|
|
6758
|
+
return def && !(typeof def.id === "string" && !("execute" in def)) ? [[name, def]] : [];
|
|
6751
6759
|
});
|
|
6752
6760
|
}
|
|
6753
6761
|
get id() {
|