bpmax-cli 0.1.44 → 0.2.1-beta.1
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 +52 -5
- package/dist/bin.js +11966 -1320
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-skills.mjs +98 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +226 -0
- package/skills/bpmax-ai-taskbook/agents/openai.yaml +3 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +68 -0
- package/skills/bpmax-api-platform-editor/SKILL.md +321 -0
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +34 -0
- package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +41 -0
- package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +41 -0
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +52 -0
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +32 -0
- package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +1276 -0
- package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +64 -0
- package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +40 -0
- package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +212 -0
- package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +62 -0
- package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +75 -0
- package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +287 -0
- package/skills/bpmax-approval-matrix/SKILL.md +87 -0
- package/skills/bpmax-auth/SKILL.md +6 -17
- package/skills/bpmax-builder-shared/SKILL.md +44 -0
- package/skills/bpmax-builder-shared/base_url.py +81 -0
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +71 -0
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +34 -0
- package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +123 -0
- package/skills/bpmax-builder-shared/runtime_script_rules.py +272 -0
- package/skills/bpmax-builder-shared/skill_audit.py +374 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +280 -0
- package/skills/bpmax-builder-shared/tests/test_base_url.py +80 -0
- package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +115 -0
- package/skills/bpmax-builder-shared/tests/test_skill_audit.py +231 -0
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +281 -0
- package/skills/bpmax-cli/SKILL.md +5 -0
- package/skills/bpmax-config-latest/SKILL.md +71 -0
- package/skills/bpmax-console-template-editor/SKILL.md +536 -0
- package/skills/bpmax-console-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-console-template-editor/references/filter-integration.md +60 -0
- package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +114 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +69 -0
- package/skills/bpmax-console-template-editor/references/module-catalog.md +100 -0
- package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +91 -0
- package/skills/bpmax-console-template-editor/references/template-shape.md +149 -0
- package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +33 -0
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +964 -0
- package/skills/bpmax-console-template-editor/scripts/export_console_template.py +99 -0
- package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +46 -0
- package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +99 -0
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +383 -0
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +603 -0
- package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +25 -0
- package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +35 -0
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +24 -0
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +61 -0
- package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +27 -0
- package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +127 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +67 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +37 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +784 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +62 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +104 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +83 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +35 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +95 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +709 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +59 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +779 -0
- package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +18 -0
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +73 -0
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +186 -0
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +106 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +28 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +47 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +23 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +97 -0
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +65 -0
- package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +650 -0
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +155 -0
- package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +42 -0
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +43 -0
- package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +27 -0
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +115 -0
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +52 -0
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +39 -0
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +373 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +203 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +4 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +63 -0
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +551 -0
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +5 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +97 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +105 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +36 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +40 -0
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +333 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +41 -0
- package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +40 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +24 -0
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +75 -0
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +109 -0
- package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +29 -0
- package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +54 -0
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +83 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +287 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +59 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +687 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +121 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +288 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +161 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +138 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +396 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +341 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +185 -0
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +138 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +69 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +42 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +38 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +86 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +68 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +39 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +41 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +110 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +278 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +203 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +564 -0
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +38 -0
- package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +57 -0
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +141 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +287 -0
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +115 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +94 -0
- package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +25 -0
- package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +22 -0
- package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +57 -0
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +348 -0
- package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +8 -0
- package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +26 -0
- package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +62 -0
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +231 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +1086 -0
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +62 -0
- package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +270 -0
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +67 -0
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +25 -0
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +174 -0
- package/skills/bpmax-flow-template-editor/references/intent-model.md +117 -0
- package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +147 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +97 -0
- package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +168 -0
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +133 -0
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +106 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +149 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +41 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +155 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +179 -0
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +91 -0
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +96 -0
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +57 -0
- package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +69 -0
- package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +52 -0
- package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +114 -0
- package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +1084 -0
- package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +159 -0
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +636 -0
- package/skills/bpmax-form-template-editor/SKILL.md +1113 -0
- package/skills/bpmax-form-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +203 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +125 -0
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +77 -0
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +49 -0
- package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +37 -0
- package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +145 -0
- package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +67 -0
- package/skills/bpmax-form-template-editor/scripts/export_form_template.py +91 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +1762 -0
- package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +30 -0
- package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +67 -0
- package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +163 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +1292 -0
- package/skills/bpmax-list-template-editor/SKILL.md +478 -0
- package/skills/bpmax-list-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-list-template-editor/references/browser-page-contract.md +81 -0
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +165 -0
- package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +60 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +108 -0
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +102 -0
- package/skills/bpmax-list-template-editor/references/payload-checklist.md +47 -0
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +147 -0
- package/skills/bpmax-list-template-editor/references/special-formats.md +411 -0
- package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +37 -0
- package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +33 -0
- package/skills/bpmax-list-template-editor/scripts/export_list_template.py +89 -0
- package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +34 -0
- package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +54 -0
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +955 -0
- package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +55 -0
- package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +117 -0
- package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +441 -0
- package/skills/bpmax-memory-protocol/SKILL.md +72 -0
- package/skills/bpmax-nav-config-editor/SKILL.md +350 -0
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +70 -0
- package/skills/bpmax-nav-config-editor/references/config-shape.md +78 -0
- package/skills/bpmax-nav-config-editor/references/icon-selection.md +83 -0
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +51 -0
- package/skills/bpmax-nav-config-editor/references/payload-checklist.md +41 -0
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +47 -0
- package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +34 -0
- package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +32 -0
- package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +56 -0
- package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +33 -0
- package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +812 -0
- package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +44 -0
- package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +33 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +358 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +138 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +58 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +51 -0
- package/skills/bpmax-plugin-config/SKILL.md +42 -0
- package/skills/bpmax-project/SKILL.md +17 -3
- package/skills/bpmax-project-detail-template-editor/SKILL.md +355 -0
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +59 -0
- package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +120 -0
- package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +33 -0
- package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +44 -0
- package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +30 -0
- package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +33 -0
- package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +87 -0
- package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +37 -0
- package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +507 -0
- package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +120 -0
- package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +369 -0
- package/skills/bpmax-role-editor/SKILL.md +251 -0
- package/skills/bpmax-role-editor/references/api-workflow.md +30 -0
- package/skills/bpmax-role-editor/references/runtime-page-shape.md +18 -0
- package/skills/bpmax-role-editor/references/work-file-mapping.md +32 -0
- package/skills/bpmax-role-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-role-editor/scripts/confirm_role.py +33 -0
- package/skills/bpmax-role-editor/scripts/export_role.py +163 -0
- package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +38 -0
- package/skills/bpmax-role-editor/scripts/role_editor_common.py +1231 -0
- package/skills/bpmax-role-editor/scripts/submit_role.py +144 -0
- package/skills/bpmax-role-editor/tests/test_role_editor.py +343 -0
- package/skills/bpmax-shared/SKILL.md +1 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +106 -0
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +4 -0
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +37 -0
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +136 -0
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +138 -0
- package/skills/bpmax-workspace-editor/SKILL.md +78 -0
- package/skills/bpmax-workspace-editor/agents/openai.yaml +4 -0
- package/skills/form-control-library/SKILL.md +82 -0
- package/skills/form-control-library/agents/openai.yaml +4 -0
- package/skills/form-control-library/references/form-controls.md +199 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +180 -0
- package/skills/form-control-library/references/group-select-runtime.md +191 -0
- package/skills/form-control-library/scripts/rebuild_form_control_library.py +55 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
# 项目列表模板“特殊格式”清单
|
|
2
|
+
|
|
3
|
+
这份清单只记录当前 `project_detail_table` 渲染链上已经从前端代码确认过、适合在列表模板 skill 中直接使用的特殊格式。
|
|
4
|
+
|
|
5
|
+
不在这份清单里的能力,不代表系统一定不支持,只代表当前还没有在这条渲染链上完成确认。
|
|
6
|
+
|
|
7
|
+
## 统一兜底规则
|
|
8
|
+
|
|
9
|
+
所有展示型列默认都应带“无值占位”处理。
|
|
10
|
+
|
|
11
|
+
推荐约定:
|
|
12
|
+
- 默认占位内容:`--`
|
|
13
|
+
- 适用范围:
|
|
14
|
+
- 普通文本列
|
|
15
|
+
- 状态映射列
|
|
16
|
+
- 数据集字段列
|
|
17
|
+
- 图标文字列中的文字部分
|
|
18
|
+
- 不建议让单元格完全空白,除非用户明确要求“空值不显示”
|
|
19
|
+
|
|
20
|
+
### 推荐写法
|
|
21
|
+
|
|
22
|
+
#### 简单字段
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"children": {
|
|
27
|
+
"$template": "ctx.username || '--'",
|
|
28
|
+
"eval": true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### 状态映射
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"children": {
|
|
38
|
+
"$template": "{const map = {0: '未开始', 1: '进行中'}; return map[ctx.status] || '--'}",
|
|
39
|
+
"eval": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### 显式判断空值
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"children": {
|
|
49
|
+
"$template": "{const v = ctx.sn; return v === null || v === undefined || v === '' ? '--' : v}",
|
|
50
|
+
"eval": true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 1. 彩色状态标签
|
|
56
|
+
|
|
57
|
+
### 组件
|
|
58
|
+
- `ColorBackgroundText`
|
|
59
|
+
|
|
60
|
+
### 适用场景
|
|
61
|
+
- 项目状态
|
|
62
|
+
- 进度情况
|
|
63
|
+
- 其他有限枚举状态值
|
|
64
|
+
|
|
65
|
+
### 已确认能力
|
|
66
|
+
- 支持 `type = "status"`
|
|
67
|
+
- 支持 `type = "process"`
|
|
68
|
+
- 支持 `type = "year"`
|
|
69
|
+
- 支持小圆点状态样式
|
|
70
|
+
|
|
71
|
+
### 示例
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"title": "状态",
|
|
76
|
+
"props": {
|
|
77
|
+
"width": "110px"
|
|
78
|
+
},
|
|
79
|
+
"createElement": {
|
|
80
|
+
"is": "ColorBackgroundText",
|
|
81
|
+
"attribute": {
|
|
82
|
+
"props": {
|
|
83
|
+
"type": "status",
|
|
84
|
+
"content": {
|
|
85
|
+
"$template": "{const map = {0: '未开始', 1: '进行中', 2: '完结', 3: '延期', 4: '失败', 5: '暂停', 6: '废弃' }; return map[ctx.status] || '--'}",
|
|
86
|
+
"eval": true
|
|
87
|
+
},
|
|
88
|
+
"hideStatusPoint": false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 2. 图标 + 文字
|
|
96
|
+
|
|
97
|
+
### 方式 A:列根图标
|
|
98
|
+
- 通过列对象根级字段:
|
|
99
|
+
- `icon`
|
|
100
|
+
- `iconColor`
|
|
101
|
+
|
|
102
|
+
### 方式 B:单元格内部图标
|
|
103
|
+
- 在 `createElement.children` 里直接写 `i` 节点
|
|
104
|
+
|
|
105
|
+
### 适用场景
|
|
106
|
+
- 状态提示
|
|
107
|
+
- 强调重点列
|
|
108
|
+
- 区分不同业务类型
|
|
109
|
+
|
|
110
|
+
### 示例
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"title": "当前环节",
|
|
115
|
+
"icon": "el-icon-share",
|
|
116
|
+
"iconColor": "#175CD3",
|
|
117
|
+
"createElement": {
|
|
118
|
+
"children": {
|
|
119
|
+
"$template": "ctx.current_flow_step_name || '--'",
|
|
120
|
+
"eval": true
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 3. 头像 + 文字
|
|
127
|
+
|
|
128
|
+
### 常见组合
|
|
129
|
+
- `el-avatar`
|
|
130
|
+
- `span`
|
|
131
|
+
|
|
132
|
+
### 适用场景
|
|
133
|
+
- 负责人
|
|
134
|
+
- 当前处理人
|
|
135
|
+
- 客户经理
|
|
136
|
+
|
|
137
|
+
### 约束
|
|
138
|
+
- 凡是涉及人的列表列,默认必须走这一类头像结构
|
|
139
|
+
- 不允许把 `负责人` / `申请人` / `发起人` / `创建人` / `审批人` / `处理人` / `人员` 这类列只渲染成纯文本
|
|
140
|
+
|
|
141
|
+
### 示例
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"title": "负责人",
|
|
146
|
+
"createElement": {
|
|
147
|
+
"is": "div",
|
|
148
|
+
"attribute": {
|
|
149
|
+
"style": "display: flex; align-items: center;"
|
|
150
|
+
},
|
|
151
|
+
"children": [
|
|
152
|
+
{
|
|
153
|
+
"is": "el-avatar",
|
|
154
|
+
"attribute": {
|
|
155
|
+
"props": {
|
|
156
|
+
"size": 24,
|
|
157
|
+
"src": {
|
|
158
|
+
"$template": "{return (ctx.__project_owner || {}).avatar}",
|
|
159
|
+
"eval": true
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"style": "margin-right: 8px;"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"is": "span",
|
|
167
|
+
"children": {
|
|
168
|
+
"$template": "{const owner = ctx.__project_owner || {}; return owner.name || '--'}",
|
|
169
|
+
"eval": true
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## 4. 操作按钮列
|
|
178
|
+
|
|
179
|
+
### 常见节点
|
|
180
|
+
- `router-link`
|
|
181
|
+
- `el-button`
|
|
182
|
+
|
|
183
|
+
### 已确认能力
|
|
184
|
+
- 跳详情
|
|
185
|
+
- 调页面组件方法
|
|
186
|
+
- 条件显示按钮
|
|
187
|
+
|
|
188
|
+
### 适用场景
|
|
189
|
+
- `详情`
|
|
190
|
+
- `删除`
|
|
191
|
+
- `修改`
|
|
192
|
+
|
|
193
|
+
### 示例
|
|
194
|
+
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"title": "操作",
|
|
198
|
+
"props": {
|
|
199
|
+
"fixed": "right",
|
|
200
|
+
"width": "120px"
|
|
201
|
+
},
|
|
202
|
+
"createElement": {
|
|
203
|
+
"children": [
|
|
204
|
+
{
|
|
205
|
+
"is": "router-link",
|
|
206
|
+
"attribute": {
|
|
207
|
+
"props": {
|
|
208
|
+
"to": {
|
|
209
|
+
"path": {
|
|
210
|
+
"$template": "{ const workspace = ctx.$WORKSPACE; return '/' + workspace + '/project_detail/0/{{__id}}'; }",
|
|
211
|
+
"eval": true
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"children": {
|
|
217
|
+
"is": "el-button",
|
|
218
|
+
"attribute": {
|
|
219
|
+
"props": {
|
|
220
|
+
"size": "small",
|
|
221
|
+
"type": "text",
|
|
222
|
+
"icon": "ri ri_eye-line"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"children": "详情"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"is": "el-button",
|
|
230
|
+
"if": {
|
|
231
|
+
"$template": "{return ctx.status === 0 && !ctx.current_flow_step_name}",
|
|
232
|
+
"eval": true
|
|
233
|
+
},
|
|
234
|
+
"attribute": {
|
|
235
|
+
"props": {
|
|
236
|
+
"size": "small",
|
|
237
|
+
"type": "text",
|
|
238
|
+
"icon": "ri ri_delete-bin-line"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"children": "删除"
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
"icon": null,
|
|
246
|
+
"iconColor": null
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
- 操作列不要在列根写 `icon` / `iconColor`。
|
|
251
|
+
- 每个操作按钮都要自己带 icon,推荐直接写在 `attribute.props.icon`。
|
|
252
|
+
- 操作列必须保留“详情/查看”和“删除/移除”动作;缺删除动作时 CLI gate 会阻断。
|
|
253
|
+
- 删除/移除动作必须带可用性 guard,例如 `if` 或 `disabled`,并引用项目状态、当前环节或步骤状态。默认语义是:刚创建、未推进到第一个节点后的项目可以删除;过了第一个节点后不能删除。
|
|
254
|
+
|
|
255
|
+
## 5. 条件显示
|
|
256
|
+
|
|
257
|
+
### 字段
|
|
258
|
+
- `if`
|
|
259
|
+
|
|
260
|
+
### 适用层级
|
|
261
|
+
- 列对象
|
|
262
|
+
- `createElement` 子节点
|
|
263
|
+
|
|
264
|
+
### 适用场景
|
|
265
|
+
- 无权限时隐藏按钮
|
|
266
|
+
- 某状态下才显示某个动作
|
|
267
|
+
- 数据为空时不显示辅助元素
|
|
268
|
+
|
|
269
|
+
### 示例
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"is": "el-button",
|
|
274
|
+
"if": {
|
|
275
|
+
"$template": "{return ctx.$CAN_DELETE}",
|
|
276
|
+
"eval": true
|
|
277
|
+
},
|
|
278
|
+
"children": "删除"
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## 6. 预设列
|
|
283
|
+
|
|
284
|
+
### 字段
|
|
285
|
+
- `preset`
|
|
286
|
+
|
|
287
|
+
### 当前已确认预设
|
|
288
|
+
- `CURRENT_STEP`
|
|
289
|
+
|
|
290
|
+
### 适用场景
|
|
291
|
+
- 当前环节及负责人展示
|
|
292
|
+
- 用内置格式快速落一列
|
|
293
|
+
|
|
294
|
+
### 示例
|
|
295
|
+
|
|
296
|
+
```json
|
|
297
|
+
{
|
|
298
|
+
"title": "当前环节",
|
|
299
|
+
"preset": "CURRENT_STEP"
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## 7. 进度条
|
|
304
|
+
|
|
305
|
+
### 组件
|
|
306
|
+
- `ProcessBar`
|
|
307
|
+
|
|
308
|
+
### 适用场景
|
|
309
|
+
- 百分比进度
|
|
310
|
+
- 达成率
|
|
311
|
+
- 处理完成度
|
|
312
|
+
|
|
313
|
+
### 注意
|
|
314
|
+
- 当前只确认组件在这条渲染链里已注册
|
|
315
|
+
- 实际 props 结构建议先找现成样例再用
|
|
316
|
+
|
|
317
|
+
## 8. 扇形/占比块
|
|
318
|
+
|
|
319
|
+
### 组件
|
|
320
|
+
- `SectorCeil`
|
|
321
|
+
|
|
322
|
+
### 适用场景
|
|
323
|
+
- 占比
|
|
324
|
+
- 分段比例
|
|
325
|
+
- 统计结果摘要
|
|
326
|
+
|
|
327
|
+
### 注意
|
|
328
|
+
- 当前只确认组件在这条渲染链里已注册
|
|
329
|
+
- 实际 props 结构建议先找现成样例再用
|
|
330
|
+
|
|
331
|
+
## 9. 图标单元格
|
|
332
|
+
|
|
333
|
+
### 组件
|
|
334
|
+
- `IconCeil`
|
|
335
|
+
|
|
336
|
+
### 适用场景
|
|
337
|
+
- 用图标表达状态
|
|
338
|
+
- 等级/风险/分类提示
|
|
339
|
+
|
|
340
|
+
### 注意
|
|
341
|
+
- 当前只确认组件在这条渲染链里已注册
|
|
342
|
+
- 若只是普通图标提示,通常优先用列根 `icon` + 文本,而不是直接上 `IconCeil`
|
|
343
|
+
|
|
344
|
+
## 10. 图片预览
|
|
345
|
+
|
|
346
|
+
### 组件
|
|
347
|
+
- `ImagePreview`
|
|
348
|
+
|
|
349
|
+
### 适用场景
|
|
350
|
+
- 图片字段
|
|
351
|
+
- 凭证缩略图
|
|
352
|
+
- 附件缩略图
|
|
353
|
+
|
|
354
|
+
### 注意
|
|
355
|
+
- 图片预览本身在渲染链中已注册
|
|
356
|
+
- 若要做稳定的图片列,建议先找真实模板样例,不要只凭组件名硬写 props
|
|
357
|
+
|
|
358
|
+
## 11. 项目详情/编辑类专用组件
|
|
359
|
+
|
|
360
|
+
### 已注册组件
|
|
361
|
+
- `ProjectDetail`
|
|
362
|
+
- `ProjectDetailEdit`
|
|
363
|
+
- `ProjectCopy`
|
|
364
|
+
- `StepOnwerChange`
|
|
365
|
+
|
|
366
|
+
### 适用场景
|
|
367
|
+
- 深链接详情
|
|
368
|
+
- 快捷编辑
|
|
369
|
+
- 复制项目
|
|
370
|
+
- 环节负责人相关展示
|
|
371
|
+
|
|
372
|
+
### 注意
|
|
373
|
+
- 这些组件都已经挂进 `DynamicComponent`
|
|
374
|
+
- 但不同组件对 `attribute.props`、上下文和事件依赖不同
|
|
375
|
+
- 实际使用前建议先找仓库里的真实样例
|
|
376
|
+
|
|
377
|
+
## 12. 模板表达式
|
|
378
|
+
|
|
379
|
+
### 字段
|
|
380
|
+
- `children.$template`
|
|
381
|
+
- `eval: true`
|
|
382
|
+
|
|
383
|
+
### 适用场景
|
|
384
|
+
- 读数据集字段
|
|
385
|
+
- 映射显示值
|
|
386
|
+
- 拼接展示文案
|
|
387
|
+
- 简单分支判断
|
|
388
|
+
|
|
389
|
+
### 示例
|
|
390
|
+
|
|
391
|
+
```json
|
|
392
|
+
{
|
|
393
|
+
"children": {
|
|
394
|
+
"$template": "{const map = {0: '正常', 1: '预警', 2: '延期' }; return map[ctx.delay_level] || '正常'}",
|
|
395
|
+
"eval": true
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
## 当前不纳入本 skill 默认承诺范围的格式
|
|
401
|
+
|
|
402
|
+
下面这些我在别的表格实现里看到了,但还没有在 `project_detail_table` 这条渲染链中完成专门验证,因此不应在 skill 里默认承诺:
|
|
403
|
+
- `valueToImage`
|
|
404
|
+
- `valueToIcon`
|
|
405
|
+
- `textBackgroundColor`
|
|
406
|
+
- `textBackgroundRadius`
|
|
407
|
+
|
|
408
|
+
如果用户明确要求这类效果,处理策略应是:
|
|
409
|
+
1. 先说明当前是在别的表格链路里看到了支持
|
|
410
|
+
2. 再基于当前页面和样例做一次实际验证
|
|
411
|
+
3. 验证通过后再把它沉淀进 skill
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from list_template_editor_common import (
|
|
7
|
+
build_submit_payload,
|
|
8
|
+
dump_json,
|
|
9
|
+
load_json,
|
|
10
|
+
paths_for,
|
|
11
|
+
update_build_meta,
|
|
12
|
+
write_diff,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
17
|
+
p = argparse.ArgumentParser(description="Build the final BPMAX list-template submit payload from a local work file.")
|
|
18
|
+
p.add_argument("--stem", required=True)
|
|
19
|
+
return p
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main() -> int:
|
|
23
|
+
args = build_parser().parse_args()
|
|
24
|
+
paths = paths_for(args.stem)
|
|
25
|
+
work = load_json(paths["work"])
|
|
26
|
+
submit = build_submit_payload(work)
|
|
27
|
+
dump_json(paths["submit"], submit)
|
|
28
|
+
write_diff(paths["submit_diff"], work, submit, "work", "submit")
|
|
29
|
+
update_build_meta(paths["meta"], stem=args.stem, work_path=paths["work"], submit_path=paths["submit"])
|
|
30
|
+
print(paths["submit"])
|
|
31
|
+
print(paths["submit_diff"])
|
|
32
|
+
print(paths["meta"])
|
|
33
|
+
return 0
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if __name__ == "__main__":
|
|
37
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from list_template_editor_common import paths_for, update_confirmation_state
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
10
|
+
p = argparse.ArgumentParser(description="Persist local confirmation state for BPMAX list-template work or submit artifacts.")
|
|
11
|
+
p.add_argument("--stem", required=True)
|
|
12
|
+
p.add_argument("--stage", required=True, choices=("work", "submit"))
|
|
13
|
+
p.add_argument("--actor", default="codex")
|
|
14
|
+
return p
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main() -> int:
|
|
18
|
+
args = build_parser().parse_args()
|
|
19
|
+
paths = paths_for(args.stem)
|
|
20
|
+
update_confirmation_state(
|
|
21
|
+
paths["meta"],
|
|
22
|
+
stem=args.stem,
|
|
23
|
+
actor=args.actor,
|
|
24
|
+
stage=args.stage,
|
|
25
|
+
work_path=paths["work"],
|
|
26
|
+
submit_path=paths["submit"],
|
|
27
|
+
)
|
|
28
|
+
print(paths["meta"])
|
|
29
|
+
return 0
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from list_template_editor_common import (
|
|
7
|
+
build_client,
|
|
8
|
+
build_create_raw_payload,
|
|
9
|
+
create_stem,
|
|
10
|
+
detail_to_work_payload,
|
|
11
|
+
dump_json,
|
|
12
|
+
paths_for,
|
|
13
|
+
write_diff,
|
|
14
|
+
write_export_meta,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
19
|
+
p = argparse.ArgumentParser(description="Export an online BPMAX list template into local temp files.")
|
|
20
|
+
p.add_argument("--template-id", type=int)
|
|
21
|
+
p.add_argument("--sample-template-id", type=int)
|
|
22
|
+
p.add_argument("--create-skeleton", action="store_true")
|
|
23
|
+
p.add_argument("--workspace")
|
|
24
|
+
p.add_argument("--base-url")
|
|
25
|
+
p.add_argument("--language", default="zhCN")
|
|
26
|
+
p.add_argument("--cookie-header")
|
|
27
|
+
p.add_argument("--timeout", type=float, default=30)
|
|
28
|
+
p.add_argument("--insecure", action="store_true")
|
|
29
|
+
return p
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def main() -> int:
|
|
33
|
+
args = build_parser().parse_args()
|
|
34
|
+
client = build_client(args)
|
|
35
|
+
|
|
36
|
+
if args.template_id:
|
|
37
|
+
response = client.get_flow_page_template(args.template_id)
|
|
38
|
+
detail = response.get("data") or {}
|
|
39
|
+
stem = str(args.template_id)
|
|
40
|
+
mode = "edit"
|
|
41
|
+
raw = detail
|
|
42
|
+
work = detail_to_work_payload(detail, mode=mode)
|
|
43
|
+
request_url = client._build_url(f"/api/flow_page_template/{args.template_id}")
|
|
44
|
+
template_id = args.template_id
|
|
45
|
+
template_uuid = detail.get("uuid")
|
|
46
|
+
sample_template_id = None
|
|
47
|
+
else:
|
|
48
|
+
if not args.create_skeleton:
|
|
49
|
+
raise SystemExit("either --template-id or --create-skeleton is required")
|
|
50
|
+
if not args.sample_template_id:
|
|
51
|
+
raise SystemExit("--sample-template-id is required for --create-skeleton")
|
|
52
|
+
response = client.get_flow_page_template(args.sample_template_id)
|
|
53
|
+
detail = response.get("data") or {}
|
|
54
|
+
stem = create_stem(client.workspace, sample_template_id=args.sample_template_id)
|
|
55
|
+
mode = "create"
|
|
56
|
+
raw = build_create_raw_payload(detail, sample_template_id=args.sample_template_id)
|
|
57
|
+
work = detail_to_work_payload(detail, mode=mode, sample_template_id=args.sample_template_id)
|
|
58
|
+
request_url = client._build_url(f"/api/flow_page_template/{args.sample_template_id}")
|
|
59
|
+
template_id = None
|
|
60
|
+
template_uuid = detail.get("uuid")
|
|
61
|
+
sample_template_id = args.sample_template_id
|
|
62
|
+
|
|
63
|
+
paths = paths_for(stem)
|
|
64
|
+
dump_json(paths["raw"], raw)
|
|
65
|
+
dump_json(paths["work"], work)
|
|
66
|
+
write_export_meta(
|
|
67
|
+
paths["meta"],
|
|
68
|
+
stem=stem,
|
|
69
|
+
mode=mode,
|
|
70
|
+
template_id=template_id,
|
|
71
|
+
template_uuid=template_uuid,
|
|
72
|
+
sample_template_id=sample_template_id,
|
|
73
|
+
workspace=client.workspace,
|
|
74
|
+
language=client.language,
|
|
75
|
+
request_url=request_url,
|
|
76
|
+
raw_path=paths["raw"],
|
|
77
|
+
work_path=paths["work"],
|
|
78
|
+
)
|
|
79
|
+
write_diff(paths["work_diff"], raw, work, "raw", "work")
|
|
80
|
+
|
|
81
|
+
print(paths["raw"])
|
|
82
|
+
print(paths["work"])
|
|
83
|
+
print(paths["meta"])
|
|
84
|
+
print(paths["work_diff"])
|
|
85
|
+
return 0
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
if __name__ == "__main__":
|
|
89
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from list_template_editor_common import build_client, dump_json, paths_for
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
10
|
+
p = argparse.ArgumentParser(description="Fetch live BPMAX data-set list for a flow and store it under the temp result directory.")
|
|
11
|
+
p.add_argument("--stem", required=True)
|
|
12
|
+
p.add_argument("--flow-type", required=True)
|
|
13
|
+
p.add_argument("--flow-key", default="")
|
|
14
|
+
p.add_argument("--workspace")
|
|
15
|
+
p.add_argument("--base-url")
|
|
16
|
+
p.add_argument("--language", default="zhCN")
|
|
17
|
+
p.add_argument("--cookie-header")
|
|
18
|
+
p.add_argument("--timeout", type=float, default=30)
|
|
19
|
+
p.add_argument("--insecure", action="store_true")
|
|
20
|
+
return p
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def main() -> int:
|
|
24
|
+
args = build_parser().parse_args()
|
|
25
|
+
client = build_client(args)
|
|
26
|
+
data_sets = client.get_data_set_list(flow_type=args.flow_type, flow_key=args.flow_key)
|
|
27
|
+
paths = paths_for(args.stem)
|
|
28
|
+
dump_json(paths["data_set_list"], data_sets)
|
|
29
|
+
print(paths["data_set_list"])
|
|
30
|
+
return 0
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == "__main__":
|
|
34
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from list_template_editor_common import (
|
|
7
|
+
build_client,
|
|
8
|
+
dump_json,
|
|
9
|
+
lint_list_template_semantics,
|
|
10
|
+
load_json,
|
|
11
|
+
paths_for,
|
|
12
|
+
update_lint_meta,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
17
|
+
p = argparse.ArgumentParser(description="Run strict semantic/style lint for a local BPMAX list-template work/submit pair.")
|
|
18
|
+
p.add_argument("--stem", required=True)
|
|
19
|
+
p.add_argument("--workspace")
|
|
20
|
+
p.add_argument("--base-url")
|
|
21
|
+
p.add_argument("--language", default="zhCN")
|
|
22
|
+
p.add_argument("--cookie-header")
|
|
23
|
+
p.add_argument("--timeout", type=float, default=30)
|
|
24
|
+
p.add_argument("--insecure", action="store_true")
|
|
25
|
+
return p
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def main() -> int:
|
|
29
|
+
args = build_parser().parse_args()
|
|
30
|
+
paths = paths_for(args.stem)
|
|
31
|
+
meta = load_json(paths["meta"])
|
|
32
|
+
work = load_json(paths["work"])
|
|
33
|
+
submit = load_json(paths["submit"])
|
|
34
|
+
client = build_client(args)
|
|
35
|
+
|
|
36
|
+
flow_type = submit.get("flow_type") or (work.get("basic") or {}).get("flow_type")
|
|
37
|
+
flow_key = submit.get("flow_key") or (work.get("basic") or {}).get("flow_key") or ""
|
|
38
|
+
data_sets = client.get_data_set_list(flow_type=flow_type, flow_key=flow_key)
|
|
39
|
+
|
|
40
|
+
dump_json(paths["data_set_list"], data_sets)
|
|
41
|
+
report = lint_list_template_semantics(work, data_sets=data_sets, submit_payload=submit)
|
|
42
|
+
dump_json(paths["semantic_lint"], report)
|
|
43
|
+
update_lint_meta(paths["meta"], stem=args.stem, submit_path=paths["submit"], report=report)
|
|
44
|
+
|
|
45
|
+
print(paths["data_set_list"])
|
|
46
|
+
print(paths["semantic_lint"])
|
|
47
|
+
print(paths["meta"])
|
|
48
|
+
if not report["ok"]:
|
|
49
|
+
raise SystemExit("list-template lint failed; inspect semantic-lint.json for details")
|
|
50
|
+
return 0
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
if __name__ == "__main__":
|
|
54
|
+
raise SystemExit(main())
|