npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apexlink

v2.3.5

Published

SFDX CLI plugin for Apexlink Salesforce metadata analysis library

Downloads

82

Readme

ApexLink

SFDX CLI plugin for the apex-link Salesforce metadata static analysis library. This plugin provides a simple 'check' command that can be used to examine metadata for errors, in addition it can report on various warnings such as unused fields & methods or variable shadowing. The command can also be used to obtain Apex class dependencies in either CSV or JSON format.

SFDX CLI

To install the CLI plugin (from npm)

sfdx plugins:install apexlink

Check the installation was successful with

sfdx plugins
 

This should show apexlink in the plugin list.

To perform a simple validity check use:

sfdx apexlink:check <directory>

This parses and performs semantic checks on the code and reports any errors, such as types not being found. The library contains a pretty comprehensive set of platform types that it validates against. This command does not require an sfdx project, if you omit the directory it will search the current directory for metadata. To also see warnings add the argument "--verbose".

Unused fields, properties & methods

You can use the check command to report on unused fields, properties and methods of Apex classes.

sfdx apexlink:check --verbose --unused <directory>

Class dependencies

The check command can also report Apex class dependencies with:

sfdx apexlink:check --depends --json <directory>

If you omit the --json the dependency default format is CSV.

Downloading metadata

To download metadata for use by apexlink use:

sfdx apexlink:gulp --namespaces="unmanaged,ns1"

If you org does not have a namespace you can use "unmanaged" to download umanaged metadata, if the org does have a namespaces you should use it instead. The metadata will be stored in a .apexlink/gulp directory within your workspace. Note: to make use of the metadata you need to add settings to sfdx-project.json, see apex-assist README for instructions.

Usage

$ npm install -g apexlink
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
apexlink/2.3.5 darwin-x64 node-v16.6.0
$ sfdx --help [COMMAND]
USAGE
  $ sfdx COMMAND
...

sfdx apexlink:check [--depends] [--unused] [--nocache] [--debug] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Validate Apex code in current or passed directories

USAGE
  $ sfdx apexlink:check [--depends] [--unused] [--nocache] [--debug] [--verbose] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

ARGUMENTS
  DIRECTORY  directory to search for metadata files, defaults to current directory

OPTIONS
  --debug                                                                           show debug log

  --depends                                                                         output class dependencies rather
                                                                                    than issues, in CSV (default) or
                                                                                    JSON format

  --json                                                                            show output in json format (disables
                                                                                    --verbose)

  --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)  [default: warn] logging level for
                                                                                    this command invocation

  --nocache                                                                         don't use cache during loading

  --unused                                                                          show unused messages, requires
                                                                                    --verbose

  --verbose                                                                         show warning messages

EXAMPLES
  $ sfdx apexlink:check
  $ sfdx apexlink:check --verbose $HOME/myproject
  $ sfdx apexlink:check --json --depends $HOME/myproject

See code: src/commands/apexlink/check.ts

sfdx apexlink:gulp [--namespaces <array>] [--debug] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Download metadata to enable apex-link semantic analysis

USAGE
  $ sfdx apexlink:gulp [--namespaces <array>] [--debug] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -u, --targetusername=targetusername                                               username or alias for the target
                                                                                    org; overrides default target org

  --apiversion=apiversion                                                           override the api version used for
                                                                                    api requests made by this command

  --debug                                                                           show progress messages

  --json                                                                            format output as json

  --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)  [default: warn] logging level for
                                                                                    this command invocation

  --namespaces=namespaces                                                           gulp metadata for these namespaces,
                                                                                    if not set 'unmanaged' is loaded

EXAMPLES
  $ sfdx apexlink:gulp
  $ sfdx apexlink:gulp --debug --namespaces="ns1,ns2"

See code: src/commands/apexlink/gulp.ts

sfdx apexlink:packages [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Display information about installed packages

USAGE
  $ sfdx apexlink:packages [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -u, --targetusername=targetusername                                               username or alias for the target
                                                                                    org; overrides default target org

  --apiversion=apiversion                                                           override the api version used for
                                                                                    api requests made by this command

  --json                                                                            format output as json

  --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)  [default: warn] logging level for
                                                                                    this command invocation

EXAMPLES
  $ sfdx apexlink:packages
  $ sfdx apexlink:packages --debug"

See code: src/commands/apexlink/packages.ts

Version License Known Vulnerabilities