Git Product home page Git Product logo

dockhunt-cli's People

Contributors

jeremysarchet avatar maxmusing avatar raxityo avatar robertcoopercode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dockhunt-cli's Issues

Error when scanning dock

When I open the app or run the script npx dockhunt, it will throw an error:

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError: Cannot read properties of undefined (reading 'dict')
    at getAppNamesToIconPaths (/snapshot/dist/index.cjs)
    at getDockContents (/snapshot/dist/index.cjs)

Test env

MacBook Pro (Retina, 15-inch, Mid 2015)
MacOS Mojave 10.14.6

Catalyst apps throw a runtime error

The Catalyst apps (iPad apps compatible with apple machines running on Apple Silicon) don't have the same structure as native MacOS apps, so the lookup for icons fails for these apps since AppName.app/Contents/Resources directory doesn't exist for these apps.

Icon: Soulver, Firefox Developer Edition

Beautiful website!

Noticed that Soulver and Firefox are not detected correctly:
image

I've already converted the icns files to PNG using sips and optimized them using imageoptim:

Note that you can also get the right icon file name using something like:

defaults read /Applications/<Any-App>.app/Contents/Info.plist CFBundleIconFile

e.g.

defaults read '/Applications/Firefox Developer Edition.app/Contents/Info.plist' CFBundleIconFile

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

Original issue: Basedash/dockhunt#28

Describe the bug

​Scanning your dock...

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at getAppNamesToIconPaths (/snapshot/dist/index.cjs)
    at getDockContents (/snapshot/dist/index.cjs)

To Reproduce
Steps to reproduce the behavior:

  1. Open DuckHunt
  2. See error
  3. Cry.

Expected behavior

No error.

Screenshots
image

Additional context

Ventura 13.1 (22C65)

Darwin asgard07.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64

Feature request: Support Catalyst apps

Related to #7 but a feature request

Example structure of the Mix app, which is a catalyst app:

$ ls -l /Applications/Mix.app/
total 0
lrw-r--r--  1 root  wheel   15 Jan 20 09:20 WrappedBundle -> Wrapper/Mix.app
drwxr-xr-x  5 root  wheel  160 Jan 20 09:20 Wrapper

$ ls -l /Applications/Mix.app/Wrapper/
total 16
-rw-r--r--   1 root  wheel   618 Jan 20 09:20 BundleMetadata.plist
drwxr-xr-x@ 87 root  wheel  2784 Jan 20 09:20 Mix.app
-rw-r--r--   1 root  wheel  1353 Jan 20 09:20 iTunesMetadata.plist

$ ls -l /Applications/Mix.app/Wrapper/Mix.app/
total 41656
-rw-r--r--@ 1 root  wheel      6613 Jan 18 12:59 ActivityCell.nib
-rw-r--r--@ 1 root  wheel      3063 Jan 18 12:59 [email protected] # AppIcon 
-rw-r--r--@ 1 root  wheel      3787 Jan 18 12:59 AppIcon76x76@2x~ipad.png # AppIcon used in the dock
-rw-r--r--@ 1 root  wheel    975960 Jan 18 12:59 Assets.car
# ...
# Rest of the files 
# ...

I am happy to open a PR for this!

TypeError: Cannot read properties of undefined (reading '0')

When I run the dockhunt app I get the following error....

Scanning your dock...

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError: Cannot read properties of undefined (reading '0')
    at getAppNamesToIconPaths (/snapshot/dist/index.cjs)
    at getDockContents (/snapshot/dist/index.cjs)

When I run the CLI I get this error....

const appDirectoryUrl = parsedAppData.dict[0].dict[0].string[0];
                                                          ^
TypeError: Cannot read properties of undefined (reading '0')

My working theory is that I have intentionally added in spaces in my dock that don't show as apps and that breaks the script that gets the app icons.

How to add spaces: https://dev.to/shadowfaxrodeo/til-how-to-add-spaces-to-the-dock-on-macos-m50.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.