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

@ciguru/sfdx-ts-adapter

v1.2.1

Published

Provide TS interfaces to the SFDX CLI as functions instead of executing commands on the command line

Downloads

5

Readme

TypeScript Adapter for SFDX CLI

Provide TS interfaces to the SFDX CLI as functions instead of executing commands on the command line. This adapter imports SFDX plugins directly instead of using the full SFDX CLI Tool. This adapter imitates CLI calls to oclif commands instead of directly calling plugin functions/classes, since only the CLI API is officially supported.

Releases

The plugins used for the released adapter version are the same as in the mentioned sfdx-cli version.

Installation

You can install this by either using npm installer.

Requirements

To get started, you'll need to install node v16 (LTS) or greater. While this can be done using an installer from nodejs.com or via an OS-specific package manager.

Install package

> npm install --global @ciguru/sfdx-ts-adapter

Usage

Import adapter

import SFDX from '@ciguru/sfdx-ts-adapter';

Supported Commands


> sfdx auth:accesstoken:store (since v1.0.0)

Call function

await SFDX.auth.accessToken.store(alias, instanceUrl, accessToken);

Parameters

Output Data

ToBe Described


> sfdx auth:sfdxurl:store (since v1.0.0)

Call function

await SFDX.auth.sfdxUrl.store(alias, sfdxUrlFile);

Parameters

Output Data

ToBe Described


> sfdx auth:store (since v1.0.0)

Call function

await SFDX.auth.list();

Output Data

ToBe Described


> sfdx auth:logout (since v1.0.0)

Call function

await SFDX.auth.logout(targetUserName);

Parameters

Output Data

ToBe Described


> sfdx force:apex:execute (since v1.0.0)

Call function

await SFDX.force.apex.execute(targetUserName, apexCodeFile);

Parameters

Output Data

ToBe Described


> sfdx force:apex:test:run (since v1.0.0)

Call function

await SFDX.force.apex.test.run(targetUserName, outputDir, testLevel);

Parameters

Output Data

ToBe Described


> sfdx force:data:bulk:delete (since v1.2.0)

Call function

await SFDX.force.data.bulk.delete(
  targetUserName,
  csvFile,
  sObjectType,
  allowNoMoreFailedBatches,
  allowNoMoreFailedRecords,
);

Parameters

Output Data

ToBe Described


> sfdx force:data:bulk:upsert (since v1.0.0)

Call function

await SFDX.force.data.bulk.upsert(
  targetUserName,
  csvFile,
  externalId,
  sObjectType,
  allowNoMoreFailedBatches,
  allowNoMoreFailedRecords,
);

Parameters

Output Data

ToBe Described


> sfdx force:data:tree:import (since v1.0.0)

Call function

await SFDX.force.data.tree.import(targetUserName, planFile);

Parameters

Output Data

ToBe Described


> sfdx force:data:soql:query (since v1.2.0)

Call function

await SFDX.force.data.soql.queryCsv(targetUserName, csvFile, query, replaceCsvHeader);

Parameters

Output Data

ToBe Described


> sfdx force:mdapi:deploy (since v1.0.0)

Call function

await SFDX.force.mdApi.deploy(targetUserName, testLevel, isCheckOnly, deployDir, deployZip);

Parameters

Output Data

ToBe Described


> sfdx force:mdapi:deploy:report (since v1.0.0)

Call function

await SFDX.force.mdApi.deployReport(targetUserName, jobId, waitTimeout);

Parameters

Output Data

ToBe Described


> sfdx force:mdapi:retrieve (since v1.0.0)

Call function

await SFDX.force.mdApi.retrieve(targetUserName, retrieveTargetDir, manifestFile, packageNames);

Parameters

Output Data

ToBe Described


> sfdx force:org:create (since v1.0.0)

Call function

await SFDX.force.org.create.scratch(alias, isNoAncestors, definitionFile, devHubUserName, duration, overrideDefinition);

Parameters

Output Data

ToBe Described


> sfdx force:org:delete (since v1.0.0)

Call function

await SFDX.force.org.delete(targetUsername, devHubUserName);

Parameters

Output Data

ToBe Described


> sfdx force:org:display (since v1.0.0)

Call function

await SFDX.force.org.display(targetUsername);

Parameters

Output Data

ToBe Described


> sfdx force:package:install (since v1.0.0)

Call function

await SFDX.force.package.install(targetUserName, packageId);

Parameters

Output Data

ToBe Described


> sfdx force:source:convert (since v1.1.0)

Call function

await SFDX.force.source.convert(outputDir, sourcePath);

Parameters

Output Data

ToBe Described


> sfdx force:source:push (since v1.0.0)

Call function

await SFDX.force.source.push(targetUserName, isForceOverwrite);

Parameters

Output Data

ToBe Described