lycheedev 1.0.1 → 1.0.2

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/bin/lycheedev.js CHANGED
@@ -8,7 +8,7 @@ import { runDoctor } from '../src/doctor.js';
8
8
  import { runInstall } from '../src/install.js';
9
9
  import { loadConfig } from '../src/config.js';
10
10
  import { runAutomation } from '../src/python.js';
11
- import { scanClients } from '../src/wow.js';
11
+ import { findSavedVariablesCandidates, scanClients } from '../src/wow.js';
12
12
  import { addonFolderName, exists } from '../src/paths.js';
13
13
 
14
14
  const HELP = `lycheedev - Lychee Dev installer and World of Warcraft automation driver
@@ -226,7 +226,42 @@ function main(argv) {
226
226
  }
227
227
  return forward(['task', sub, ...forwarded, ...passthrough(flags)]);
228
228
  }
229
- case 'sv':
229
+ case 'sv': {
230
+ const sub = rest.shift();
231
+ if (sub === 'find') {
232
+ // The wrapper already knows the plaintext install and can enumerate the
233
+ // account folders itself, so `sv find` needs no profile binding.
234
+ const config = loadConfig();
235
+ const root = flags['wow-root'] || config.wowRoot;
236
+ if (!root || !exists(root)) {
237
+ console.error('error: no World of Warcraft root; run `lycheedev install --wow-root <path>`');
238
+ return 1;
239
+ }
240
+ const candidates = findSavedVariablesCandidates(root, client.flavorFolder);
241
+ if (candidates.length === 0) {
242
+ console.error(`no account-level '${addonFolderName}.lua' found under ${root}`);
243
+ return 1;
244
+ }
245
+ for (const candidate of candidates) console.log(candidate.path);
246
+ return 0;
247
+ }
248
+ if (sub === 'read') {
249
+ if (!flags.ticket) {
250
+ console.error('error: sv read needs --ticket <t>');
251
+ return 1;
252
+ }
253
+ const svPath = flags.sv || client.svPath;
254
+ if (!svPath) {
255
+ console.error('error: no SavedVariables path known for this client; '
256
+ + 'run `lycheedev install`, or pass --sv <path>');
257
+ return 1;
258
+ }
259
+ return forward(['sv', 'read', '--sv', svPath, '--ticket', flags.ticket,
260
+ ...passthrough(flags)]);
261
+ }
262
+ console.error('error: sv needs a subcommand: find or read');
263
+ return 1;
264
+ }
230
265
  case 'profile':
231
266
  case 'status':
232
267
  case 'recover':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lycheedev",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "lycheedev: install the World of Warcraft inspection addon, its in-game automation tooling, and drive it from the command line.",
5
5
  "keywords": [
6
6
  "wow",
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.0.1
9
+ ## Version: 1.0.2
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.0.1
9
+ ## Version: 1.0.2
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.0.1
9
+ ## Version: 1.0.2
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png