bpmax-cli 0.2.1-beta.38 → 0.2.1-beta.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -496,7 +496,7 @@ function pluginAgentCapabilityForRequest(method, normalizedPath) {
496
496
  // package.json
497
497
  var package_default = {
498
498
  name: "bpmax-cli",
499
- version: "0.2.1-beta.38",
499
+ version: "0.2.1-beta.39",
500
500
  description: "CLI for BPMAX environments with multi-profile config and local login callback flow",
501
501
  type: "module",
502
502
  bin: {
@@ -7035,9 +7035,35 @@ function lintFilterTemplateWork(value, errors) {
7035
7035
  return;
7036
7036
  }
7037
7037
  content.config.forEach((item, index) => {
7038
- if (isRecord3(item) && item.console === true) {
7038
+ if (!isRecord3(item)) {
7039
+ return;
7040
+ }
7041
+ const itemPath = `filter-template content.config[${index}]`;
7042
+ if (item.console === true) {
7039
7043
  errors.push(`filter-template content.config[${index}].console=true is reserved for console/dashboard filters and is not allowed in ordinary filter templates.`);
7040
7044
  }
7045
+ const componentType = textOf(item.is).trim();
7046
+ const queryType = textOf(item.type).trim();
7047
+ const timeType = textOf(item.time_type).trim();
7048
+ const props = isRecord3(item.props) ? item.props : {};
7049
+ const pickerType = textOf(props.type).trim();
7050
+ if (componentType === "date-picker") {
7051
+ const canonicalTimeType = pickerType === "datetimerange" ? "time_range" : pickerType === "monthrange" ? "month_range" : pickerType === "daterange" ? "date_range" : "d";
7052
+ errors.push(
7053
+ `[filter_date_range_component_invalid] ${itemPath} \u4F7F\u7528\u4E86\u5E73\u53F0\u7B5B\u9009\u5668\u4E0D\u652F\u6301\u7684 is=date-picker\uFF0C\u8FD0\u884C\u65F6\u4F1A\u964D\u7EA7\u4E3A\u666E\u901A\u8F93\u5165\u6846\u5E76\u4EA7\u751F\u5B57\u7B26\u4E32\u67E5\u8BE2\u3002\u8BF7\u6539\u7528 is=date-range\u3001type=range\u3001time_type=${canonicalTimeType}\uFF1B\u4E0D\u8981\u901A\u8FC7 props.type=${pickerType || "<empty>"} \u6539\u53D8\u7EC4\u4EF6\u7C7B\u578B\u3002`
7054
+ );
7055
+ }
7056
+ if (componentType === "date-range") {
7057
+ if (queryType !== "range") {
7058
+ errors.push(`[filter_date_range_query_invalid] ${itemPath} \u4F7F\u7528 is=date-range \u65F6 type \u5FC5\u987B\u4E3A range\uFF0C\u7EC4\u4EF6\u624D\u4F1A\u751F\u6210 raw ES range\u3002`);
7059
+ }
7060
+ const supportedTimeTypes = /* @__PURE__ */ new Set(["y", "m", "d", "time_range", "date_range", "month_range"]);
7061
+ if (!supportedTimeTypes.has(timeType)) {
7062
+ errors.push(
7063
+ `[filter_date_range_time_type_invalid] ${itemPath}.time_type \u5FC5\u987B\u662F y\u3001m\u3001d\u3001time_range\u3001date_range \u6216 month_range\uFF1B\u65E5\u671F\u533A\u95F4\u8BF7\u4F7F\u7528 time_type=date_range\u3002`
7064
+ );
7065
+ }
7066
+ }
7041
7067
  });
7042
7068
  }
7043
7069
  function listTemplateNodeLabel(node) {
@@ -16776,7 +16802,7 @@ var YBS_PC_CREATE_WRONG_RE = /https:\/\/yaditest\.yitaiyitai\.com\/w:ybs\/pages\
16776
16802
  var IDENTITY_MOCK_CASE_RE = /(非处理人|越权|只读|多角色|角色隔离|无权限|低权限|unauthorized|limited|readonly|permission)/;
16777
16803
  var IDENTITY_MOCK_VALUE_RE = /(mock|模拟).*(unmock|退出模拟|恢复)|bpmax-user-mock-operator/;
16778
16804
  var E2E_REUSABLE_ASSET_RE = /bpmax-cli\s+e2e|record-from-evidence|create-page-submit|step-run|browser-template|scenario\s+plan|data\s+profile|reusable\s+step|复用模板|可复用|首次运行沉淀|沉淀模板/;
16779
- var ERROR_CAPTURE_CASE_RE = /(negative|boundary|异常|错误|失败|报错|重复|无效|非法|invalid|error|扫码.*(异常|错误|无效)|错误\s*SN|异常\s*SN|无效\s*SN)/i;
16805
+ var ERROR_CAPTURE_CASE_RE = /(negative|boundary|异常|错误|失败|报错|无效|非法|invalid|error|扫码.*(异常|错误|无效)|错误\s*SN|异常\s*SN|无效\s*SN)/i;
16780
16806
  var ERROR_CAPTURE_EVIDENCE_RE = /(expected_error_text|error_capture_required|错误提示|提示文案|报错文案|toast|校验文案).*(screenshot|截图)|截图.*(错误提示|提示文案|报错文案|toast|校验文案)/i;
16781
16807
  var BROWSER_TOOL_RE = /(Chrome DevTools|DevTools|Playwright|AppleScript)/i;
16782
16808
  var REPORT_EVIDENCE_PLACEHOLDER_RE = /^(?:n\/?a|none|null|todo|tbd|xxx|unknown|pending|待补|暂无|无|未执行|跳过|-+)$/i;
@@ -26199,6 +26225,9 @@ function registerTaskbookCommands(program2) {
26199
26225
  // src/commands/test-suite.ts
26200
26226
  import { readFile as readFile18 } from "fs/promises";
26201
26227
  import path15 from "path";
26228
+ function effectiveProfileOption(options, command) {
26229
+ return options.profile || command.optsWithGlobals().profile;
26230
+ }
26202
26231
  async function resolveE2eSkillSource(sourceSkill) {
26203
26232
  if (sourceSkill) {
26204
26233
  const resolved = path15.resolve(sourceSkill);
@@ -26240,9 +26269,9 @@ function registerTestSuiteCommands(program2) {
26240
26269
  printResult(options.format, await migrateScenarioSteps(options));
26241
26270
  });
26242
26271
  const run = suite.command("run").description("Run formal E2E cases through an execution manifest");
26243
- run.command("start").description("Start one formal suite case and create its report execution manifest").requiredOption("--scenario <id>", "Scenario id").requiredOption("--case-id <id>", "Case id").option("--suite-root <path>", "Formal suite root directory", DEFAULT_SUITE_ROOT).option("--report-root <path>", "Report root directory", DEFAULT_REPORT_ROOT).option("--profile <profile>", "Profile name").option("--source-skill <path>", "Explicit source bpmax-e2e-flow-test-operator SKILL.md for source validation").requiredOption("--latest-proof <path>", "latest-* proof JSON written after syncing the sysconfig repo").option("--format <format>", "Output format", "json").action(async (options) => {
26272
+ run.command("start").description("Start one formal suite case and create its report execution manifest").requiredOption("--scenario <id>", "Scenario id").requiredOption("--case-id <id>", "Case id").option("--suite-root <path>", "Formal suite root directory", DEFAULT_SUITE_ROOT).option("--report-root <path>", "Report root directory", DEFAULT_REPORT_ROOT).option("--profile <profile>", "Profile name").option("--source-skill <path>", "Explicit source bpmax-e2e-flow-test-operator SKILL.md for source validation").requiredOption("--latest-proof <path>", "latest-* proof JSON written after syncing the sysconfig repo").option("--format <format>", "Output format", "json").action(async (options, command) => {
26244
26273
  await requireLatestProof(options.latestProof);
26245
- const profile = resolveProfile(await loadConfig(), options.profile);
26274
+ const profile = resolveProfile(await loadConfig(), effectiveProfileOption(options, command));
26246
26275
  const skill = await resolveE2eSkillSource(options.sourceSkill);
26247
26276
  printResult(options.format, await startTestSuiteRun({
26248
26277
  ...options,
@@ -26252,17 +26281,20 @@ function registerTestSuiteCommands(program2) {
26252
26281
  skillVersion: skill.version
26253
26282
  }));
26254
26283
  });
26255
- run.command("next").description("Return only the current runnable case step from an execution manifest").requiredOption("--manifest <file>", "Execution manifest file").option("--profile <profile>", "Profile name; must match the execution manifest").option("--format <format>", "Output format", "json").action(async (options) => {
26256
- printResult(options.format, await nextTestSuiteRunStep(options.manifest, options.profile));
26284
+ run.command("next").description("Return only the current runnable case step from an execution manifest").requiredOption("--manifest <file>", "Execution manifest file").option("--profile <profile>", "Profile name; must match the execution manifest").option("--format <format>", "Output format", "json").action(async (options, command) => {
26285
+ printResult(options.format, await nextTestSuiteRunStep(options.manifest, effectiveProfileOption(options, command)));
26257
26286
  });
26258
- run.command("record").description("Record pass/fail/blocked evidence for the current case step").requiredOption("--manifest <file>", "Execution manifest file").requiredOption("--case-id <id>", "Case id").requiredOption("--case-step-id <id>", "Case step id").requiredOption("--result <result>", "pass, fail, or blocked").requiredOption("--evidence <path>", "Current-run evidence file or directory").option("--profile <profile>", "Profile name; must match the execution manifest").option("--format <format>", "Output format", "json").action(async (options) => {
26259
- printResult(options.format, await recordTestSuiteRunStep(options));
26287
+ run.command("record").description("Record pass/fail/blocked evidence for the current case step").requiredOption("--manifest <file>", "Execution manifest file").requiredOption("--case-id <id>", "Case id").requiredOption("--case-step-id <id>", "Case step id").requiredOption("--result <result>", "pass, fail, or blocked").requiredOption("--evidence <path>", "Current-run evidence file or directory").option("--profile <profile>", "Profile name; must match the execution manifest").option("--format <format>", "Output format", "json").action(async (options, command) => {
26288
+ printResult(options.format, await recordTestSuiteRunStep({
26289
+ ...options,
26290
+ profile: effectiveProfileOption(options, command)
26291
+ }));
26260
26292
  });
26261
26293
  run.command("report-sync").description("Synchronize the generated scenario report from the execution manifest").requiredOption("--manifest <file>", "Execution manifest file").option("--format <format>", "Output format", "json").action(async (options) => {
26262
26294
  printResult(options.format, await syncTestSuiteRunReport(options.manifest));
26263
26295
  });
26264
- run.command("status").description("Show execution manifest status").requiredOption("--manifest <file>", "Execution manifest file").option("--profile <profile>", "Profile name; must match the execution manifest").option("--format <format>", "Output format", "json").action(async (options) => {
26265
- printResult(options.format, await testSuiteRunStatus(options.manifest, options.profile));
26296
+ run.command("status").description("Show execution manifest status").requiredOption("--manifest <file>", "Execution manifest file").option("--profile <profile>", "Profile name; must match the execution manifest").option("--format <format>", "Output format", "json").action(async (options, command) => {
26297
+ printResult(options.format, await testSuiteRunStatus(options.manifest, effectiveProfileOption(options, command)));
26266
26298
  });
26267
26299
  review.command("repair").description("Repair missing schema fields in an existing draft review.json").requiredOption("--scenario <id>", "Scenario id").option("--draft-root <path>", "Draft suite root directory", DEFAULT_DRAFT_ROOT).requiredOption("--latest-proof <path>", "latest-* proof JSON written after syncing the sysconfig repo").option("--format <format>", "Output format", "json").action(async (options) => {
26268
26300
  printResult(options.format, await initOrRepairReview({ ...options, repair: true }));