Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { fs, Messages } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import * as jsdiff from 'diff';
import { promises as fsPromise } from 'fs';
import { dirname, isAbsolute, join, relative } from 'path';
import * as tmp from 'tmp';
import { getResolver, resolveMetadata } from '../../metadataResolvers';
import { copyFileFromRef, getIgnore, purgeFolder, spawnPromise } from '../../util';
interface DiffResults {
changed: string[];
removed: string[];
}
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-git-packager', 'package');
export default class Package extends SfdxCommand {
public static description = messages.getMessage('commandDescription');
public static examples = [
'$ sfdx git:package -s my-awesome-feature -t master -d deploy/my-feature',
'$ sfdx git:package -d deploy/my-feature',
'$ sfdx git:package -s feature-b -d deploy/feature-b'
];
// not sure what this does...
import { flags, SfdxCommand } from '@salesforce/command';
import { Messages } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import { get } from 'request-promise';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ApexLogGet extends SfdxCommand {
public static description = messages.getMessage('codeclean.check.description');
public static examples = [];
public static readonly flagsConfig = {
id: flags.string({
char: 'i',
description: messages.getMessage('codeclean.flags.id'),
required: true
})
};
import { flags, SfdxCommand } from '@salesforce/command';
import { AuthInfo, Messages } from '@salesforce/core';
import { AnyJson, getString } from '@salesforce/ts-types';
import * as jsforce from 'jsforce';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ApexLogGet extends SfdxCommand {
public static description = messages.getMessage('auth.username.login.description');
public static examples = [];
public static readonly flagsConfig = {
instanceurl: flags.url({
char: 'r',
description: messages.getMessage('auth.username.login.flags.instanceurl')
}),
username: flags.string({
char: 'u',
import { flags, SfdxCommand } from '@salesforce/command';
import { Global, Messages, SfdxError } from '@salesforce/core';
import { JsonMap } from '@salesforce/ts-types';
import * as fsx from 'fs-extra';
import * as open from 'open';
import { join } from 'path';
import * as url from 'url';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ConnectedAppCreate extends SfdxCommand {
public static description = messages.getMessage('workbench.open.description');
public static examples = [];
protected static flagsConfig = {
targetworkbenchurl: flags.string({
char: 't',
description: messages.getMessage('workbench.open.flags.targetworkbenchurl')
}),
setdefaultworkbenchurl: flags.string({
char: 's',
import { flags, SfdxCommand } from '@salesforce/command';
import { Messages, SfdxError } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import * as fs from 'fs';
import * as urlExists from 'url-exists';
import * as files from '../../../lib/files';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ConnectedAppCreate extends SfdxCommand {
public static description = messages.getMessage('source.oss.description');
public static examples = [];
public static readonly flagsConfig = {
repository: flags.string({
char: 'r',
description: messages.getMessage('source.oss.flags.repository'),
required: true
}),
path: flags.string({
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import { flags, SfdxCommand } from "@salesforce/command";
import { Messages, SfdxError } from "@salesforce/core";
import { AnyJson } from "@salesforce/ts-types";
import * as fs from "fs";
import { InfoMessages, MessageWriter, CSVWriter } from "../../api/messages";
import Org from "../../api/org";
import Server from "../../api/server";
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages("apexlink", "check");
export default class Check extends SfdxCommand {
public static description = messages.getMessage("commandDescription");
public static examples = [
`$ sfdx apexlink:check`,
`$ sfdx apexlink:check --verbose --warnings projects/myproject`,
`$ sfdx apexlink:check --zombies --json myns=projects/base projects/extension`
];
public static args = [
{
import { flags, SfdxCommand } from '@salesforce/command';
import { Messages } from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import { get } from 'request-promise';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ApexLogGet extends SfdxCommand {
public static description = messages.getMessage('codeclean.results.description');
public static examples = [];
public static readonly flagsConfig = {
id: flags.string({
char: 'i',
description: messages.getMessage('codeclean.flags.id'),
required: true
})
};
import { flags, SfdxCommand } from '@salesforce/command';
import { Messages } from '@salesforce/core';
import { set } from '@salesforce/kit';
import { writeFile } from 'fs-extra';
import { MetadataInfo, SaveResult } from 'jsforce';
import * as forge from 'node-forge';
import { getSelfSignedCertificate } from '../../../lib/certs';
// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname);
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
// or any library that is using the messages framework can also be loaded this way.
const messages = Messages.loadMessages('sfdx-waw-plugin', 'waw');
export default class ConnectedAppCreate extends SfdxCommand {
public static description = messages.getMessage('connectedapp.create.description');
public static examples = [];
public static readonly flagsConfig = {
name: flags.string({
char: 'n',
description: messages.getMessage('connectedapp.create.flags.name'),
required: true
}),
label: flags.string({