device-shots 0.5.12 → 0.6.0

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -356,25 +356,13 @@ async function setAndroidDemoMode(serial, time = "9:30") {
356
356
  adbShellSync(adb, serial, "settings put global sysui_demo_allowed 1");
357
357
  adbShellSync(adb, serial, "settings put global sysui_tuner_demo_on 1");
358
358
  await sleep(500);
359
- let r = adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command enter`);
360
- process.stderr.write(`[demo] enter: ${r}
361
- `);
359
+ adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command enter`);
362
360
  await sleep(1e3);
363
- r = adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command clock --es hhmm ${hhmm}`);
364
- process.stderr.write(`[demo] clock: ${r}
365
- `);
366
- r = adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command network --es wifi show --es level 4`);
367
- process.stderr.write(`[demo] wifi: ${r}
368
- `);
369
- r = adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command network --es mobile show --es datatype none --es level 4`);
370
- process.stderr.write(`[demo] mobile: ${r}
371
- `);
372
- r = adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command battery --es level 100 --es plugged false`);
373
- process.stderr.write(`[demo] battery: ${r}
374
- `);
375
- r = adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command notifications --es visible false`);
376
- process.stderr.write(`[demo] notif: ${r}
377
- `);
361
+ adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command clock --es hhmm ${hhmm}`);
362
+ adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command network --es wifi show --es level 4`);
363
+ adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command network --es mobile show --es datatype none --es level 4`);
364
+ adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command battery --es level 100 --es plugged false`);
365
+ adbShellSync(adb, serial, `am broadcast -a ${ACTION} --es command notifications --es visible false`);
378
366
  await sleep(1e3);
379
367
  }
380
368
  async function clearAndroidDemoMode(serial) {
@@ -865,7 +853,7 @@ async function frameCommand(dir, options) {
865
853
  var program = new Command();
866
854
  program.name("device-shots").description(
867
855
  "Capture and frame mobile app screenshots from iOS simulators and Android emulators"
868
- ).version("0.5.12");
856
+ ).version("0.6.0");
869
857
  program.command("capture").description("Capture screenshots from running devices").argument("[name]", "Screenshot name").option("-b, --bundle-id <id>", "App bundle ID").option("-o, --output <dir>", "Output directory").option("-p, --platform <platform>", "ios, android, or both").option("--no-frame", "Skip framing after capture").option("--time <time>", "Status bar time", "9:41").action(async (name, opts) => {
870
858
  await captureCommand({ name, ...opts });
871
859
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "device-shots",
3
- "version": "0.5.12",
3
+ "version": "0.6.0",
4
4
  "description": "Capture and frame mobile app screenshots from iOS simulators and Android emulators",
5
5
  "type": "module",
6
6
  "bin": {