poi-plugin-item-improvement2-beta 0.0.32021 → 0.0.32022

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.
@@ -51,7 +51,7 @@
51
51
  "SHARE_PROJECT_CONFIGURATION_FILES": "true",
52
52
  "git-widget-placeholder": "main",
53
53
  "javascript.preferred.runtime.type.id": "node",
54
- "last_opened_file_path": "/Users/sakana/code/plugin-item-improvement/views",
54
+ "last_opened_file_path": "/Users/sakana/code/plugin-item-improvement/assets",
55
55
  "node.js.detected.package.eslint": "true",
56
56
  "node.js.detected.package.tslint": "true",
57
57
  "node.js.selected.package.eslint": "(autodetect)",
@@ -63,8 +63,8 @@
63
63
  }]]></component>
64
64
  <component name="RecentsManager">
65
65
  <key name="CopyFile.RECENT_KEYS">
66
- <recent name="$PROJECT_DIR$/views" />
67
66
  <recent name="$PROJECT_DIR$/assets" />
67
+ <recent name="$PROJECT_DIR$/views" />
68
68
  </key>
69
69
  </component>
70
70
  <component name="SharedIndexes">
@@ -90,7 +90,7 @@
90
90
  <workItem from="1767266330648" duration="5077000" />
91
91
  <workItem from="1767272485923" duration="3120000" />
92
92
  <workItem from="1767275985364" duration="4189000" />
93
- <workItem from="1767280935871" duration="4396000" />
93
+ <workItem from="1767280935871" duration="5251000" />
94
94
  </task>
95
95
  <servers />
96
96
  </component>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poi-plugin-item-improvement2-beta",
3
- "version": "0.0.32021",
3
+ "version": "0.0.32022",
4
4
  "description": "use new data source",
5
5
  "main": "index.es",
6
6
  "scripts": {
@@ -92,18 +92,18 @@ const baseImprovementDataSelector = (0, _reselect.createSelector)([_selectors.wc
92
92
 
93
93
  const arsenalAll = loadNedbAsMap(ARSENAL_NEDB_PATH, 'id');
94
94
  const itemsDb = loadNedbAsMap(ITEMS_NEDB_PATH, 'id');
95
- const arsenalWeek = loadNedbAsMap(ARSENAL_WEEK_NEDB_PATH, 'id'); // <== 本地 week
95
+ const arsenalWeek = loadNedbAsMap(ARSENAL_WEEK_NEDB_PATH, 'id'); // 覆盖 wctf db,后续 _.get(db, 'arsenal_weekday') 就能拿到本地 week
96
+
97
+ const dbWithWeek = _extends({}, db, {
98
+ arsenal_weekday: arsenalWeek
99
+ });
96
100
 
97
101
  return (0, _lodash.default)(arsenalAll).keys().map(itemId => {
98
102
  const item = itemsDb[itemId] || {};
99
- const weekData = arsenalWeek[itemId] || {}; // 取这个 item 的 week 数据
100
-
101
103
  const assistants = (0, _lodash.default)(_lodash.default.range(7).concat(-1)).map(day => [day, (0, _lodash.default)(item.improvement).flatMap(entry => (0, _lodash.default)(entry.req).flatMap(([days, ships]) => day === -1 || days[day] ? ships : []).groupBy(id => uniqMap[id]).mapValues(ids => (0, _lodash.default)(ids).sortBy(id => (chains[id] || []).indexOf(id)).take(1).value()).values().flatten().map(id => window.i18n['poi-plugin-item-improvement2-beta'].__(window.i18n.resources.__(_lodash.default.get($const, ['$ships', id, 'api_name'], 'None')))).value()).join('/')]).fromPairs().value();
102
104
  return _extends({}, _lodash.default.get($const, ['$equips', item.id], {}), item, {
103
105
  priority: 0,
104
- assistants,
105
- week: weekData // <== 注入 week
106
-
106
+ assistants
107
107
  });
108
108
  }).value();
109
109
  });