@kitalive/sfdx-plugin 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +326 -21
- package/lib/bulk.d.ts +22 -0
- package/lib/bulk.js +235 -0
- package/lib/bulk.js.map +1 -0
- package/lib/commands/kit/data/bulk/delete.d.ts +18 -0
- package/lib/commands/kit/data/bulk/delete.js +64 -0
- package/lib/commands/kit/data/bulk/delete.js.map +1 -0
- package/lib/commands/kit/data/bulk/insert.d.ts +2 -0
- package/lib/commands/kit/data/bulk/insert.js +5 -0
- package/lib/commands/kit/data/bulk/insert.js.map +1 -0
- package/lib/commands/kit/data/bulk/query.d.ts +15 -0
- package/lib/commands/kit/data/bulk/query.js +50 -0
- package/lib/commands/kit/data/bulk/query.js.map +1 -0
- package/lib/commands/kit/data/bulk/update.d.ts +2 -0
- package/lib/commands/kit/data/bulk/update.js +5 -0
- package/lib/commands/kit/data/bulk/update.js.map +1 -0
- package/lib/commands/kit/data/bulk/upsert.d.ts +2 -48
- package/lib/commands/kit/data/bulk/upsert.js +2 -149
- package/lib/commands/kit/data/bulk/upsert.js.map +1 -1
- package/lib/commands/kit/script/execute.d.ts +13 -0
- package/lib/commands/kit/script/execute.js +54 -0
- package/lib/commands/kit/script/execute.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +5 -3
|
@@ -1,152 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
const dayjs = require("dayjs");
|
|
6
|
-
const csv = require("fast-csv");
|
|
7
|
-
const fs = require("fs-extra");
|
|
8
|
-
const path = require("path");
|
|
9
|
-
const utils_1 = require("../../../../utils");
|
|
10
|
-
const convert_1 = require("../csv/convert");
|
|
11
|
-
const convert_2 = require("../csv/convert");
|
|
12
|
-
// monkey patch
|
|
13
|
-
batcher_js_1.Batcher.prototype['splitIntoBatches'] = arg => arg;
|
|
14
|
-
function normalizeDateString(str, format) {
|
|
15
|
-
if (!str)
|
|
16
|
-
return str;
|
|
17
|
-
const d = dayjs(str);
|
|
18
|
-
return format ? d.format(format) : d.toISOString();
|
|
19
|
-
}
|
|
20
|
-
const converters = {
|
|
21
|
-
date: value => normalizeDateString(value, 'YYYY-MM-DD'),
|
|
22
|
-
datetime: normalizeDateString
|
|
23
|
-
};
|
|
24
|
-
const csvFlags = convert_1.default['flagsConfig'];
|
|
25
|
-
class UpsertCommand extends command_1.SfdxCommand {
|
|
26
|
-
async run() {
|
|
27
|
-
const { csvfile, mapping, converter, encoding, delimiter, quote, skiplines, trim, setnull } = this.flags;
|
|
28
|
-
const mappingJson = (mapping) ? (await fs.readJson(mapping)) : undefined;
|
|
29
|
-
const script = converter ? this.loadScript(converter) : {};
|
|
30
|
-
const fieldTypes = await this.getFieldTypes(this.flags.object);
|
|
31
|
-
this.ux.startSpinner('Processing csv');
|
|
32
|
-
if (script.start)
|
|
33
|
-
await script.start(this);
|
|
34
|
-
let rows = await this.parseCsv(fs.createReadStream(csvfile), {
|
|
35
|
-
encoding,
|
|
36
|
-
delimiter,
|
|
37
|
-
quote,
|
|
38
|
-
skiplines,
|
|
39
|
-
trim: !!trim,
|
|
40
|
-
setnull,
|
|
41
|
-
mapping: mappingJson,
|
|
42
|
-
convert: script.convert,
|
|
43
|
-
fieldTypes
|
|
44
|
-
});
|
|
45
|
-
if (script.finish) {
|
|
46
|
-
const result = await script.finish(rows, this);
|
|
47
|
-
if (result)
|
|
48
|
-
rows = result;
|
|
49
|
-
}
|
|
50
|
-
this.ux.stopSpinner();
|
|
51
|
-
if (this.flags.save || this.flags.saveonly) {
|
|
52
|
-
const base = path.basename(csvfile, path.extname(csvfile));
|
|
53
|
-
this.saveCsv(path.join(path.dirname(csvfile), base + '.converted.csv'), rows);
|
|
54
|
-
if (this.flags.saveonly)
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
this.ux.startSpinner('Bulk Upsert');
|
|
58
|
-
try {
|
|
59
|
-
const job = await this.createJob(this.flags.object, {
|
|
60
|
-
extIdField: this.flags.externalid,
|
|
61
|
-
concurrencyMode: this.flags.concurrencymode,
|
|
62
|
-
assignmentRuleId: this.flags.assignmentruleid
|
|
63
|
-
});
|
|
64
|
-
const batches = utils_1.chunk(rows, this.flags.batchsize);
|
|
65
|
-
const result = await this.executeBatches(job, batches, this.flags.object, this.flags.wait);
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
this.ux.stopSpinner('error');
|
|
70
|
-
throw e;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
async parseCsv(input, options) {
|
|
74
|
-
const { encoding, delimiter, quote, skiplines, trim, mapping, convert, setnull, fieldTypes } = options !== null && options !== void 0 ? options : {};
|
|
75
|
-
return await convert_2.parseCsv(input, { encoding, delimiter, quote, skiplines, trim, mapping, convert: row => {
|
|
76
|
-
const result = convert ? convert(row) : row;
|
|
77
|
-
if (!result)
|
|
78
|
-
return;
|
|
79
|
-
if (fieldTypes) {
|
|
80
|
-
for (const key of Object.keys(result)) {
|
|
81
|
-
const converter = converters[fieldTypes[key]];
|
|
82
|
-
if (converter)
|
|
83
|
-
result[key] = converter(result[key]);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (setnull) {
|
|
87
|
-
for (const key of Object.keys(result)) {
|
|
88
|
-
if (key.includes('.'))
|
|
89
|
-
continue; // skip reference
|
|
90
|
-
if (result[key] == null || result[key] === '')
|
|
91
|
-
result[key] = '#N/A';
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return result;
|
|
95
|
-
} });
|
|
96
|
-
}
|
|
97
|
-
executeBatches(job, batches, object, wait) {
|
|
98
|
-
const batcher = new batcher_js_1.Batcher(this.org.getConnection(), this.ux);
|
|
99
|
-
return batcher.createAndExecuteBatches(job, batches, object, wait);
|
|
100
|
-
}
|
|
101
|
-
saveCsv(file, rows) {
|
|
102
|
-
csv.writeToPath(file, rows, { headers: true });
|
|
103
|
-
}
|
|
104
|
-
loadScript(file) {
|
|
105
|
-
return convert_2.loadScript(file);
|
|
106
|
-
}
|
|
107
|
-
async getFieldTypes(sobject) {
|
|
108
|
-
const conn = this.org.getConnection();
|
|
109
|
-
const objectInfo = await conn.describe(sobject);
|
|
110
|
-
return objectInfo.fields.reduce((info, { name, type }) => Object.assign(info, { [name]: type }), {});
|
|
111
|
-
}
|
|
112
|
-
async createJob(sobject, options) {
|
|
113
|
-
const conn = this.org.getConnection();
|
|
114
|
-
const job = conn.bulk.createJob(sobject, 'upsert', options);
|
|
115
|
-
await job.on('error', e => { throw e; }).open();
|
|
116
|
-
return job;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
exports.default = UpsertCommand;
|
|
120
|
-
UpsertCommand.description = [
|
|
121
|
-
'bulk upsert records from a CSV file',
|
|
122
|
-
'Upsert records using Bulk API and returns a job ID and a batch ID. Use these IDs to check job status with data:bulk:status.',
|
|
123
|
-
'For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.'
|
|
124
|
-
].join('\n');
|
|
125
|
-
UpsertCommand.examples = [
|
|
126
|
-
'$ sfdx kit:data:bulk:upsert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json',
|
|
127
|
-
'$ sfdx kit:data:bulk:upsert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -i MyExternalId__c -w 10'
|
|
128
|
-
];
|
|
129
|
-
UpsertCommand.requiresUsername = true;
|
|
130
|
-
UpsertCommand.requiresProject = false;
|
|
131
|
-
UpsertCommand.flagsConfig = {
|
|
132
|
-
object: command_1.flags.string({ char: 'o', required: true, description: 'the sObject name to upsert' }),
|
|
133
|
-
externalid: command_1.flags.string({ char: 'i', required: true, default: 'Id', description: 'the column name of the external ID' }),
|
|
134
|
-
// csv settings
|
|
135
|
-
csvfile: command_1.flags.filepath({ char: 'f', required: true, description: 'the path of the CSV file that defines the records to upsert' }),
|
|
136
|
-
encoding: csvFlags.encoding,
|
|
137
|
-
delimiter: csvFlags.delimiter,
|
|
138
|
-
quote: csvFlags.quote,
|
|
139
|
-
skiplines: csvFlags.skiplines,
|
|
140
|
-
trim: csvFlags.trim,
|
|
141
|
-
mapping: csvFlags.mapping,
|
|
142
|
-
converter: csvFlags.converter,
|
|
143
|
-
setnull: command_1.flags.boolean({ description: 'set blank values as null values during upsert operations (default: empty field values are ignored)' }),
|
|
144
|
-
save: command_1.flags.boolean({ description: 'output converted.csv file' }),
|
|
145
|
-
saveonly: command_1.flags.boolean({ description: 'output converted.csv file and skip upsert for debugging' }),
|
|
146
|
-
// job settings
|
|
147
|
-
concurrencymode: command_1.flags.string({ default: 'Parallel', description: 'the concurrency mode (Parallel or Serial) for the job' }),
|
|
148
|
-
assignmentruleid: command_1.flags.string({ description: 'the ID of a specific assignment rule to run for a case or a lead.' }),
|
|
149
|
-
batchsize: command_1.flags.integer({ char: 's', min: 1, max: 10000, default: 10000, description: 'the batch size of the job' }),
|
|
150
|
-
wait: command_1.flags.integer({ char: 'w', min: 0, description: 'the number of minutes to wait for the command to complete before displaying the results' })
|
|
151
|
-
};
|
|
3
|
+
const bulk_1 = require("../../../../bulk");
|
|
4
|
+
exports.default = bulk_1.createBulkCommand('upsert');
|
|
152
5
|
//# sourceMappingURL=upsert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../../src/commands/kit/data/bulk/upsert.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"upsert.js","sourceRoot":"","sources":["../../../../../src/commands/kit/data/bulk/upsert.ts"],"names":[],"mappings":";;AAAA,2CAAqD;AAErD,kBAAe,wBAAiB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
export default class ScriptExecuteCommand extends SfdxCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static aliases: string[];
|
|
6
|
+
static strict: boolean;
|
|
7
|
+
protected static requiresUsername: boolean;
|
|
8
|
+
protected static requiresProject: boolean;
|
|
9
|
+
protected static flagsConfig: {
|
|
10
|
+
file: flags.Discriminated<flags.String>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@salesforce/command");
|
|
4
|
+
const fs = require("fs-extra");
|
|
5
|
+
const repl = require("repl");
|
|
6
|
+
const yargs_1 = require("yargs");
|
|
7
|
+
class ScriptExecuteCommand extends command_1.SfdxCommand {
|
|
8
|
+
async run() {
|
|
9
|
+
const { file } = this.flags;
|
|
10
|
+
module.paths.push('./node_modules');
|
|
11
|
+
if (file) {
|
|
12
|
+
const fileIndex = process.argv.indexOf(file);
|
|
13
|
+
const argv = yargs_1.default([]).parse(process.argv.slice(fileIndex + 1));
|
|
14
|
+
const script = fs.readFileSync(file).toString('utf8');
|
|
15
|
+
const asyncFunction = Object.getPrototypeOf(async () => { }).constructor;
|
|
16
|
+
return await new asyncFunction('require', 'argv', 'context', 'conn', script)(require, argv, this, this.org.getConnection());
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.ux.log('Starting sfdx REPL mode');
|
|
20
|
+
this.ux.log('Available variables');
|
|
21
|
+
this.ux.log(' conn: jsforce Connection');
|
|
22
|
+
this.ux.log(' context: SfdxCommand');
|
|
23
|
+
this.ux.log('Type .exit or Press Ctrl+D to exit the REPL');
|
|
24
|
+
const replServer = repl.start('> ');
|
|
25
|
+
replServer.context.require = require;
|
|
26
|
+
replServer.context.context = this;
|
|
27
|
+
replServer.context.conn = this.org.getConnection();
|
|
28
|
+
return new Promise(resolve => replServer.on('exit', () => resolve()));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = ScriptExecuteCommand;
|
|
33
|
+
ScriptExecuteCommand.description = [
|
|
34
|
+
'execute Node.js scripts in SfdxCommand context',
|
|
35
|
+
'Available variables in Node.js scripts',
|
|
36
|
+
' argv: Parsed command line arguments after the file option',
|
|
37
|
+
' conn: jsforce Connection',
|
|
38
|
+
' context: SfdxCommand'
|
|
39
|
+
].join('\n');
|
|
40
|
+
ScriptExecuteCommand.examples = [
|
|
41
|
+
'$ sfdx kit:script -f ./path/to/script.js',
|
|
42
|
+
'$ sfdx kit:script:execute',
|
|
43
|
+
"> await conn.query('SELECT Id, Name FROM Account LIMIT 1')",
|
|
44
|
+
'Top level await is not enabled by default in REPL before Node.js v16',
|
|
45
|
+
'$ NODE_OPTIONS=--experimental-repl-await sfdx kit:script:execute'
|
|
46
|
+
];
|
|
47
|
+
ScriptExecuteCommand.aliases = ['kit:script'];
|
|
48
|
+
ScriptExecuteCommand.strict = false;
|
|
49
|
+
ScriptExecuteCommand.requiresUsername = true;
|
|
50
|
+
ScriptExecuteCommand.requiresProject = false;
|
|
51
|
+
ScriptExecuteCommand.flagsConfig = {
|
|
52
|
+
file: command_1.flags.filepath({ char: 'f', description: 'the path of the Node.js script file to execute' })
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../src/commands/kit/script/execute.ts"],"names":[],"mappings":";;AAAA,iDAAyD;AACzD,+BAA+B;AAC/B,6BAA6B;AAC7B,iCAA0B;AAE1B,MAAqB,oBAAqB,SAAQ,qBAAW;IA0BpD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAEpC,IAAI,IAAI,EAAE;YACR,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7C,MAAM,IAAI,GAAG,eAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;YAChE,MAAM,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACtD,MAAM,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,IAAI,EAAE,GAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACxE,OAAO,MAAM,IAAI,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;SAC7H;aAAM;YACL,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YACnC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC1C,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YACtC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;YAE3D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpC,UAAU,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;YACrC,UAAU,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;YAClC,UAAU,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YAEnD,OAAO,IAAI,OAAO,CAChB,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAClD,CAAC;SACH;IACH,CAAC;;AApDH,uCAqDC;AApDe,gCAAW,GAAG;IAC1B,gDAAgD;IAChD,wCAAwC;IACxC,6DAA6D;IAC7D,4BAA4B;IAC5B,wBAAwB;CACzB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEC,6BAAQ,GAAG;IACvB,0CAA0C;IAC1C,2BAA2B;IAC3B,4DAA4D;IAC5D,sEAAsE;IACtE,kEAAkE;CACnE,CAAC;AAEY,4BAAO,GAAG,CAAC,YAAY,CAAC,CAAC;AACzB,2BAAM,GAAG,KAAK,CAAC;AACZ,qCAAgB,GAAG,IAAI,CAAC;AACxB,oCAAe,GAAG,KAAK,CAAC;AAExB,gCAAW,GAAG;IAC7B,IAAI,EAAE,eAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;CACnG,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.3","commands":{"kit:data:bulk:upsert":{"id":"kit:data:bulk:upsert","description":"bulk upsert records from a CSV file\nUpsert records using Bulk API and returns a job ID and a batch ID. Use these IDs to check job status with data:bulk:status.\nFor information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.","usage":"<%= command.id %> -o <string> -i <string> -f <filepath> [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--save] [--saveonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:bulk:upsert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json","$ sfdx kit:data:bulk:upsert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -i MyExternalId__c -w 10"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"object":{"name":"object","type":"option","char":"o","description":"the sObject name to upsert","required":true},"externalid":{"name":"externalid","type":"option","char":"i","description":"the column name of the external ID","required":true,"default":"Id"},"csvfile":{"name":"csvfile","type":"option","char":"f","description":"the path of the CSV file that defines the records to upsert","required":true},"encoding":{"name":"encoding","type":"option","char":"e","description":"the input CSV file encoding","default":"utf8"},"delimiter":{"name":"delimiter","type":"option","char":"d","description":"the input CSV file delimiter","default":","},"quote":{"name":"quote","type":"option","char":"q","description":"the input CSV file quote character","default":"\""},"skiplines":{"name":"skiplines","type":"option","description":"the number of lines to skip","default":0},"trim":{"name":"trim","type":"boolean","description":"trim all white space from columns","allowNo":false},"mapping":{"name":"mapping","type":"option","char":"m","description":"the path of the JSON file that defines CSV column mappings"},"converter":{"name":"converter","type":"option","char":"c","description":"the path of the script to convert CSV rows"},"setnull":{"name":"setnull","type":"boolean","description":"set blank values as null values during upsert operations (default: empty field values are ignored)","allowNo":false},"save":{"name":"save","type":"boolean","description":"output converted.csv file","allowNo":false},"saveonly":{"name":"saveonly","type":"boolean","description":"output converted.csv file and skip upsert for debugging","allowNo":false},"concurrencymode":{"name":"concurrencymode","type":"option","description":"the concurrency mode (Parallel or Serial) for the job","default":"Parallel"},"assignmentruleid":{"name":"assignmentruleid","type":"option","description":"the ID of a specific assignment rule to run for a case or a lead."},"batchsize":{"name":"batchsize","type":"option","char":"s","description":"the batch size of the job","default":10000},"wait":{"name":"wait","type":"option","char":"w","description":"the number of minutes to wait for the command to complete before displaying the results"}},"args":[]},"kit:data:csv:convert":{"id":"kit:data:csv:convert","description":"convert CSV data using column mapping file or Node.js script","usage":"<%= command.id %> [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:csv:convert -f ./path/to/input.csv -m ./path/to/mapping.json","$ sfdx kit:data:csv:convert -f ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js -e cp932 -d :"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"inputfile":{"name":"inputfile","type":"option","char":"f","description":"the path of the input CSV file (default: standard input)"},"outputfile":{"name":"outputfile","type":"option","char":"o","description":"the path of the output CSV file (default: standard output)"},"encoding":{"name":"encoding","type":"option","char":"e","description":"the input CSV file encoding","default":"utf8"},"delimiter":{"name":"delimiter","type":"option","char":"d","description":"the input CSV file delimiter","default":","},"quote":{"name":"quote","type":"option","char":"q","description":"the input CSV file quote character","default":"\""},"skiplines":{"name":"skiplines","type":"option","description":"the number of lines to skip","default":0},"trim":{"name":"trim","type":"boolean","description":"trim all white space from columns","allowNo":false},"mapping":{"name":"mapping","type":"option","char":"m","description":"the path of the JSON file that defines CSV column mappings"},"converter":{"name":"converter","type":"option","char":"c","description":"the path of the script to convert CSV rows"}},"args":[]},"kit:layout:assignments:deploy":{"id":"kit:layout:assignments:deploy","description":"deploy page layout assignments from JSON file","usage":"<%= command.id %> -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:layout:assignments:deploy","$ sfdx kit:layout:assignments:deploy -f config/layout-assignments.scratch.json","$ sfdx kit:layout:assignments:deploy -u me@my.org -f config/layout-assignments.sandbox.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"file":{"name":"file","type":"option","char":"f","description":"input file path","required":true,"default":"config/layout-assignments.json"}},"args":[]},"kit:layout:assignments:retrieve":{"id":"kit:layout:assignments:retrieve","description":"retrieve page layout assignments and save to JSON file","usage":"<%= command.id %> -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:layout:assignments:retrieve","$ sfdx kit:layout:assignments:retrieve -p Admin,Standard,StandardAul -o Account,CustomObject__c -f config/layout-assignments.scratch.json","$ sfdx kit:layout:assignments:retrieve -u me@my.org -f config/layout-assignments.sandbox.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"file":{"name":"file","type":"option","char":"f","description":"output file path","required":true,"default":"config/layout-assignments.json"},"profile":{"name":"profile","type":"option","char":"p","description":"comma separated profile names to retrieve (default: all profiles)","required":false},"object":{"name":"object","type":"option","char":"o","description":"comma separated object names to retrieve (default: objects which have multiple layouts)","required":false},"merge":{"name":"merge","type":"boolean","description":"merge retrieved configurations with existing file","required":false,"allowNo":false}},"args":[]}}}
|
|
1
|
+
{"version":"0.2.0","commands":{"kit:script:execute":{"id":"kit:script:execute","description":"execute Node.js scripts in SfdxCommand context\nAvailable variables in Node.js scripts\n argv: Parsed command line arguments after the file option\n conn: jsforce Connection\n context: SfdxCommand","usage":"<%= command.id %> [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":["kit:script"],"examples":["$ sfdx kit:script -f ./path/to/script.js","$ sfdx kit:script:execute","> await conn.query('SELECT Id, Name FROM Account LIMIT 1')","Top level await is not enabled by default in REPL before Node.js v16","$ NODE_OPTIONS=--experimental-repl-await sfdx kit:script:execute"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"file":{"name":"file","type":"option","char":"f","description":"the path of the Node.js script file to execute"}},"args":[]},"kit:data:bulk:delete":{"id":"kit:data:bulk:delete","description":"bulk delete records by SOQL select query","usage":"<%= command.id %> -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:bulk:delete -q 'SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:5'"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"query":{"name":"query","type":"option","char":"q","description":"SOQL query to delete","required":true},"hard":{"name":"hard","type":"boolean","description":"perform a hard delete","allowNo":false},"concurrencymode":{"name":"concurrencymode","type":"option","description":"the concurrency mode (Parallel or Serial) for the job","default":"Parallel"},"batchsize":{"name":"batchsize","type":"option","char":"s","description":"the batch size of the job","default":10000},"wait":{"name":"wait","type":"option","char":"w","description":"the number of minutes to wait for the command to complete before displaying the results"}},"args":[]},"kit:data:bulk:insert":{"id":"kit:data:bulk:insert","description":"bulk insert records from a CSV file\nFor information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.","usage":"<%= command.id %> -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:bulk:insert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json","$ sfdx kit:data:bulk:insert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"object":{"name":"object","type":"option","char":"o","description":"the sObject name to insert","required":true},"csvfile":{"name":"csvfile","type":"option","char":"f","description":"the CSV file path that defines the records to insert","required":true},"resultfile":{"name":"resultfile","type":"option","char":"r","description":"the CSV file path for writing the insert results"},"encoding":{"name":"encoding","type":"option","char":"e","description":"the input CSV file encoding","default":"utf8"},"delimiter":{"name":"delimiter","type":"option","char":"d","description":"the input CSV file delimiter","default":","},"quote":{"name":"quote","type":"option","char":"q","description":"the input CSV file quote character","default":"\""},"skiplines":{"name":"skiplines","type":"option","description":"the number of lines to skip","default":0},"trim":{"name":"trim","type":"boolean","description":"trim all white space from columns","allowNo":false},"mapping":{"name":"mapping","type":"option","char":"m","description":"the path of the JSON file that defines CSV column mappings"},"converter":{"name":"converter","type":"option","char":"c","description":"the path of the script to convert CSV rows"},"setnull":{"name":"setnull","type":"boolean","description":"set blank values as null values during insert operations (default: empty field values are ignored)","allowNo":false},"convertonly":{"name":"convertonly","type":"boolean","description":"output converted.csv file and skip insert for debugging","allowNo":false},"concurrencymode":{"name":"concurrencymode","type":"option","description":"the concurrency mode (Parallel or Serial) for the job","default":"Parallel"},"assignmentruleid":{"name":"assignmentruleid","type":"option","description":"the ID of a specific assignment rule to run for a case or a lead."},"batchsize":{"name":"batchsize","type":"option","char":"s","description":"the batch size of the job","default":10000},"wait":{"name":"wait","type":"option","char":"w","description":"the number of minutes to wait for the command to complete before displaying the results"}},"args":[]},"kit:data:bulk:query":{"id":"kit:data:bulk:query","description":"bulk query records","usage":"<%= command.id %> -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:bulk:query -q 'SELECT Id, Name FROM Account' -f ./path/to/Account.csv"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"query":{"name":"query","type":"option","char":"q","description":"SOQL query to export","required":true},"csvfile":{"name":"csvfile","type":"option","char":"f","description":"output csv file (default: standard output)"}},"args":[]},"kit:data:bulk:update":{"id":"kit:data:bulk:update","description":"bulk update records from a CSV file\nFor information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.","usage":"<%= command.id %> -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:bulk:update -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json","$ sfdx kit:data:bulk:update -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"object":{"name":"object","type":"option","char":"o","description":"the sObject name to update","required":true},"csvfile":{"name":"csvfile","type":"option","char":"f","description":"the CSV file path that defines the records to update","required":true},"resultfile":{"name":"resultfile","type":"option","char":"r","description":"the CSV file path for writing the update results"},"encoding":{"name":"encoding","type":"option","char":"e","description":"the input CSV file encoding","default":"utf8"},"delimiter":{"name":"delimiter","type":"option","char":"d","description":"the input CSV file delimiter","default":","},"quote":{"name":"quote","type":"option","char":"q","description":"the input CSV file quote character","default":"\""},"skiplines":{"name":"skiplines","type":"option","description":"the number of lines to skip","default":0},"trim":{"name":"trim","type":"boolean","description":"trim all white space from columns","allowNo":false},"mapping":{"name":"mapping","type":"option","char":"m","description":"the path of the JSON file that defines CSV column mappings"},"converter":{"name":"converter","type":"option","char":"c","description":"the path of the script to convert CSV rows"},"setnull":{"name":"setnull","type":"boolean","description":"set blank values as null values during update operations (default: empty field values are ignored)","allowNo":false},"convertonly":{"name":"convertonly","type":"boolean","description":"output converted.csv file and skip update for debugging","allowNo":false},"concurrencymode":{"name":"concurrencymode","type":"option","description":"the concurrency mode (Parallel or Serial) for the job","default":"Parallel"},"assignmentruleid":{"name":"assignmentruleid","type":"option","description":"the ID of a specific assignment rule to run for a case or a lead."},"batchsize":{"name":"batchsize","type":"option","char":"s","description":"the batch size of the job","default":10000},"wait":{"name":"wait","type":"option","char":"w","description":"the number of minutes to wait for the command to complete before displaying the results"}},"args":[]},"kit:data:bulk:upsert":{"id":"kit:data:bulk:upsert","description":"bulk upsert records from a CSV file\nFor information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.","usage":"<%= command.id %> -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:bulk:upsert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json","$ sfdx kit:data:bulk:upsert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -i MyExternalId__c -w 10"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"object":{"name":"object","type":"option","char":"o","description":"the sObject name to upsert","required":true},"csvfile":{"name":"csvfile","type":"option","char":"f","description":"the CSV file path that defines the records to upsert","required":true},"resultfile":{"name":"resultfile","type":"option","char":"r","description":"the CSV file path for writing the upsert results"},"encoding":{"name":"encoding","type":"option","char":"e","description":"the input CSV file encoding","default":"utf8"},"delimiter":{"name":"delimiter","type":"option","char":"d","description":"the input CSV file delimiter","default":","},"quote":{"name":"quote","type":"option","char":"q","description":"the input CSV file quote character","default":"\""},"skiplines":{"name":"skiplines","type":"option","description":"the number of lines to skip","default":0},"trim":{"name":"trim","type":"boolean","description":"trim all white space from columns","allowNo":false},"mapping":{"name":"mapping","type":"option","char":"m","description":"the path of the JSON file that defines CSV column mappings"},"converter":{"name":"converter","type":"option","char":"c","description":"the path of the script to convert CSV rows"},"setnull":{"name":"setnull","type":"boolean","description":"set blank values as null values during upsert operations (default: empty field values are ignored)","allowNo":false},"convertonly":{"name":"convertonly","type":"boolean","description":"output converted.csv file and skip upsert for debugging","allowNo":false},"concurrencymode":{"name":"concurrencymode","type":"option","description":"the concurrency mode (Parallel or Serial) for the job","default":"Parallel"},"assignmentruleid":{"name":"assignmentruleid","type":"option","description":"the ID of a specific assignment rule to run for a case or a lead."},"batchsize":{"name":"batchsize","type":"option","char":"s","description":"the batch size of the job","default":10000},"wait":{"name":"wait","type":"option","char":"w","description":"the number of minutes to wait for the command to complete before displaying the results"},"externalid":{"name":"externalid","type":"option","char":"i","description":"the column name of the external ID","required":true,"default":"Id"}},"args":[]},"kit:data:csv:convert":{"id":"kit:data:csv:convert","description":"convert CSV data using column mapping file or Node.js script","usage":"<%= command.id %> [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:data:csv:convert -f ./path/to/input.csv -m ./path/to/mapping.json","$ sfdx kit:data:csv:convert -f ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js -e cp932 -d :"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"inputfile":{"name":"inputfile","type":"option","char":"f","description":"the path of the input CSV file (default: standard input)"},"outputfile":{"name":"outputfile","type":"option","char":"o","description":"the path of the output CSV file (default: standard output)"},"encoding":{"name":"encoding","type":"option","char":"e","description":"the input CSV file encoding","default":"utf8"},"delimiter":{"name":"delimiter","type":"option","char":"d","description":"the input CSV file delimiter","default":","},"quote":{"name":"quote","type":"option","char":"q","description":"the input CSV file quote character","default":"\""},"skiplines":{"name":"skiplines","type":"option","description":"the number of lines to skip","default":0},"trim":{"name":"trim","type":"boolean","description":"trim all white space from columns","allowNo":false},"mapping":{"name":"mapping","type":"option","char":"m","description":"the path of the JSON file that defines CSV column mappings"},"converter":{"name":"converter","type":"option","char":"c","description":"the path of the script to convert CSV rows"}},"args":[]},"kit:layout:assignments:deploy":{"id":"kit:layout:assignments:deploy","description":"deploy page layout assignments from JSON file","usage":"<%= command.id %> -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:layout:assignments:deploy","$ sfdx kit:layout:assignments:deploy -f config/layout-assignments.scratch.json","$ sfdx kit:layout:assignments:deploy -u me@my.org -f config/layout-assignments.sandbox.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"file":{"name":"file","type":"option","char":"f","description":"input file path","required":true,"default":"config/layout-assignments.json"}},"args":[]},"kit:layout:assignments:retrieve":{"id":"kit:layout:assignments:retrieve","description":"retrieve page layout assignments and save to JSON file","usage":"<%= command.id %> -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@kitalive/sfdx-plugin","pluginType":"core","aliases":[],"examples":["$ sfdx kit:layout:assignments:retrieve","$ sfdx kit:layout:assignments:retrieve -p Admin,Standard,StandardAul -o Account,CustomObject__c -f config/layout-assignments.scratch.json","$ sfdx kit:layout:assignments:retrieve -u me@my.org -f config/layout-assignments.sandbox.json"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"file":{"name":"file","type":"option","char":"f","description":"output file path","required":true,"default":"config/layout-assignments.json"},"profile":{"name":"profile","type":"option","char":"p","description":"comma separated profile names to retrieve (default: all profiles)","required":false},"object":{"name":"object","type":"option","char":"o","description":"comma separated object names to retrieve (default: objects which have multiple layouts)","required":false},"merge":{"name":"merge","type":"boolean","description":"merge retrieved configurations with existing file","required":false,"allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitalive/sfdx-plugin",
|
|
3
3
|
"description": "Kitalive SFDX plugin",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"author": "Akihiro Ono",
|
|
6
6
|
"bugs": "https://github.com/Kitalive-Inc/sfdx-plugin/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"@oclif/errors": "^1",
|
|
11
11
|
"@salesforce/command": "^3.1.3",
|
|
12
12
|
"@salesforce/core": "^2.23.5",
|
|
13
|
-
"@salesforce/plugin-data": "^0.4.11",
|
|
14
13
|
"dayjs": "^1.10.4",
|
|
15
14
|
"fast-csv": "^4.3.6",
|
|
16
15
|
"fs-extra": "^9.1.0",
|
|
17
16
|
"iconv-lite": "^0.6.2",
|
|
18
17
|
"jsforce": "^1.10.1",
|
|
19
|
-
"
|
|
18
|
+
"soql-parser-js": "^4.3.0",
|
|
19
|
+
"tslib": "^1",
|
|
20
|
+
"yargs": "^17.3.1"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@oclif/dev-cli": "^1",
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"@types/chai": "^4",
|
|
28
29
|
"@types/jsforce": "^1.9.29",
|
|
29
30
|
"@types/mocha": "^5",
|
|
31
|
+
"@types/yargs": "^17.0.8",
|
|
30
32
|
"chai": "^4",
|
|
31
33
|
"globby": "^8",
|
|
32
34
|
"mocha": "^5",
|