mm_workflow 1.0.1 → 1.0.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/README.md +144 -37
- package/common/mod/calculator/average/calculator.json +60 -0
- package/common/mod/calculator/average/index.js +48 -0
- package/common/mod/calculator/count/calculator.json +78 -0
- package/common/mod/calculator/count/index.js +58 -0
- package/common/mod/calculator/formula/calculator.json +48 -0
- package/common/mod/calculator/formula/index.js +40 -0
- package/common/mod/calculator/indicator/calculator.json +67 -0
- package/common/mod/calculator/indicator/index.js +280 -0
- package/common/mod/calculator/kline/calculator.json +72 -0
- package/common/mod/calculator/kline/index.js +148 -0
- package/common/mod/calculator/percent/calculator.json +55 -0
- package/common/mod/calculator/percent/index.js +18 -0
- package/common/mod/calculator/probability/calculator.json +61 -0
- package/common/mod/calculator/probability/index.js +132 -0
- package/common/mod/calculator/random/calculator.json +57 -0
- package/common/mod/calculator/random/index.js +85 -0
- package/common/mod/calculator/round/calculator.json +65 -0
- package/common/mod/calculator/round/index.js +36 -0
- package/common/mod/calculator/snowflake/calculator.json +67 -0
- package/common/mod/calculator/snowflake/index.js +115 -0
- package/common/mod/calculator/sum/calculator.json +56 -0
- package/common/mod/calculator/sum/index.js +62 -0
- package/common/mod/converter/case/converter.json +54 -0
- package/common/mod/converter/case/index.js +26 -0
- package/common/mod/converter/color/converter.json +60 -0
- package/common/mod/converter/color/index.js +182 -0
- package/common/mod/converter/compress/converter.json +66 -0
- package/common/mod/converter/compress/index.js +53 -0
- package/common/mod/converter/constants/converter.json +80 -0
- package/common/mod/converter/constants/index.js +97 -0
- package/common/mod/converter/date/converter.json +60 -0
- package/common/mod/converter/date/index.js +155 -0
- package/common/mod/converter/encoding/converter.json +78 -0
- package/common/mod/converter/encoding/index.js +76 -0
- package/common/mod/converter/excel/converter.json +79 -0
- package/common/mod/converter/excel/index.js +241 -0
- package/common/mod/converter/format/converter.json +75 -0
- package/common/mod/converter/format/index.js +203 -0
- package/common/mod/converter/image/converter.json +133 -0
- package/common/mod/converter/image/index.js +324 -0
- package/common/mod/converter/password/converter.json +73 -0
- package/common/mod/converter/password/index.js +103 -0
- package/common/mod/converter/pdf/converter.json +87 -0
- package/common/mod/converter/pdf/index.js +288 -0
- package/common/mod/converter/type/converter.json +63 -0
- package/common/mod/converter/type/index.js +32 -0
- package/common/mod/converter/unit/converter.json +63 -0
- package/common/mod/converter/unit/index.js +56 -0
- package/common/mod/converter/util/converter.json +85 -0
- package/common/mod/converter/util/index.js +124 -0
- package/common/mod/converter/video/converter.json +71 -0
- package/common/mod/converter/video/index.js +124 -0
- package/common/mod/converter/word/converter.json +79 -0
- package/common/mod/converter/word/index.js +134 -0
- package/common/mod/designer/bpmn/designer.json +48 -0
- package/common/mod/designer/bpmn/index.js +47 -0
- package/common/mod/designer/form/designer.json +52 -0
- package/common/mod/designer/form/index.js +47 -0
- package/common/mod/designer/layout/designer.json +57 -0
- package/common/mod/designer/layout/index.js +52 -0
- package/common/mod/designer/layout_tpl/designer.json +56 -0
- package/common/mod/designer/layout_tpl/index.js +53 -0
- package/common/mod/designer/module/designer.json +79 -0
- package/common/mod/designer/module/index.js +57 -0
- package/common/mod/designer/schema/designer.json +57 -0
- package/common/mod/designer/schema/index.js +35 -0
- package/common/mod/designer/workflow/designer.json +104 -0
- package/common/mod/designer/workflow/index.js +183 -0
- package/common/mod/dialoguer/ask/dialoguer.json +107 -0
- package/common/mod/dialoguer/ask/index.js +28 -0
- package/common/mod/dialoguer/end/dialoguer.json +58 -0
- package/common/mod/dialoguer/end/index.js +20 -0
- package/common/mod/dialoguer/input/dialoguer.json +120 -0
- package/common/mod/dialoguer/input/index.js +37 -0
- package/common/mod/dialoguer/menu/dialoguer.json +106 -0
- package/common/mod/dialoguer/menu/index.js +33 -0
- package/common/mod/dialoguer/modal/dialoguer.json +75 -0
- package/common/mod/dialoguer/modal/index.js +22 -0
- package/common/mod/dialoguer/notify/dialoguer.json +98 -0
- package/common/mod/dialoguer/notify/index.js +24 -0
- package/common/mod/dialoguer/paging/dialoguer.json +132 -0
- package/common/mod/dialoguer/paging/index.js +33 -0
- package/common/mod/dialoguer/say/dialoguer.json +82 -0
- package/common/mod/dialoguer/say/index.js +22 -0
- package/common/mod/dialoguer/style/dialoguer.json +104 -0
- package/common/mod/dialoguer/style/index.js +34 -0
- package/common/mod/dispatcher/condition/dispatcher.json +86 -0
- package/common/mod/dispatcher/condition/index.js +103 -0
- package/common/mod/dispatcher/label_jump/dispatcher.json +54 -0
- package/common/mod/dispatcher/label_jump/index.js +30 -0
- package/common/mod/dispatcher/load_balance/dispatcher.json +43 -0
- package/common/mod/dispatcher/load_balance/index.js +73 -0
- package/common/mod/dispatcher/parallel/dispatcher.json +46 -0
- package/common/mod/dispatcher/parallel/index.js +240 -0
- package/common/mod/dispatcher/priority/dispatcher.json +51 -0
- package/common/mod/dispatcher/priority/index.js +32 -0
- package/common/mod/dispatcher/retry/dispatcher.json +41 -0
- package/common/mod/dispatcher/retry/index.js +66 -0
- package/common/mod/dispatcher/route/dispatcher.json +43 -0
- package/common/mod/dispatcher/route/index.js +42 -0
- package/common/mod/dispatcher/state_machine/dispatcher.json +80 -0
- package/common/mod/dispatcher/state_machine/index.js +172 -0
- package/common/mod/dispatcher/subflow/dispatcher.json +47 -0
- package/common/mod/dispatcher/subflow/index.js +91 -0
- package/common/mod/dispatcher/switch_case/dispatcher.json +74 -0
- package/common/mod/dispatcher/switch_case/index.js +77 -0
- package/common/mod/executor/ai/executor.json +120 -0
- package/common/mod/executor/ai/index.js +224 -0
- package/common/mod/executor/ai_vision/executor.json +76 -0
- package/common/mod/executor/ai_vision/index.js +76 -0
- package/common/mod/executor/command/executor.json +74 -0
- package/common/mod/executor/command/index.js +40 -0
- package/common/mod/executor/custom/executor.json +62 -0
- package/common/mod/executor/custom/index.js +219 -0
- package/common/mod/executor/function/executor.json +51 -0
- package/common/mod/executor/function/index.js +41 -0
- package/common/mod/executor/http/executor.json +81 -0
- package/common/mod/executor/http/index.js +76 -0
- package/common/mod/executor/llm/executor.json +152 -0
- package/common/mod/executor/llm/index.js +231 -0
- package/common/mod/executor/mcp/executor.json +97 -0
- package/common/mod/executor/mcp/index.js +198 -0
- package/common/mod/executor/notify/executor.json +58 -0
- package/common/mod/executor/notify/index.js +30 -0
- package/common/mod/executor/rpc/executor.json +87 -0
- package/common/mod/executor/rpc/index.js +144 -0
- package/common/mod/executor/script/executor.json +55 -0
- package/common/mod/executor/script/index.js +22 -0
- package/common/mod/filter/circuit_breaker/filter.json +86 -0
- package/common/mod/filter/circuit_breaker/index.js +164 -0
- package/common/mod/filter/ip_block/filter.json +49 -0
- package/common/mod/filter/ip_block/index.js +20 -0
- package/common/mod/filter/rate_limit/filter.json +60 -0
- package/common/mod/filter/rate_limit/index.js +49 -0
- package/common/mod/filter/sensitive/filter.json +38 -0
- package/common/mod/filter/sensitive/index.js +29 -0
- package/common/mod/filter/spam/filter.json +48 -0
- package/common/mod/filter/spam/index.js +30 -0
- package/common/mod/filter/sql_inject/filter.json +48 -0
- package/common/mod/filter/sql_inject/index.js +35 -0
- package/common/mod/gateway/alipay/gateway.json +76 -0
- package/common/mod/gateway/alipay/index.js +132 -0
- package/common/mod/gateway/dingtalk/gateway.json +68 -0
- package/common/mod/gateway/dingtalk/index.js +92 -0
- package/common/mod/gateway/email/gateway.json +73 -0
- package/common/mod/gateway/email/index.js +42 -0
- package/common/mod/gateway/push/gateway.json +65 -0
- package/common/mod/gateway/push/index.js +96 -0
- package/common/mod/gateway/sms/gateway.json +72 -0
- package/common/mod/gateway/sms/index.js +109 -0
- package/common/mod/gateway/stripe/gateway.json +64 -0
- package/common/mod/gateway/stripe/index.js +107 -0
- package/common/mod/gateway/wechat/gateway.json +68 -0
- package/common/mod/gateway/wechat/index.js +73 -0
- package/common/mod/gateway/wechat_pay/gateway.json +92 -0
- package/common/mod/gateway/wechat_pay/index.js +200 -0
- package/common/mod/generator/api/generator.json +61 -0
- package/common/mod/generator/api/index.js +41 -0
- package/common/mod/generator/code/generator.json +60 -0
- package/common/mod/generator/code/index.js +81 -0
- package/common/mod/generator/config/generator.json +62 -0
- package/common/mod/generator/config/index.js +51 -0
- package/common/mod/generator/datetime/generator.json +67 -0
- package/common/mod/generator/datetime/index.js +93 -0
- package/common/mod/generator/llm_gen_workflow/generator.json +197 -0
- package/common/mod/generator/llm_gen_workflow/index.js +1066 -0
- package/common/mod/generator/llm_gen_workflow/workflow_prompt.md +162 -0
- package/common/mod/generator/report/generator.json +64 -0
- package/common/mod/generator/report/index.js +51 -0
- package/common/mod/generator/script/generator.json +65 -0
- package/common/mod/generator/script/index.js +53 -0
- package/common/mod/generator/test_data/generator.json +101 -0
- package/common/mod/generator/test_data/index.js +193 -0
- package/common/mod/looper/batch/index.js +24 -0
- package/common/mod/looper/batch/looper.json +45 -0
- package/common/mod/looper/loop/index.js +140 -0
- package/common/mod/looper/loop/looper.json +72 -0
- package/common/mod/looper/loop_retry/index.js +37 -0
- package/common/mod/looper/loop_retry/looper.json +67 -0
- package/common/mod/looper/pagination/index.js +31 -0
- package/common/mod/looper/pagination/looper.json +60 -0
- package/common/mod/looper/schedule/index.js +110 -0
- package/common/mod/looper/schedule/looper.json +74 -0
- package/common/mod/looper/watchdog/index.js +28 -0
- package/common/mod/looper/watchdog/looper.json +53 -0
- package/common/mod/manager/artifact/index.js +161 -0
- package/common/mod/manager/artifact/manager.json +96 -0
- package/common/mod/manager/cache/index.js +62 -0
- package/common/mod/manager/cache/manager.json +72 -0
- package/common/mod/manager/call_log/index.js +145 -0
- package/common/mod/manager/call_log/manager.json +84 -0
- package/common/mod/manager/config/index.js +100 -0
- package/common/mod/manager/config/manager.json +79 -0
- package/common/mod/manager/data/index.js +478 -0
- package/common/mod/manager/data/manager.json +88 -0
- package/common/mod/manager/database/index.js +91 -0
- package/common/mod/manager/database/manager.json +90 -0
- package/common/mod/manager/discovery/index.js +248 -0
- package/common/mod/manager/discovery/manager.json +95 -0
- package/common/mod/manager/file/index.js +56 -0
- package/common/mod/manager/file/manager.json +59 -0
- package/common/mod/manager/git/index.js +133 -0
- package/common/mod/manager/git/manager.json +103 -0
- package/common/mod/manager/json/index.js +133 -0
- package/common/mod/manager/json/manager.json +88 -0
- package/common/mod/manager/json_util.js +121 -0
- package/common/mod/manager/log/index.js +301 -0
- package/common/mod/manager/log/manager.json +108 -0
- package/common/mod/manager/migration/index.js +367 -0
- package/common/mod/manager/migration/manager.json +149 -0
- package/common/mod/manager/module/index.js +70 -0
- package/common/mod/manager/module/manager.json +62 -0
- package/common/mod/manager/mongodb/index.js +80 -0
- package/common/mod/manager/mongodb/manager.json +164 -0
- package/common/mod/manager/mysql/index.js +213 -0
- package/common/mod/manager/mysql/manager.json +117 -0
- package/common/mod/manager/mysql_rw/index.js +239 -0
- package/common/mod/manager/mysql_rw/manager.json +104 -0
- package/common/mod/manager/oss/index.js +261 -0
- package/common/mod/manager/oss/manager.json +111 -0
- package/common/mod/manager/queue/index.js +396 -0
- package/common/mod/manager/queue/manager.json +128 -0
- package/common/mod/manager/redis/index.js +62 -0
- package/common/mod/manager/redis/manager.json +132 -0
- package/common/mod/manager/redis_lock/index.js +211 -0
- package/common/mod/manager/redis_lock/manager.json +90 -0
- package/common/mod/manager/repository/index.js +270 -0
- package/common/mod/manager/repository/manager.json +102 -0
- package/common/mod/manager/sql_dump/index.js +185 -0
- package/common/mod/manager/sql_dump/manager.json +82 -0
- package/common/mod/manager/sqlite/index.js +130 -0
- package/common/mod/manager/sqlite/manager.json +81 -0
- package/common/mod/manager/text/index.js +75 -0
- package/common/mod/manager/text/manager.json +77 -0
- package/common/mod/manager/variables/index.js +73 -0
- package/common/mod/manager/variables/manager.json +67 -0
- package/common/mod/matcher/exact/index.js +21 -0
- package/common/mod/matcher/exact/matcher.json +38 -0
- package/common/mod/matcher/fuzzy/index.js +22 -0
- package/common/mod/matcher/fuzzy/matcher.json +42 -0
- package/common/mod/matcher/mqtt_topic/index.js +88 -0
- package/common/mod/matcher/mqtt_topic/matcher.json +42 -0
- package/common/mod/matcher/prefix/index.js +21 -0
- package/common/mod/matcher/prefix/matcher.json +42 -0
- package/common/mod/matcher/recommend/index.js +85 -0
- package/common/mod/matcher/recommend/matcher.json +54 -0
- package/common/mod/matcher/regex/index.js +31 -0
- package/common/mod/matcher/regex/matcher.json +42 -0
- package/common/mod/matcher/route/index.js +35 -0
- package/common/mod/matcher/route/matcher.json +46 -0
- package/common/mod/matcher/rule_engine/index.js +152 -0
- package/common/mod/matcher/rule_engine/matcher.json +171 -0
- package/common/mod/matcher/similarity/index.js +53 -0
- package/common/mod/matcher/similarity/matcher.json +50 -0
- package/common/mod/matcher/wildcard/index.js +25 -0
- package/common/mod/matcher/wildcard/matcher.json +42 -0
- package/common/mod/observer/audit/index.js +34 -0
- package/common/mod/observer/audit/observer.json +62 -0
- package/common/mod/observer/audit_persist/index.js +86 -0
- package/common/mod/observer/audit_persist/observer.json +82 -0
- package/common/mod/observer/counter/index.js +79 -0
- package/common/mod/observer/counter/observer.json +57 -0
- package/common/mod/observer/event_listen/index.js +131 -0
- package/common/mod/observer/event_listen/observer.json +58 -0
- package/common/mod/observer/health/index.js +99 -0
- package/common/mod/observer/health/observer.json +45 -0
- package/common/mod/observer/log_watch/index.js +24 -0
- package/common/mod/observer/log_watch/observer.json +77 -0
- package/common/mod/observer/metric/index.js +25 -0
- package/common/mod/observer/metric/observer.json +75 -0
- package/common/mod/observer/performance/index.js +45 -0
- package/common/mod/observer/performance/observer.json +66 -0
- package/common/mod/observer/prometheus/index.js +182 -0
- package/common/mod/observer/prometheus/observer.json +108 -0
- package/common/mod/parser/bpmn/index.js +53 -0
- package/common/mod/parser/bpmn/parser.json +49 -0
- package/common/mod/parser/csv/index.js +36 -0
- package/common/mod/parser/csv/parser.json +62 -0
- package/common/mod/parser/form/index.js +24 -0
- package/common/mod/parser/form/parser.json +51 -0
- package/common/mod/parser/json/index.js +28 -0
- package/common/mod/parser/json/parser.json +44 -0
- package/common/mod/parser/protobuf/index.js +47 -0
- package/common/mod/parser/protobuf/parser.json +49 -0
- package/common/mod/parser/protocol/index.js +151 -0
- package/common/mod/parser/protocol/parser.json +67 -0
- package/common/mod/parser/xml/index.js +37 -0
- package/common/mod/parser/xml/parser.json +44 -0
- package/common/mod/parser/yaml/index.js +94 -0
- package/common/mod/parser/yaml/parser.json +44 -0
- package/common/mod/querier/aggregate/index.js +116 -0
- package/common/mod/querier/aggregate/querier.json +62 -0
- package/common/mod/querier/condition/index.js +72 -0
- package/common/mod/querier/condition/querier.json +83 -0
- package/common/mod/querier/module_search/index.js +275 -0
- package/common/mod/querier/module_search/querier.json +83 -0
- package/common/mod/querier/paginate/index.js +24 -0
- package/common/mod/querier/paginate/querier.json +50 -0
- package/common/mod/querier/path/index.js +131 -0
- package/common/mod/querier/path/querier.json +98 -0
- package/common/mod/querier/random/index.js +172 -0
- package/common/mod/querier/random/querier.json +90 -0
- package/common/mod/querier/search/index.js +61 -0
- package/common/mod/querier/search/querier.json +64 -0
- package/common/mod/querier/set/index.js +161 -0
- package/common/mod/querier/set/querier.json +64 -0
- package/common/mod/querier/sort/index.js +41 -0
- package/common/mod/querier/sort/querier.json +69 -0
- package/common/mod/receiver/download/index.js +237 -0
- package/common/mod/receiver/download/receiver.json +92 -0
- package/common/mod/receiver/file/index.js +23 -0
- package/common/mod/receiver/file/receiver.json +91 -0
- package/common/mod/receiver/http/index.js +46 -0
- package/common/mod/receiver/http/receiver.json +77 -0
- package/common/mod/receiver/mqtt/index.js +29 -0
- package/common/mod/receiver/mqtt/receiver.json +68 -0
- package/common/mod/receiver/stream/index.js +20 -0
- package/common/mod/receiver/stream/receiver.json +66 -0
- package/common/mod/receiver/upload/index.js +170 -0
- package/common/mod/receiver/upload/receiver.json +96 -0
- package/common/mod/receiver/webhook/index.js +107 -0
- package/common/mod/receiver/webhook/receiver.json +81 -0
- package/common/mod/receiver/ws/index.js +33 -0
- package/common/mod/receiver/ws/receiver.json +68 -0
- package/common/mod/renderer/component/css_values.json +178 -0
- package/common/mod/renderer/component/index.js +621 -0
- package/common/mod/renderer/component/renderer.json +499 -0
- package/common/mod/renderer/component/var_prefix.json +17 -0
- package/common/mod/renderer/html/index.js +48 -0
- package/common/mod/renderer/html/renderer.json +73 -0
- package/common/mod/renderer/json/index.js +44 -0
- package/common/mod/renderer/json/renderer.json +77 -0
- package/common/mod/renderer/markdown/index.js +48 -0
- package/common/mod/renderer/markdown/renderer.json +73 -0
- package/common/mod/renderer/template/index.js +55 -0
- package/common/mod/renderer/template/renderer.json +82 -0
- package/common/mod/renderer/text/index.js +61 -0
- package/common/mod/renderer/text/renderer.json +78 -0
- package/common/mod/renderer/webpage/index.js +125 -0
- package/common/mod/renderer/webpage/renderer.json +125 -0
- package/common/mod/reviewer/code_review/index.js +96 -0
- package/common/mod/reviewer/code_review/reviewer.json +71 -0
- package/common/mod/reviewer/compliance/index.js +103 -0
- package/common/mod/reviewer/compliance/reviewer.json +59 -0
- package/common/mod/reviewer/image/index.js +61 -0
- package/common/mod/reviewer/image/reviewer.json +59 -0
- package/common/mod/reviewer/logic_verify/index.js +111 -0
- package/common/mod/reviewer/logic_verify/reviewer.json +33 -0
- package/common/mod/reviewer/mock/index.js +228 -0
- package/common/mod/reviewer/mock/reviewer.json +93 -0
- package/common/mod/reviewer/module_check/index.js +395 -0
- package/common/mod/reviewer/module_check/reviewer.json +84 -0
- package/common/mod/reviewer/perf_review/index.js +42 -0
- package/common/mod/reviewer/perf_review/reviewer.json +54 -0
- package/common/mod/reviewer/quality/index.js +66 -0
- package/common/mod/reviewer/quality/reviewer.json +66 -0
- package/common/mod/reviewer/security/index.js +95 -0
- package/common/mod/reviewer/security/reviewer.json +58 -0
- package/common/mod/reviewer/text/index.js +100 -0
- package/common/mod/reviewer/text/reviewer.json +77 -0
- package/common/mod/reviewer/unit_test/index.js +134 -0
- package/common/mod/reviewer/unit_test/reviewer.json +57 -0
- package/common/mod/reviewer/video/index.js +61 -0
- package/common/mod/reviewer/video/reviewer.json +59 -0
- package/common/mod/sender/console/index.js +20 -0
- package/common/mod/sender/console/sender.json +62 -0
- package/common/mod/sender/download/index.js +97 -0
- package/common/mod/sender/download/sender.json +69 -0
- package/common/mod/sender/event_emit/index.js +69 -0
- package/common/mod/sender/event_emit/sender.json +60 -0
- package/common/mod/sender/gateway/index.js +37 -0
- package/common/mod/sender/gateway/sender.json +67 -0
- package/common/mod/sender/http_reply/index.js +57 -0
- package/common/mod/sender/http_reply/sender.json +73 -0
- package/common/mod/sender/log/index.js +18 -0
- package/common/mod/sender/log/sender.json +62 -0
- package/common/mod/sender/mqtt/index.js +62 -0
- package/common/mod/sender/mqtt/sender.json +76 -0
- package/common/mod/sender/push/index.js +36 -0
- package/common/mod/sender/push/sender.json +62 -0
- package/common/mod/sender/push_queue/index.js +116 -0
- package/common/mod/sender/push_queue/sender.json +55 -0
- package/common/mod/sender/upload/index.js +258 -0
- package/common/mod/sender/upload/sender.json +75 -0
- package/common/mod/solidifier/backup/index.js +114 -0
- package/common/mod/solidifier/backup/solidifier.json +61 -0
- package/common/mod/solidifier/compile/index.js +55 -0
- package/common/mod/solidifier/compile/solidifier.json +65 -0
- package/common/mod/solidifier/deploy/index.js +138 -0
- package/common/mod/solidifier/deploy/solidifier.json +107 -0
- package/common/mod/solidifier/encrypt/index.js +133 -0
- package/common/mod/solidifier/encrypt/solidifier.json +59 -0
- package/common/mod/solidifier/firmware/index.js +122 -0
- package/common/mod/solidifier/firmware/solidifier.json +110 -0
- package/common/mod/solidifier/mod_loader/index.js +115 -0
- package/common/mod/solidifier/mod_loader/solidifier.json +45 -0
- package/common/mod/solidifier/package/index.js +109 -0
- package/common/mod/solidifier/package/solidifier.json +63 -0
- package/common/mod/validator/abac/index.js +80 -0
- package/common/mod/validator/abac/validator.json +75 -0
- package/common/mod/validator/basic/index.js +73 -0
- package/common/mod/validator/basic/validator.json +68 -0
- package/common/mod/validator/code/index.js +462 -0
- package/common/mod/validator/code/validator.json +68 -0
- package/common/mod/validator/enum/index.js +22 -0
- package/common/mod/validator/enum/validator.json +50 -0
- package/common/mod/validator/json/index.js +181 -0
- package/common/mod/validator/json/validator.json +64 -0
- package/common/mod/validator/jwt/index.js +109 -0
- package/common/mod/validator/jwt/validator.json +90 -0
- package/common/mod/validator/length/index.js +61 -0
- package/common/mod/validator/length/validator.json +52 -0
- package/common/mod/validator/oauth/index.js +170 -0
- package/common/mod/validator/oauth/validator.json +85 -0
- package/common/mod/validator/params/index.js +99 -0
- package/common/mod/validator/params/validator.json +91 -0
- package/common/mod/validator/pattern/index.js +58 -0
- package/common/mod/validator/pattern/validator.json +51 -0
- package/common/mod/validator/range/index.js +112 -0
- package/common/mod/validator/range/validator.json +78 -0
- package/common/mod/validator/rbac/index.js +92 -0
- package/common/mod/validator/rbac/validator.json +73 -0
- package/common/mod/validator/required/index.js +37 -0
- package/common/mod/validator/required/validator.json +45 -0
- package/common/mod/validator/sanitize/index.js +124 -0
- package/common/mod/validator/sanitize/validator.json +82 -0
- package/common/mod/validator/string/index.js +75 -0
- package/common/mod/validator/string/validator.json +61 -0
- package/common/mod/validator/type/index.js +21 -0
- package/common/mod/validator/type/validator.json +53 -0
- package/common/workflow/wftest_1789472356864/ok_wf.json +20 -0
- package/common/workflow/wftest_1789472356864/suggest_h.json +14 -0
- package/common/workflow/wftest_1789472528456/ok_wf.json +20 -0
- package/common/workflow/wftest_1789472528456/suggest_h.json +14 -0
- package/common/workflow/wftest_1789472914308/ok_wf.json +20 -0
- package/common/workflow/wftest_1789472914308/suggest_h.json +14 -0
- package/common/workflow/wftest_1789472926735/ok_wf.json +20 -0
- package/common/workflow/wftest_1789472926735/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473005165/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473005165/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473128440/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473128440/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473140984/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473140984/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473444205/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473444205/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473632028/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473632028/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473735755/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473735755/suggest_h.json +14 -0
- package/common/workflow/wftest_1789473793373/ok_wf.json +20 -0
- package/common/workflow/wftest_1789473793373/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474054650/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474054650/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474139961/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474139961/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474522109/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474522109/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474695647/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474695647/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474822920/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474822920/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474863955/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474863955/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474920642/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474920642/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474948523/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474948523/suggest_h.json +14 -0
- package/common/workflow/wftest_1789474977320/ok_wf.json +20 -0
- package/common/workflow/wftest_1789474977320/suggest_h.json +14 -0
- package/common/workflow/wftest_1789475013956/ok_wf.json +20 -0
- package/common/workflow/wftest_1789475013956/suggest_h.json +14 -0
- package/common/workflow/wftest_1789476776624/ok_wf.json +20 -0
- package/common/workflow/wftest_1789476776624/suggest_h.json +14 -0
- package/common/workflow/wftest_1789477074699/ok_wf.json +20 -0
- package/common/workflow/wftest_1789477074699/suggest_h.json +14 -0
- package/common/workflow/wftest_1789478655100/ok_wf.json +20 -0
- package/common/workflow/wftest_1789478655100/suggest_h.json +14 -0
- package/common/workflow/wftest_1789499010987/ok_wf.json +20 -0
- package/common/workflow/wftest_1789499010987/suggest_h.json +14 -0
- package/common/workflow/wftest_1789519488954/ok_wf.json +20 -0
- package/common/workflow/wftest_1789519488954/suggest_h.json +14 -0
- package/docs/API/345/217/202/350/200/203.md +146 -0
- package/docs/Blockly/346/230/240/345/260/204/346/226/271/346/241/210.md +213 -0
- package/docs/LLM/351/233/206/346/210/220/346/214/207/345/215/227.md +29 -0
- package/docs/Workflow/347/274/226/345/206/231/346/214/207/345/215/227.md +194 -0
- package/docs/ctx/344/270/212/344/270/213/346/226/207/350/257/246/350/247/243.md +256 -0
- package/docs//344/272/214/346/254/241/345/274/200/345/217/221/346/214/207/345/215/227.md +151 -0
- package/docs//345/244/232/345/215/217/350/256/256/350/247/246/345/217/221/346/214/207/345/215/227.md +272 -0
- package/docs//345/256/236/346/210/230/346/241/210/344/276/213.md +392 -0
- package/docs//345/267/245/344/275/234/346/265/201/350/246/206/347/233/226/345/210/206/346/236/220.md +585 -0
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243.md +200 -0
- package/docs//345/277/253/351/200/237/345/274/200/345/247/213.md +66 -0
- package/docs//346/234/200/344/275/263/345/256/236/350/267/265.md +265 -0
- package/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +29 -0
- package/docs//346/240/270/345/277/203/346/246/202/345/277/265.md +194 -0
- package/docs//346/250/241/345/235/227/344/275/223/347/263/273/350/257/264/346/230/216.md +111 -0
- package/docs//346/250/241/345/235/227/346/270/205/345/215/225.md +288 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212/AI/345/267/245/344/275/234/346/265/201/347/224/237/346/210/220/346/210/220/346/234/254/345/210/206/346/236/220.md +234 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212/CM/345/207/275/346/225/260/345/244/247/345/205/250.md +93 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212/RPG_Maker_/344/272/213/344/273/266/350/204/232/346/234/254/345/257/271/346/257/224/345/210/206/346/236/220.md +734 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//344/270/211/345/233/275/346/235/200/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +379 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//344/277/256/344/273/231/345/206/263/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +256 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//344/277/256/344/273/231/347/211/210/345/215/241/347/211/214/346/270/270/346/210/217.md +355 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/206/222/351/231/251/345/262/233CM/345/207/275/346/225/260/345/210/206/346/236/220.md +81 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/206/222/351/231/251/345/262/233NPC/350/204/232/346/234/254/346/224/257/346/214/201/345/210/206/346/236/220.md +365 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/244/247/351/203/250/345/210/206/351/200/232/347/224/250/346/250/241/345/235/227/345/210/206/346/236/220.md +33 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/260/217/345/225/206/345/272/227/351/234/200/346/261/202/350/247/204/346/240/274.md +577 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//346/250/241/346/213/237/344/272/272/347/224/237/346/201/213/347/210/261/345/205/273/346/210/220RPG/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +314 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//346/255/243/345/274/217/345/217/257/347/224/250/345/267/256/350/267/235/345/210/206/346/236/220.md +463 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//346/270/270/346/210/217/347/216/213/345/215/241/347/211/214/346/270/270/346/210/217/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +673 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//350/264/252/345/251/252/344/271/213/345/262/233/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +405 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//350/264/252/345/251/252/344/271/213/345/262/233/347/262/276/347/256/200/347/211/210/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +289 -0
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//351/207/215/350/243/205/346/234/272/345/205/265/346/226/207/345/255/227/347/211/210/346/270/270/346/210/217.md +417 -0
- package/docs//350/260/203/350/257/225/344/270/216/346/216/222/351/224/231.md +255 -0
- package/example/common/mod/executor/effect/executor.json +58 -0
- package/example/common/mod/executor/effect/index.js +93 -0
- package/example/common/mod/executor/warp/executor.json +57 -0
- package/example/common/mod/executor/warp/index.js +73 -0
- package/example/common/mod/manager/inventory/index.js +205 -0
- package/example/common/mod/manager/inventory/manager.json +70 -0
- package/example/common/mod/manager/persistence/index.js +176 -0
- package/example/common/mod/manager/persistence/manager.json +67 -0
- package/example/common/mod/manager/player/index.js +187 -0
- package/example/common/mod/manager/player/manager.json +102 -0
- package/example/common/mod/manager/quest/index.js +196 -0
- package/example/common/mod/manager/quest/manager.json +50 -0
- package/example/common/mod/manager/shop/index.js +66 -0
- package/example/common/mod/manager/shop/manager.json +44 -0
- package/example/common/mod/manager/skill/index.js +143 -0
- package/example/common/mod/manager/skill/manager.json +82 -0
- package/example/common/script/demo/index.js +16 -0
- package/example/common/script/demo/script.json +21 -0
- package/example/common/workflow/admin/dashboard.json +87 -0
- package/example/common/workflow/admin/order_deliver.json +99 -0
- package/example/common/workflow/admin/order_list.json +79 -0
- package/example/common/workflow/admin/product_off.json +85 -0
- package/example/common/workflow/admin/product_on.json +85 -0
- package/example/common/workflow/admin/user_list.json +68 -0
- package/example/common/workflow/cart/add.json +86 -0
- package/example/common/workflow/cart/checkout.json +120 -0
- package/example/common/workflow/cart/del.json +47 -0
- package/example/common/workflow/cart/list.json +55 -0
- package/example/common/workflow/cart/set.json +106 -0
- package/example/common/workflow/db/create_table.json +57 -0
- package/example/common/workflow/db/mysql_query.json +47 -0
- package/example/common/workflow/db/sqlite_crud.json +48 -0
- package/example/common/workflow/npc/blacksmith.json +91 -0
- package/example/common/workflow/npc/quest_giver.json +136 -0
- package/example/common/workflow/order/create.json +76 -0
- package/example/common/workflow/order/create_bpmn.json +105 -0
- package/example/common/workflow/order/history.json +69 -0
- package/example/common/workflow/payment/process.json +74 -0
- package/example/common/workflow/product/add.json +72 -0
- package/example/common/workflow/product/categories.json +41 -0
- package/example/common/workflow/product/count.json +65 -0
- package/example/common/workflow/product/del.json +84 -0
- package/example/common/workflow/product/get.json +59 -0
- package/example/common/workflow/product/list.json +80 -0
- package/example/common/workflow/product/search.json +59 -0
- package/example/common/workflow/product/set.json +87 -0
- package/example/common/workflow/shop/create.json +70 -0
- package/example/common/workflow/shop/del.json +84 -0
- package/example/common/workflow/shop/get.json +43 -0
- package/example/common/workflow/shop/list.json +80 -0
- package/example/common/workflow/shop/products.json +69 -0
- package/example/common/workflow/shop/set.json +64 -0
- package/example/common/workflow/system/monitor.json +62 -0
- package/example/common/workflow/user/address_add.json +49 -0
- package/example/common/workflow/user/address_list.json +44 -0
- package/example/common/workflow/user/change_password.json +87 -0
- package/example/common/workflow/user/login.json +83 -0
- package/example/common/workflow/user/profile.json +71 -0
- package/example/common/workflow/user/register.json +77 -0
- package/example/config +122 -0
- package/example/config.json +94 -0
- package/example/data/model/bag.json +28 -0
- package/example/data/model/character.json +38 -0
- package/example/data/model/quest.json +14 -0
- package/example/data/model/save.json +10 -0
- package/example/data/model/shop.json +14 -0
- package/example/data/model/skill.json +28 -0
- package/example/data/test.js +376 -0
- package/example/db/mm.db +0 -0
- package/example/db/mm.db-shm +0 -0
- package/example/db/mm.db-wal +0 -0
- package/example/db/sql/ecommerce.sql +84 -0
- package/example/db/sql/game.sql +72 -0
- package/example/ecom_out.txt +0 -0
- package/example/ecommerce.js +450 -0
- package/example/index.js +262 -0
- package/example/npc_demo.js +361 -0
- package/index.js +176 -7
- package/kernel/blockly_converter.js +905 -0
- package/kernel/blockly_defs.js +324 -0
- package/kernel/bpmn_engine.js +100 -0
- package/kernel/bpmn_mapper.js +535 -0
- package/kernel/bpmn_parser.js +306 -0
- package/kernel/kernel.js +490 -0
- package/kernel/kernel_catalog.js +312 -0
- package/kernel/kernel_config.js +100 -0
- package/kernel/kernel_graph.js +583 -0
- package/kernel/kernel_validator.js +460 -0
- package/kernel/limiter.js +71 -0
- package/kernel/metrics.js +59 -0
- package/kernel/protocol_adapter.js +40 -0
- package/kernel/require_util.js +152 -0
- package/kernel/workflow_engine.js +1398 -0
- package/kernel/workflow_loader.js +165 -0
- package/kernel/workflow_normalizer.js +31 -0
- package/kernel/workflow_state.js +243 -0
- package/llm.js +257 -0
- package/package.json +27 -14
- package/runtime.js +163 -0
- package/scan_modules.js +124 -0
- package/scripts/add_type_field.js +153 -0
- package/scripts/create_project.js +276 -0
- package/scripts/generate_mod.js +229 -0
- package/templates/db/backup_table.json +52 -0
- package/templates/db/create_table.json +68 -0
- package/templates/db/crud_sqlite.json +98 -0
- package/templates/db/db_sqlite.json +52 -0
- package/templates/db/ecommerce.sql +87 -0
- package/templates/db/export_table.json +51 -0
- package/templates/demo/hello.json +47 -0
- package/templates/demo/http_demo.json +48 -0
- package/templates/demo/llm_chat.json +44 -0
- package/templates/demo/render_demo.json +46 -0
- package/templates/demo/validator_demo.json +64 -0
- package/templates/order/create.json +113 -0
- package/templates/user_account/add.json +92 -0
- package/templates/user_account/count.json +24 -0
- package/templates/user_account/del.json +38 -0
- package/templates/user_account/get.json +48 -0
- package/templates/user_account/init.json +76 -0
- package/templates/user_account/list.json +48 -0
- package/templates/user_account/set.json +65 -0
- package/templates/user_account/user_account.sql +21 -0
- package/test.js +213 -0
- package/README.en.md +0 -36
- package/demo/index.js +0 -38
- package/demo/test_data.json +0 -32
- package/lib/compiler.js +0 -259
- package/lib/editor.js +0 -66
- package/lib/engine.js +0 -217
- package/lib/javascript.js +0 -29
- package/lib/python.js +0 -30
- package/lib/workflow.js +0 -9
- package/lib/workflow.json +0 -421
- package/test_function_call.js +0 -40
- package/test_var_extraction.js +0 -11
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "component",
|
|
3
|
+
"title": "组件渲染器",
|
|
4
|
+
"description": "生成带强约束的网页组件,支持 normal/vue/react/art 模式。适用场景:需要命名规范、样式统一的前端组件时。工作流提示:name 填组件名,mode 选模式,content 填组件内容,data_model 定义数据模型(键为小写蛇形),js_functions 函数名须小驼峰、参数名小写蛇形,css_selectors 选择器须 _ 连接。",
|
|
5
|
+
"params": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "组件名称,normal/art为class名(vue/react会自动转为PascalCase)",
|
|
11
|
+
"default": "component"
|
|
12
|
+
},
|
|
13
|
+
"mode": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "生成模式: normal(三文件) / vue(.vue单文件) / react(.jsx单文件) / art(.art单文件)",
|
|
16
|
+
"default": "normal",
|
|
17
|
+
"enum": [
|
|
18
|
+
"normal",
|
|
19
|
+
"vue",
|
|
20
|
+
"react",
|
|
21
|
+
"art"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"content": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "组件内容片段。normal为HTML,vue为Vue模板语法,react为JSX,art为ART模板语法({{变量}}/{{each}}/{{if}}等)",
|
|
27
|
+
"default": ""
|
|
28
|
+
},
|
|
29
|
+
"data_model": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"description": "组件数据模型,key为变量名(小写蛇形)。vue自动生成defineProps,react生成JSDoc+参数解构,art生成注释文档",
|
|
32
|
+
"default": {},
|
|
33
|
+
"additionalProperties": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"type": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "数据类型",
|
|
39
|
+
"enum": [
|
|
40
|
+
"string",
|
|
41
|
+
"number",
|
|
42
|
+
"boolean",
|
|
43
|
+
"object",
|
|
44
|
+
"array"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"description": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "字段中文描述"
|
|
50
|
+
},
|
|
51
|
+
"default": {
|
|
52
|
+
"description": "默认值,类型须与type一致"
|
|
53
|
+
},
|
|
54
|
+
"required": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "是否必填",
|
|
57
|
+
"default": false
|
|
58
|
+
},
|
|
59
|
+
"enum": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"description": "可选值范围,值类型须与type一致"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"type",
|
|
66
|
+
"description"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"dir": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "输出目录路径",
|
|
73
|
+
"default": ""
|
|
74
|
+
},
|
|
75
|
+
"html_file": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "HTML文件名",
|
|
78
|
+
"default": "component.html"
|
|
79
|
+
},
|
|
80
|
+
"css_file": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "CSS文件名",
|
|
83
|
+
"default": "component.css"
|
|
84
|
+
},
|
|
85
|
+
"js_file": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "JS文件名",
|
|
88
|
+
"default": "component.js"
|
|
89
|
+
},
|
|
90
|
+
"common_css_file": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "通用样式文件名",
|
|
93
|
+
"default": "common.css"
|
|
94
|
+
},
|
|
95
|
+
"css_selectors": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"description": "自定义CSS选择器列表,选择器名称须用_连接的小写字母,样式值须在可选范围内",
|
|
98
|
+
"default": [],
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"properties": {
|
|
102
|
+
"name": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "选择器名称,必须为_连接的小写字母(如card_header、list_item)",
|
|
105
|
+
"pattern": "^[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*$"
|
|
106
|
+
},
|
|
107
|
+
"styles": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"description": "选择器的CSS样式,属性和值约束与根级css相同",
|
|
110
|
+
"default": {},
|
|
111
|
+
"properties": {
|
|
112
|
+
"padding": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "内边距: none(0) / mini(0.25rem) / small(0.5rem) / medium(1rem) / large(1.5rem) / huge(2rem)",
|
|
115
|
+
"enum": [
|
|
116
|
+
"none",
|
|
117
|
+
"mini",
|
|
118
|
+
"small",
|
|
119
|
+
"medium",
|
|
120
|
+
"large",
|
|
121
|
+
"huge"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"margin": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "外边距: none(0) / mini(0.25rem) / small(0.5rem) / medium(1rem) / large(1.5rem) / huge(2rem)",
|
|
127
|
+
"enum": [
|
|
128
|
+
"none",
|
|
129
|
+
"mini",
|
|
130
|
+
"small",
|
|
131
|
+
"medium",
|
|
132
|
+
"large",
|
|
133
|
+
"huge"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"display": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "显示方式",
|
|
139
|
+
"enum": [
|
|
140
|
+
"block",
|
|
141
|
+
"inline",
|
|
142
|
+
"flex",
|
|
143
|
+
"grid"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"text_align": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"description": "文本对齐",
|
|
149
|
+
"enum": [
|
|
150
|
+
"left",
|
|
151
|
+
"center",
|
|
152
|
+
"right",
|
|
153
|
+
"justify"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"font_weight": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "字重",
|
|
159
|
+
"enum": [
|
|
160
|
+
"normal",
|
|
161
|
+
"bold"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"font_color": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"description": "字体颜色: transparent / white(#fff) / light(#f5f5f5) / gray(#999) / dark(#333) / black(#000) / primary(#1890ff) / secondary(#6c757d) / success(#52c41a) / warning(#faad14) / danger(#f5222d) / accent(#722ed1)",
|
|
167
|
+
"enum": [
|
|
168
|
+
"transparent",
|
|
169
|
+
"white",
|
|
170
|
+
"light",
|
|
171
|
+
"gray",
|
|
172
|
+
"dark",
|
|
173
|
+
"black",
|
|
174
|
+
"primary",
|
|
175
|
+
"secondary",
|
|
176
|
+
"success",
|
|
177
|
+
"warning",
|
|
178
|
+
"danger",
|
|
179
|
+
"accent"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"font_size": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "字号: mini(0.625rem) / small(0.75rem) / medium(1rem) / large(1.25rem) / huge(1.5rem)",
|
|
185
|
+
"enum": [
|
|
186
|
+
"mini",
|
|
187
|
+
"small",
|
|
188
|
+
"medium",
|
|
189
|
+
"large",
|
|
190
|
+
"huge"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"border_style": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"description": "边框样式",
|
|
196
|
+
"enum": [
|
|
197
|
+
"none",
|
|
198
|
+
"solid",
|
|
199
|
+
"dashed",
|
|
200
|
+
"dotted"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"border_width": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "边框粗细",
|
|
206
|
+
"enum": [
|
|
207
|
+
"none",
|
|
208
|
+
"thin",
|
|
209
|
+
"medium",
|
|
210
|
+
"thick"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"border_radius": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "圆角: none(0) / mini(0.125rem) / small(0.25rem) / medium(0.5rem) / large(0.75rem) / round(50%)",
|
|
216
|
+
"enum": [
|
|
217
|
+
"none",
|
|
218
|
+
"mini",
|
|
219
|
+
"small",
|
|
220
|
+
"medium",
|
|
221
|
+
"large",
|
|
222
|
+
"round"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"shadow": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"description": "阴影: none / mini / small / medium / large / huge",
|
|
228
|
+
"enum": [
|
|
229
|
+
"none",
|
|
230
|
+
"mini",
|
|
231
|
+
"small",
|
|
232
|
+
"medium",
|
|
233
|
+
"large",
|
|
234
|
+
"huge"
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"bg_color": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "背景色: transparent / white(#fff) / light(#f5f5f5) / gray(#999) / dark(#333) / black(#000) / primary(#1890ff) / secondary(#6c757d) / success(#52c41a) / warning(#faad14) / danger(#f5222d) / accent(#722ed1)",
|
|
240
|
+
"enum": [
|
|
241
|
+
"transparent",
|
|
242
|
+
"white",
|
|
243
|
+
"light",
|
|
244
|
+
"gray",
|
|
245
|
+
"dark",
|
|
246
|
+
"black",
|
|
247
|
+
"primary",
|
|
248
|
+
"secondary",
|
|
249
|
+
"success",
|
|
250
|
+
"warning",
|
|
251
|
+
"danger",
|
|
252
|
+
"accent"
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"width": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "宽度: none(0) / auto / full(100%) / half(50%) / third(33.33%) / quarter(25%)",
|
|
258
|
+
"enum": [
|
|
259
|
+
"none",
|
|
260
|
+
"auto",
|
|
261
|
+
"full",
|
|
262
|
+
"half",
|
|
263
|
+
"third",
|
|
264
|
+
"quarter"
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
"height": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"description": "高度: none(0) / auto / full(100%) / mini(6.25rem) / small(12.5rem) / medium(25rem) / large(37.5rem) / huge(50rem)",
|
|
270
|
+
"enum": [
|
|
271
|
+
"none",
|
|
272
|
+
"auto",
|
|
273
|
+
"full",
|
|
274
|
+
"mini",
|
|
275
|
+
"small",
|
|
276
|
+
"medium",
|
|
277
|
+
"large",
|
|
278
|
+
"huge"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"min_width": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"description": "最小宽度: none(0) / mini(6.25rem) / small(12.5rem) / medium(25rem) / large(37.5rem) / huge(50rem)",
|
|
284
|
+
"enum": [
|
|
285
|
+
"none",
|
|
286
|
+
"mini",
|
|
287
|
+
"small",
|
|
288
|
+
"medium",
|
|
289
|
+
"large",
|
|
290
|
+
"huge"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"max_width": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"description": "最大宽度: none(0) / mini(6.25rem) / small(12.5rem) / medium(25rem) / large(37.5rem) / huge(50rem)",
|
|
296
|
+
"enum": [
|
|
297
|
+
"none",
|
|
298
|
+
"mini",
|
|
299
|
+
"small",
|
|
300
|
+
"medium",
|
|
301
|
+
"large",
|
|
302
|
+
"huge"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"border_color": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"description": "边框颜色",
|
|
308
|
+
"enum": [
|
|
309
|
+
"transparent",
|
|
310
|
+
"white",
|
|
311
|
+
"light",
|
|
312
|
+
"gray",
|
|
313
|
+
"dark",
|
|
314
|
+
"black",
|
|
315
|
+
"primary",
|
|
316
|
+
"secondary",
|
|
317
|
+
"success",
|
|
318
|
+
"warning",
|
|
319
|
+
"danger",
|
|
320
|
+
"accent"
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
"gap": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"description": "间距: none(0) / mini(0.25rem) / small(0.5rem) / medium(1rem) / large(1.5rem) / huge(2rem)",
|
|
326
|
+
"enum": [
|
|
327
|
+
"none",
|
|
328
|
+
"mini",
|
|
329
|
+
"small",
|
|
330
|
+
"medium",
|
|
331
|
+
"large",
|
|
332
|
+
"huge"
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
"overflow": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"description": "溢出处理",
|
|
338
|
+
"enum": [
|
|
339
|
+
"visible",
|
|
340
|
+
"hidden",
|
|
341
|
+
"scroll",
|
|
342
|
+
"auto"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
"cursor": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"description": "鼠标样式",
|
|
348
|
+
"enum": [
|
|
349
|
+
"default",
|
|
350
|
+
"pointer",
|
|
351
|
+
"text",
|
|
352
|
+
"not-allowed"
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
"line_height": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "行高: normal / tight(1.25) / medium(1.5) / loose(1.75)",
|
|
358
|
+
"enum": [
|
|
359
|
+
"normal",
|
|
360
|
+
"tight",
|
|
361
|
+
"medium",
|
|
362
|
+
"loose"
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
"opacity": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"description": "透明度: none(0) / low(0.25) / medium(0.5) / high(0.75) / full(1)",
|
|
368
|
+
"enum": [
|
|
369
|
+
"none",
|
|
370
|
+
"low",
|
|
371
|
+
"medium",
|
|
372
|
+
"high",
|
|
373
|
+
"full"
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"required": [
|
|
380
|
+
"name",
|
|
381
|
+
"styles"
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"js_functions": {
|
|
386
|
+
"type": "array",
|
|
387
|
+
"description": "JS函数列表,函数名须小驼峰,参数名须小写蛇形",
|
|
388
|
+
"default": [],
|
|
389
|
+
"items": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"properties": {
|
|
392
|
+
"name": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"description": "函数名,必须为小驼峰(如handleClick、getUserData)",
|
|
395
|
+
"pattern": "^[a-z][a-zA-Z0-9]*$"
|
|
396
|
+
},
|
|
397
|
+
"params": {
|
|
398
|
+
"type": "array",
|
|
399
|
+
"description": "参数名列表,每个参数名必须为小写蛇形(如user_id、event_data)",
|
|
400
|
+
"default": [],
|
|
401
|
+
"items": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"pattern": "^[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*$"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"body": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"description": "函数体代码",
|
|
409
|
+
"default": ""
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"required": [
|
|
413
|
+
"name"
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"save_file": {
|
|
418
|
+
"type": "boolean",
|
|
419
|
+
"description": "是否保存为文件,为true时写入磁盘并返回文件路径,为false时返回渲染内容",
|
|
420
|
+
"default": false
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": []
|
|
424
|
+
},
|
|
425
|
+
"returns": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"description": "渲染结果,正常时包含 result 业务数据,异常时包含 error",
|
|
428
|
+
"properties": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"description": "渲染结果",
|
|
431
|
+
"properties": {
|
|
432
|
+
"html": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"description": "HTML文件的绝对路径"
|
|
435
|
+
},
|
|
436
|
+
"css": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"description": "CSS文件的绝对路径"
|
|
439
|
+
},
|
|
440
|
+
"js": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"description": "JS文件的绝对路径"
|
|
443
|
+
},
|
|
444
|
+
"error": {
|
|
445
|
+
"type": "object",
|
|
446
|
+
"description": "错误信息,仅调用出错时返回",
|
|
447
|
+
"properties": {
|
|
448
|
+
"code": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"description": "错误码: RENDER_COMPONENT"
|
|
451
|
+
},
|
|
452
|
+
"message": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"description": "错误描述"
|
|
455
|
+
},
|
|
456
|
+
"stack": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"description": "错误堆栈,定位具体出错位置"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"options": {
|
|
466
|
+
"dir": {
|
|
467
|
+
"type": "string",
|
|
468
|
+
"description": "normal模式预设输出目录",
|
|
469
|
+
"default": "./static/template/component"
|
|
470
|
+
},
|
|
471
|
+
"art_dir": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"description": "art模式预设输出目录",
|
|
474
|
+
"default": "./static/template/default/component"
|
|
475
|
+
},
|
|
476
|
+
"vue_dir": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"description": "vue模式预设输出目录",
|
|
479
|
+
"default": "./static/src/components"
|
|
480
|
+
},
|
|
481
|
+
"react_dir": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"description": "react模式预设输出目录",
|
|
484
|
+
"default": "./static/src/components"
|
|
485
|
+
},
|
|
486
|
+
"common_css_dir": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"description": "通用样式输出目录",
|
|
489
|
+
"default": "./static/template/css"
|
|
490
|
+
},
|
|
491
|
+
"common_js_dir": {
|
|
492
|
+
"type": "string",
|
|
493
|
+
"description": "通用脚本输出目录",
|
|
494
|
+
"default": "./static/template/js"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"group": "web",
|
|
498
|
+
"type": "core"
|
|
499
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"padding": "--pad",
|
|
3
|
+
"margin": "--mgn",
|
|
4
|
+
"bg_color": "--bg",
|
|
5
|
+
"font_color": "--fc",
|
|
6
|
+
"font_size": "--fs",
|
|
7
|
+
"border_radius": "--br",
|
|
8
|
+
"shadow": "--shd",
|
|
9
|
+
"width": "--w",
|
|
10
|
+
"height": "--h",
|
|
11
|
+
"min_width": "--min_w",
|
|
12
|
+
"max_width": "--max_w",
|
|
13
|
+
"border_color": "--bc",
|
|
14
|
+
"gap": "--gap",
|
|
15
|
+
"line_height": "--lh",
|
|
16
|
+
"opacity": "--op"
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML渲染器
|
|
3
|
+
* 将模板与数据渲染为HTML并写入文件
|
|
4
|
+
* @param {object} ctx 上下文对象
|
|
5
|
+
* @param {object} params 步骤参数
|
|
6
|
+
* @returns {object} 包含文件路径的结果
|
|
7
|
+
*/
|
|
8
|
+
async function main(params, ctx) {
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
const options = ctx.options || {};
|
|
13
|
+
const template = params.template || '';
|
|
14
|
+
const data = params.data || {};
|
|
15
|
+
const dir = params.dir || options.dir || './output';
|
|
16
|
+
const file = params.file || 'output.html';
|
|
17
|
+
const save_file = params.save_file !== undefined ? params.save_file : false;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const html = template.replace(/\{\{(\w+)\}\}/g, function (match, key) {
|
|
21
|
+
if (data[key] !== undefined) {
|
|
22
|
+
return data[key];
|
|
23
|
+
}
|
|
24
|
+
return match;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (save_file) {
|
|
28
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
29
|
+
const file_path = path.resolve(dir, file);
|
|
30
|
+
fs.writeFileSync(file_path, html, 'utf-8');
|
|
31
|
+
ctx.output = { html: file_path };
|
|
32
|
+
} else {
|
|
33
|
+
ctx.output = { html: html };
|
|
34
|
+
}
|
|
35
|
+
return ctx.output;
|
|
36
|
+
} catch (error) {
|
|
37
|
+
ctx.output = {
|
|
38
|
+
error: {
|
|
39
|
+
code: 'RENDER_HTML',
|
|
40
|
+
message: 'HTML渲染失败: ' + error.message,
|
|
41
|
+
stack: error.stack
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return ctx.output;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
module.exports = { main };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "html",
|
|
3
|
+
"title": "HTML渲染器",
|
|
4
|
+
"description": "将模板与数据渲染为 HTML 并写入文件。适用场景:生成静态页面、报表页面、邮件模板等 HTML 输出时。工作流提示:template 填 HTML 模板({{key}} 占位),data 填渲染数据,dir/file 指定路径与文件名,save_file 为 true 返回文件路径,false 返回内容。",
|
|
5
|
+
"type": "core",
|
|
6
|
+
"params": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"data": {
|
|
10
|
+
"description": "待渲染数据"
|
|
11
|
+
},
|
|
12
|
+
"template": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "HTML模板,使用 {{key}} 占位",
|
|
15
|
+
"default": ""
|
|
16
|
+
},
|
|
17
|
+
"dir": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "输出目录路径",
|
|
20
|
+
"default": ""
|
|
21
|
+
},
|
|
22
|
+
"file": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "输出文件名",
|
|
25
|
+
"default": "output.html"
|
|
26
|
+
},
|
|
27
|
+
"save_file": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "是否保存为文件,为true时写入磁盘并返回文件路径,为false时返回渲染内容",
|
|
30
|
+
"default": false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": [
|
|
34
|
+
"data"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"returns": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "渲染结果,正常时包含 result 业务数据,异常时包含 error",
|
|
40
|
+
"properties": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "渲染结果",
|
|
43
|
+
"properties": {
|
|
44
|
+
"html": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "输出文件的绝对路径"
|
|
47
|
+
},
|
|
48
|
+
"error": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "错误信息,仅调用出错时返回",
|
|
51
|
+
"properties": {
|
|
52
|
+
"code": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "错误码: RENDER_HTML"
|
|
55
|
+
},
|
|
56
|
+
"message": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "错误描述"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"options": {
|
|
66
|
+
"dir": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "预设输出目录",
|
|
69
|
+
"default": "./output"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"group": "web"
|
|
73
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON渲染器
|
|
3
|
+
* 将数据序列化为JSON并写入文件
|
|
4
|
+
* @param {object} ctx 上下文对象
|
|
5
|
+
* @param {object} params 步骤参数
|
|
6
|
+
* @returns {object} 包含文件路径的结果
|
|
7
|
+
*/
|
|
8
|
+
async function main(params, ctx) {
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
const options = ctx.options || {};
|
|
13
|
+
const data = params.data;
|
|
14
|
+
const pretty = params.pretty !== undefined ? params.pretty : true;
|
|
15
|
+
const dir = params.dir || options.dir || './output';
|
|
16
|
+
const file = params.file || 'output.json';
|
|
17
|
+
const save_file = params.save_file !== undefined ? params.save_file : false;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const json = JSON.stringify(data, null, pretty ? 2 : 0);
|
|
21
|
+
const size = Buffer.byteLength(json, 'utf-8');
|
|
22
|
+
|
|
23
|
+
if (save_file) {
|
|
24
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
25
|
+
const file_path = path.resolve(dir, file);
|
|
26
|
+
fs.writeFileSync(file_path, json, 'utf-8');
|
|
27
|
+
ctx.output = { json: file_path, size: size };
|
|
28
|
+
} else {
|
|
29
|
+
ctx.output = { json: json, size: size };
|
|
30
|
+
}
|
|
31
|
+
return ctx.output;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
ctx.output = {
|
|
34
|
+
error: {
|
|
35
|
+
code: 'RENDER_JSON',
|
|
36
|
+
message: 'JSON渲染失败: ' + error.message,
|
|
37
|
+
stack: error.stack
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return ctx.output;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = { main };
|