@7365admin1/core 3.133.0 → 3.133.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@7365admin1/core",
3
3
  "license": "MIT",
4
- "version": "3.133.0",
4
+ "version": "3.133.1",
5
5
  "author": "7365admin1",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -194,6 +194,7 @@ before(async () => {
194
194
  case ROBOT_CLOUD_PATHS.haltPlans:
195
195
  return ok({ total: 1, planList: [{ planId: 4, robotId: body.robotId, dateList: [1, 2, 3, 4, 5], actionTime: "20:00", actionFlag: 0, enableFlag: true, remark: "1-5 晚8点关机" }] });
196
196
  case ROBOT_CLOUD_PATHS.stationState:
197
+ if (body.robotId === 425) return res.end(JSON.stringify({ ok: false, msg: "no station bound (e=59)" })); // robot 424 on prod
197
198
  return ok({ state: { stationId: 4560, updateOn: Date.now(), statusFlag: "0", statusName: "Offline", properties: [s("clean-water", "3.300", "double", "升"), s("charge-err", "false", "bool")] } });
198
199
  case ROBOT_CLOUD_PATHS.liftList:
199
200
  return ok({ liftlist: [{ liftid: 45, liftno: 3701, liftname: "Lift A", floorno: 13, onlineflag: 1, enableflag: true, simno: "868327073829804" }] });
@@ -519,7 +520,12 @@ test("records: a robot not on the account says so", async () => {
519
520
  test("alert, reading, task and schedule mapping (pure, recorded shapes)", () => {
520
521
  const a = ounitechAlertRecord({ errMsg: "785 - (提示)定位准备完成( 5)", createTime: "2026-09-30 07:02:57" });
521
522
  assert.deepEqual(a, { code: "785", level: "Notice", message: "Localisation ready", vendorText: "定位准备完成", resolved: false, at: "2026-09-29T23:02:57.000Z" });
522
- assert.equal(ounitechAlertRecord({ errMsg: "999 - (警告)未知( 3)" }).message, "未知", "unknown code keeps the vendor's words");
523
+ assert.equal(ounitechAlertRecord({ errMsg: "999 - (警告)未知( 3)" }).message, "Robot alert 999: 未知", "unknown code: code first, the vendor's words kept");
524
+ // Robot 424's other prod alerts (2026-09-30) read in English.
525
+ assert.equal(ounitechAlertRecord({ errMsg: "589 - (提示)定时关机( 5)" }).message, "Switched off by the timed power schedule");
526
+ assert.equal(ounitechAlertRecord({ errMsg: "205 - 边刷驱动器离线( 4)" }).message, "Side brush driver offline");
527
+ assert.equal(ounitechAlertRecord({ errMsg: "900 - plain words" }).message, "plain words");
528
+ assert.equal(ounitechConsumable({ unitcode: "scraper", workminutes: 60 }).part, "Scraper");
523
529
  assert.equal(ounitechAlertRecord({ errMsg: "999 - (警告)未知( 3)" }).level, "Warning");
524
530
 
525
531
  // Robot 424's live readings on prod (2026-09-30); IP and SIM left out.
@@ -549,7 +555,12 @@ test("alert, reading, task and schedule mapping (pure, recorded shapes)", () =>
549
555
  assert.equal(t.map, null);
550
556
  assert.equal(t.start, "2026-09-30T00:00:00.000Z");
551
557
  assert.equal(ounitechTime("garbage"), null);
552
- assert.deepEqual(ounitechConsumable({ unitcode: "new_part_x", workminutes: 90 }), { part: "new part x", hours: 1.5, days: null });
558
+ assert.deepEqual(ounitechConsumable({ unitcode: "new_part_x", workminutes: 90 }), { part: "New part x", hours: 1.5, days: null });
553
559
  assert.equal(ounitechPowerPlan({ dateList: [6, 7, 9], actionTime: "07:30", actionFlag: 1 }).action, "on");
554
560
  assert.deepEqual(ounitechPowerPlan({ dateList: [6, 7, 9] }).days, [6, 7]);
555
561
  });
562
+
563
+ test("records: 'no station bound (e=59)' means no base station - no error shown", async () => {
564
+ const r = await adapter().getRecords("OFFLINE1");
565
+ assert.deepEqual(r.station, { items: [] });
566
+ });