Socket
Socket
Sign inDemoInstall

@salesforce/core

Package Overview
Dependencies
Maintainers
22
Versions
490
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.16.10 to 0.16.12

docs/@salesforce/core/0.16.12/Aliases.html

8

dist/lib/authInfo.d.ts

@@ -30,5 +30,5 @@ import { OAuth2Options } from 'jsforce';

* Handles persistence and fetching of user authentication information using
* JWT, oAuth, or refresh tokens. Sets up the refresh flows that jsForce will
* JWT, OAuth, or refresh tokens. Sets up the refresh flows that jsForce will
* use to keep tokens active. An AuthInfo can also be created with an access
* token but can not be persisted to disk.
* token, but AuthInfos created with access tokens can't be persisted to disk.
*

@@ -69,3 +69,3 @@ * @example

/**
* Get a list of all auth files stored in the global directory
* Get a list of all auth files stored in the global directory.
* @returns {Promise<string[]>}

@@ -81,3 +81,3 @@ */

* Get the authorization URL.
* @param {OAuth2Options} options The options to generate the URL
* @param {OAuth2Options} options The options to generate the URL.
* @returns {string}

@@ -84,0 +84,0 @@ */

@@ -183,5 +183,5 @@ "use strict";

* Handles persistence and fetching of user authentication information using
* JWT, oAuth, or refresh tokens. Sets up the refresh flows that jsForce will
* JWT, OAuth, or refresh tokens. Sets up the refresh flows that jsForce will
* use to keep tokens active. An AuthInfo can also be created with an access
* token but can not be persisted to disk.
* token, but AuthInfos created with access tokens can't be persisted to disk.
*

@@ -258,3 +258,3 @@ * @example

/**
* Get a list of all auth files stored in the global directory
* Get a list of all auth files stored in the global directory.
* @returns {Promise<string[]>}

@@ -291,3 +291,3 @@ */

* Get the authorization URL.
* @param {OAuth2Options} options The options to generate the URL
* @param {OAuth2Options} options The options to generate the URL.
* @returns {string}

@@ -294,0 +294,0 @@ */

@@ -12,5 +12,5 @@ import { ConfigFile, ConfigOptions } from './configFile';

/**
* Aliases specify alternate names for different groups of properties used by sfdx, such as orgs.
* By default, all aliases are stored under 'orgs' but groups allow aliases to be applied for
* other commands, settings, and flags.
* Aliases specify alternate names for groups of properties used by the Salesforce CLI, such as orgs.
* By default, all aliases are stored under 'orgs', but groups allow aliases to be applied for
* other commands, settings, and parameters.
*

@@ -17,0 +17,0 @@ * **Note:** All aliases are stored at the global level.

@@ -22,5 +22,5 @@ "use strict";

/**
* Aliases specify alternate names for different groups of properties used by sfdx, such as orgs.
* By default, all aliases are stored under 'orgs' but groups allow aliases to be applied for
* other commands, settings, and flags.
* Aliases specify alternate names for groups of properties used by the Salesforce CLI, such as orgs.
* By default, all aliases are stored under 'orgs', but groups allow aliases to be applied for
* other commands, settings, and parameters.
*

@@ -27,0 +27,0 @@ * **Note:** All aliases are stored at the global level.

import { ConfigFile, ConfigOptions } from './configFile';
/**
* An auth config file that stores information such as access tokens, usernames, etc
* An auth config file that stores information such as access tokens, usernames, etc.,
* in the global sfdx directory (~/.sfdx).

@@ -5,0 +5,0 @@ *

@@ -11,3 +11,3 @@ "use strict";

/**
* An auth config file that stores information such as access tokens, usernames, etc
* An auth config file that stores information such as access tokens, usernames, etc.,
* in the global sfdx directory (~/.sfdx).

@@ -14,0 +14,0 @@ *

@@ -92,3 +92,3 @@ /// <reference types="node" />

/**
* Determines if the config file is read write accessible.
* Determines if the config file is read/write accessible.
* @param {number} perm The permission.

@@ -109,4 +109,4 @@ * @returns {Promise<boolean>} `true` if the user has capabilities specified by perm.

* Write the config file with new contents. If no new contents are passed in
* it will write the existing config contents that was set from {@link ConfigFile.read}, or empty
* if {@link ConfigFile.read} was not called.
* it will write the existing config contents that were set from {@link ConfigFile.read}, or an
* empty file if {@link ConfigFile.read} was not called.
*

@@ -120,3 +120,3 @@ * @param {object} [newContents] The new contents of the file.

*
* @returns {Promise<boolean>} True if the config file exists and has access false otherwise.
* @returns {Promise<boolean>} True if the config file exists and has access, false otherwise.
*/

@@ -123,0 +123,0 @@ exists(): Promise<boolean>;

@@ -126,3 +126,3 @@ "use strict";

/**
* Determines if the config file is read write accessible.
* Determines if the config file is read/write accessible.
* @param {number} perm The permission.

@@ -169,4 +169,4 @@ * @returns {Promise<boolean>} `true` if the user has capabilities specified by perm.

* Write the config file with new contents. If no new contents are passed in
* it will write the existing config contents that was set from {@link ConfigFile.read}, or empty
* if {@link ConfigFile.read} was not called.
* it will write the existing config contents that were set from {@link ConfigFile.read}, or an
* empty file if {@link ConfigFile.read} was not called.
*

@@ -187,3 +187,3 @@ * @param {object} [newContents] The new contents of the file.

*
* @returns {Promise<boolean>} True if the config file exists and has access false otherwise.
* @returns {Promise<boolean>} True if the config file exists and has access, false otherwise.
*/

@@ -190,0 +190,0 @@ async exists() {

@@ -29,4 +29,4 @@ import { JsonMap } from '../types';

values(): ConfigValue[];
forEach(actionFn: any): void;
awaitEach(actionFn: any): Promise<void>;
forEach(actionFn: (key: string, value: ConfigValue) => void): void;
awaitEach(actionFn: (key: string, value: ConfigValue) => Promise<void>): Promise<void>;
getContents(): ConfigContents;

@@ -76,3 +76,3 @@ setContents(contents?: ConfigContents): void;

* @param {ConfigValue} value The value.
* @returns {ConfigContents} Returns the config object
* @returns {ConfigContents} Returns the config object.
*/

@@ -107,3 +107,3 @@ set(key: string, value: ConfigValue): ConfigContents;

/**
* Set the entire config contents.
* Sets the entire config contents.
* @param {ConfigContents} contents The contents.

@@ -110,0 +110,0 @@ */

@@ -80,3 +80,3 @@ "use strict";

* @param {ConfigValue} value The value.
* @returns {ConfigContents} Returns the config object
* @returns {ConfigContents} Returns the config object.
*/

@@ -126,3 +126,3 @@ set(key, value) {

/**
* Set the entire config contents.
* Sets the entire config contents.
* @param {ConfigContents} contents The contents.

@@ -129,0 +129,0 @@ */

import { ConfigFile, ConfigOptions } from './configFile';
import { ConfigContents } from './configStore';
/**

@@ -13,6 +14,6 @@ * Represent a key chain config backed by a json file.

*
* @param {object} newContents the new contents of the file
* @returns {Promise<object>} the written contents
* @param {ConfigContents} newContents the new contents of the file
* @returns {Promise<ConfigContents>} the written contents
*/
write(newContents?: any): Promise<object>;
write(newContents?: ConfigContents): Promise<ConfigContents>;
}

@@ -31,4 +31,4 @@ "use strict";

*
* @param {object} newContents the new contents of the file
* @returns {Promise<object>} the written contents
* @param {ConfigContents} newContents the new contents of the file
* @returns {Promise<ConfigContents>} the written contents
*/

@@ -35,0 +35,0 @@ async write(newContents) {

@@ -115,6 +115,6 @@ import { ConfigContents, ConfigValue } from './configStore';

* Writes SfdxConfg properties taking into account encrypted properties.
* @param newContents The new SfdxConfig value to persist.
* @return {Promise<object>}
* @param {ConfigContents} newContents The new SfdxConfig value to persist.
* @return {Promise<ConfigContents>}
*/
write(newContents?: any): Promise<object>;
write(newContents?: ConfigContents): Promise<ConfigContents>;
/**

@@ -121,0 +121,0 @@ * Sets a value for a property.

@@ -146,4 +146,4 @@ "use strict";

* Writes SfdxConfg properties taking into account encrypted properties.
* @param newContents The new SfdxConfig value to persist.
* @return {Promise<object>}
* @param {ConfigContents} newContents The new SfdxConfig value to persist.
* @return {Promise<ConfigContents>}
*/

@@ -150,0 +150,0 @@ async write(newContents) {

@@ -45,5 +45,5 @@ import { Logger } from './logger';

* @param [options] HTTP API request options.
* @returns {Promise<any>} The request Promise.
* @returns {Promise<object>} The request Promise.
*/
request(request: RequestInfo | string, options?: any): Promise<any>;
request(request: RequestInfo | string, options?: any): Promise<object>;
/**

@@ -50,0 +50,0 @@ * @returns {string} The Force API base url for the instance.

@@ -21,2 +21,6 @@ "use strict";

/**
* Use thenCall() method defined in JSForce when returned connection requests need it
*/
Promise.prototype['thenCall'] = jsforce_1.Promise.prototype.thenCall;
/**
* Handles connections and requests to Salesforce Orgs.

@@ -80,3 +84,3 @@ * @extends jsforce.Connection

* @param [options] HTTP API request options.
* @returns {Promise<any>} The request Promise.
* @returns {Promise<object>} The request Promise.
*/

@@ -103,3 +107,3 @@ async request(request, options) {

this.logger.debug(`response for org versions: ${versions}`);
return lodash_1.maxBy(versions, (version) => version.version).version;
return lodash_1.maxBy(versions, (version) => version['version'])['version'];
}

@@ -106,0 +110,0 @@ /**

@@ -0,1 +1,2 @@

import { KeyChain } from './keyChainImpl';
/**

@@ -7,2 +8,2 @@ * Gets the os level keychain impl.

*/
export declare const retrieveKeychain: (platform: any) => Promise<any>;
export declare const retrieveKeychain: (platform: any) => Promise<KeyChain>;

@@ -27,3 +27,3 @@ /**

*/
setPassword(opts: any, fn: any): Promise<any>;
setPassword(opts: any, fn: any): Promise<void>;
}

@@ -36,3 +36,3 @@ /**

setPassword(opts: any, fn: any): Promise<any>;
protected isValidFileAccess(cb: (val?) => Promise<void>): Promise<any>;
protected isValidFileAccess(cb: (val?) => Promise<void>): Promise<void>;
}

@@ -43,3 +43,3 @@ /**

export declare class GenericUnixKeychainAccess extends GenericKeychainAccess {
protected isValidFileAccess(cb: (val?) => Promise<void>): Promise<any>;
protected isValidFileAccess(cb: (val?) => Promise<void>): Promise<void>;
}

@@ -61,1 +61,2 @@ /**

};
export declare type KeyChain = GenericUnixKeychainAccess | GenericWindowsKeychainAccess | KeychainAccess;
/// <reference types="node" />
import { Writable } from 'stream';
import * as Bunyan from 'bunyan-sfdx-no-dtrace';
export declare type Serializer = (input: any) => any;
export interface Serializers {
[key: string]: Serializer;
}
export interface LoggerOptions {
name: string;
serializers?: any;
serializers?: Serializers;
src?: boolean;

@@ -165,3 +170,3 @@ level?: LoggerLevelValue;

*/
getBunyanLogger(): any;
getBunyanLogger(): Bunyan;
/**

@@ -168,0 +173,0 @@ * Compares the requested log level with the current log level. Returns true if

@@ -10,2 +10,18 @@ "use strict";

/**
* A Bunyan `Serializer` function.
*
* @callback Serializer
* @param {any} input The input to be serialized.
* @returns {any} The serialized input.
*
* @see {@link https://github.com/cwallsfdc/node-bunyan#serializers|Bunyan Serializers API}
*/
/**
* A collection of named `Serializer`s.
*
* @typedef {Object<string, Serializer>} Serializers
*
* @see {@link https://github.com/cwallsfdc/node-bunyan#serializers|Bunyan Serializers API}
*/
/**
* The common set of `Logger` options.

@@ -15,3 +31,3 @@ *

* @property {string} name The logger name.
* @property {any} [serializers] The logger's serializers.
* @property {Serializers} [serializers] The logger's serializers.
* @property {boolean} [src] Whether or not to log source file, line, and function information.

@@ -549,4 +565,4 @@ * @property {LoggerLevelValue} [level] The desired log level.

if (_.isPlainObject(key)) {
expElement = key.regex;
expName = key.name;
expElement = key['regex'];
expName = key['name'];
}

@@ -553,0 +569,0 @@ const hiddenAttrMessage = `"<${expName} - ${HIDDEN}>"`;

@@ -107,3 +107,3 @@ /// <reference types="node" />

* @param {string} packageName The name of the npm package.
* @param {string} bundle Name of the bundle to load.
* @param {string} bundleName The name of the bundle to load.
* @returns {Messages}

@@ -110,0 +110,0 @@ */

@@ -225,3 +225,3 @@ "use strict";

* @param {string} packageName The name of the npm package.
* @param {string} bundle Name of the bundle to load.
* @param {string} bundleName The name of the bundle to load.
* @returns {Messages}

@@ -228,0 +228,0 @@ */

@@ -10,2 +10,3 @@ /**

import { TableOptions } from 'cli-ux/lib/styled/table';
import { IPromptOptions } from 'cli-ux';
import { Chalk, ColorSupport } from 'chalk';

@@ -68,2 +69,42 @@ export declare const CustomColors: {

/**
* Prompt the user for input
* @param {string} name The string that the user sees when prompted for information
* @param {IPromptOptions} options Configuration options for the prompt { type: 'normal' | 'mask' | 'hide' }
* @returns {Promise<string>} The user input to the prompt
*/
prompt(name: string, options?: IPromptOptions): Promise<string>;
/**
* Prompt the user for confirmation
* @param {string} message The message displayed to the user
* @returns {Promise<boolean>} true if the user inputs y or yes, and false if the user inputs n, or no
*/
confirm(message: string): Promise<boolean>;
/**
* Start a spinner action after displaying the given message
* @param message The message displayed to the user
*/
startSpinner(message: string): void;
/**
* Pause the spinner and call the given function
* @param fn The function to be called in the pause
* @param icon The string displayed to the user
* @returns The result returned by the passed in function
*/
pauseSpinner<T>(fn: () => T, icon?: string): T;
/**
* Update the spinner status
* @param status The message displayed to the user
*/
setSpinnerStatus(status?: string): void;
/**
* Gets the spinner status
* @returns {string} the spinner status
*/
getSpinnerStatus(): string;
/**
* Stop the spinner action
* @param message The message displayed to the user
*/
stopSpinner(message?: string): void;
/**
* Logs a warning as `WARN` level and conditionally writes to `stderr` if the log

@@ -70,0 +111,0 @@ * level is `WARN` or above and stream output is enabled. The message is added

@@ -102,2 +102,56 @@ "use strict";

/**
* Prompt the user for input
* @param {string} name The string that the user sees when prompted for information
* @param {IPromptOptions} options Configuration options for the prompt { type: 'normal' | 'mask' | 'hide' }
* @returns {Promise<string>} The user input to the prompt
*/
async prompt(name, options = {}) {
return this.cli.prompt(name, options);
}
/**
* Prompt the user for confirmation
* @param {string} message The message displayed to the user
* @returns {Promise<boolean>} true if the user inputs y or yes, and false if the user inputs n, or no
*/
async confirm(message) {
return this.cli.confirm(message);
}
/**
* Start a spinner action after displaying the given message
* @param message The message displayed to the user
*/
startSpinner(message) {
this.cli.action.start(message);
}
/**
* Pause the spinner and call the given function
* @param fn The function to be called in the pause
* @param icon The string displayed to the user
* @returns The result returned by the passed in function
*/
pauseSpinner(fn, icon) {
return this.cli.action.pause(fn, icon);
}
/**
* Update the spinner status
* @param status The message displayed to the user
*/
setSpinnerStatus(status) {
this.cli.action.status = status;
}
/**
* Gets the spinner status
* @returns {string} the spinner status
*/
getSpinnerStatus() {
return this.cli.action.status;
}
/**
* Stop the spinner action
* @param message The message displayed to the user
*/
stopSpinner(message) {
this.cli.action.stop(message);
}
/**
* Logs a warning as `WARN` level and conditionally writes to `stderr` if the log

@@ -104,0 +158,0 @@ * level is `WARN` or above and stream output is enabled. The message is added

{
"name": "@salesforce/core",
"version": "0.16.10",
"version": "0.16.12",
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",

@@ -45,2 +45,3 @@ "main": "dist/exported",

"devDependencies": {
"@salesforce/dev-config": "1.0.4",
"@types/chai": "4.0.4",

@@ -60,4 +61,2 @@ "@types/lodash": "4.14.88",

"ts-node": "4.1.0",
"tslint": "5.9.1",
"tslint-microsoft-contrib": "5.0.2",
"typescript": "2.6.2",

@@ -64,0 +63,0 @@ "xunit-file": "1.0.0"

# Salesforce DX Core Library (Beta)
This library provides client side management of sfdx projects, org authentication, connections to Salesforce APIs, and other various utilities.
This library provides client-side management of Salesforce DX projects, org authentication, connections to Salesforce APIs, and other various utilities.

@@ -4,0 +4,0 @@ See the [API documentation](https://developer.salesforce.com/media/salesforce-cli/docs/@salesforce/core/index.html).

@@ -21,1 +21,2 @@ // Type definitions for jsforce 1.8

export { OAuth2, OAuth2Options } from './oauth2';
export { Promise } from './promise';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc