@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/package.json
CHANGED
package/runtime/index.js
CHANGED
|
@@ -1846,7 +1846,10 @@ function isDynamicPropsSlot(source, topLevel) {
|
|
|
1846
1846
|
function assertDynamicProps(schema, name, siblings, source, path2) {
|
|
1847
1847
|
const ins = inspect(schema);
|
|
1848
1848
|
const spec = ins.meta.frDynamicProps;
|
|
1849
|
-
if (!spec
|
|
1849
|
+
if (!spec) {
|
|
1850
|
+
return;
|
|
1851
|
+
}
|
|
1852
|
+
if (typeof spec.id === "string" && !("execute" in spec)) {
|
|
1850
1853
|
return;
|
|
1851
1854
|
}
|
|
1852
1855
|
if (typeof spec.execute !== "function") {
|
|
@@ -2764,6 +2767,11 @@ function extendPrototype() {
|
|
|
2764
2767
|
return this.meta({ frLabels: byValue });
|
|
2765
2768
|
};
|
|
2766
2769
|
proto.dynamicProps = function dynamicProps(spec) {
|
|
2770
|
+
if (!spec || typeof spec !== "object") {
|
|
2771
|
+
throw new Error(
|
|
2772
|
+
"`.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 }) })"
|
|
2773
|
+
);
|
|
2774
|
+
}
|
|
2767
2775
|
return this.meta({ frDynamicProps: spec });
|
|
2768
2776
|
};
|
|
2769
2777
|
proto.map = function map() {
|
|
@@ -3434,7 +3442,7 @@ var ActionMethod = class extends ExtensionMethod {
|
|
|
3434
3442
|
dynamicPropsFields() {
|
|
3435
3443
|
return this.params.fields().flatMap(([name, schema]) => {
|
|
3436
3444
|
const def = inspect(schema).meta.frDynamicProps;
|
|
3437
|
-
return def && "execute" in def ? [[name, def]] : [];
|
|
3445
|
+
return def && !(typeof def.id === "string" && !("execute" in def)) ? [[name, def]] : [];
|
|
3438
3446
|
});
|
|
3439
3447
|
}
|
|
3440
3448
|
get id() {
|