oltc-selector 1.2.7 → 1.2.8

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  填工况,给出 2025 目录里**最低满足**的型号。网页和 `oltc` CLI 共用同一份 `selectOltc` 引擎。
4
4
 
5
- **CLI(无报价):** `npx -y oltc-selector@1.2.7`,命令是 `oltc`。Agent 技能包在独立仓库 [`erict16/huaming-oltc-selector`](https://github.com/erict16/huaming-oltc-selector)。
5
+ **CLI(无报价):** `npx -y oltc-selector@1.2.8`,命令是 `oltc`。Agent 技能包在独立仓库 [`erict16/huaming-oltc-selector`](https://github.com/erict16/huaming-oltc-selector)。
6
6
  **网页:** [oltc-selector.vercel.app](https://oltc-selector.vercel.app/) · [GitHub Pages](https://erict16.github.io/oltc-selector/)
7
7
 
8
8
  私人辅助,不是厂家官网。型号是起点,出 OS 前要工程确认。
package/bin/oltc.js CHANGED
@@ -1307,7 +1307,7 @@ function seriesMatchesMedium(s, input) {
1307
1307
  if (input.mounting === "dry_type") return s.medium === "dry";
1308
1308
  if (input.preferVacuum) return true;
1309
1309
  if (input.medium === "oil_vacuum") return s.vacuum || s.medium === "oil_vacuum";
1310
- if (input.medium === "oil") return s.medium === "oil" || s.medium === "oil_vacuum";
1310
+ if (input.medium === "oil") return s.medium === "oil" && !s.vacuum;
1311
1311
  return true;
1312
1312
  }
1313
1313
  function adequacyScore(s, input, current, um, unitCount) {
@@ -1716,10 +1716,9 @@ function selectOltc(input) {
1716
1716
  );
1717
1717
  if (vac.length) final = vac;
1718
1718
  } else if (input.medium === "oil") {
1719
- const oil = results.filter(
1719
+ final = results.filter(
1720
1720
  (r) => SERIES.find((s) => s.id === r.seriesId)?.vacuum === false
1721
1721
  );
1722
- if (oil.length) final = oil;
1723
1722
  }
1724
1723
  final.sort((a, b) => {
1725
1724
  if (a.unitCount !== b.unitCount) return a.unitCount - b.unitCount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oltc-selector",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Huaming OLTC/OCTC type selection CLI. No prices. Same engine as the web app.",
5
5
  "bin": {
6
6
  "oltc": "bin/oltc.js"