@salesforce/plugin-data 2.6.3 → 3.0.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.
Files changed (65) hide show
  1. package/README.md +113 -113
  2. package/lib/BulkBaseCommand.js +26 -26
  3. package/lib/BulkBaseCommand.js.map +1 -1
  4. package/lib/api/data/tree/exportApi.js +31 -30
  5. package/lib/api/data/tree/exportApi.js.map +1 -1
  6. package/lib/api/data/tree/importApi.js +46 -43
  7. package/lib/api/data/tree/importApi.js.map +1 -1
  8. package/lib/batcher.js +24 -17
  9. package/lib/batcher.js.map +1 -1
  10. package/lib/bulkDataRequestCache.js +21 -26
  11. package/lib/bulkDataRequestCache.js.map +1 -1
  12. package/lib/bulkOperationCommand.js +55 -57
  13. package/lib/bulkOperationCommand.js.map +1 -1
  14. package/lib/bulkUtils.js +20 -20
  15. package/lib/bulkUtils.js.map +1 -1
  16. package/lib/commands/data/create/record.js +38 -39
  17. package/lib/commands/data/create/record.js.map +1 -1
  18. package/lib/commands/data/delete/bulk.js +14 -15
  19. package/lib/commands/data/delete/bulk.js.map +1 -1
  20. package/lib/commands/data/delete/record.js +48 -49
  21. package/lib/commands/data/delete/record.js.map +1 -1
  22. package/lib/commands/data/delete/resume.js +16 -17
  23. package/lib/commands/data/delete/resume.js.map +1 -1
  24. package/lib/commands/data/export/tree.js +38 -39
  25. package/lib/commands/data/export/tree.js.map +1 -1
  26. package/lib/commands/data/get/record.js +50 -51
  27. package/lib/commands/data/get/record.js.map +1 -1
  28. package/lib/commands/data/import/tree.js +45 -46
  29. package/lib/commands/data/import/tree.js.map +1 -1
  30. package/lib/commands/data/query/resume.js +40 -42
  31. package/lib/commands/data/query/resume.js.map +1 -1
  32. package/lib/commands/data/query.js +91 -93
  33. package/lib/commands/data/query.js.map +1 -1
  34. package/lib/commands/data/resume.js +45 -40
  35. package/lib/commands/data/resume.js.map +1 -1
  36. package/lib/commands/data/update/record.js +61 -62
  37. package/lib/commands/data/update/record.js.map +1 -1
  38. package/lib/commands/data/upsert/bulk.js +24 -25
  39. package/lib/commands/data/upsert/bulk.js.map +1 -1
  40. package/lib/commands/data/upsert/resume.js +15 -16
  41. package/lib/commands/data/upsert/resume.js.map +1 -1
  42. package/lib/commands/force/data/bulk/delete.js +42 -43
  43. package/lib/commands/force/data/bulk/delete.js.map +1 -1
  44. package/lib/commands/force/data/bulk/status.js +40 -35
  45. package/lib/commands/force/data/bulk/status.js.map +1 -1
  46. package/lib/commands/force/data/bulk/upsert.js +54 -55
  47. package/lib/commands/force/data/bulk/upsert.js.map +1 -1
  48. package/lib/dataCommand.js +16 -21
  49. package/lib/dataCommand.js.map +1 -1
  50. package/lib/dataSoqlQueryTypes.js +4 -9
  51. package/lib/dataSoqlQueryTypes.js.map +1 -1
  52. package/lib/flags.js +12 -13
  53. package/lib/flags.js.map +1 -1
  54. package/lib/index.js +1 -2
  55. package/lib/index.js.map +1 -1
  56. package/lib/queryUtils.js +8 -13
  57. package/lib/queryUtils.js.map +1 -1
  58. package/lib/reporters.js +52 -59
  59. package/lib/reporters.js.map +1 -1
  60. package/lib/resumeBulkCommand.js +37 -39
  61. package/lib/resumeBulkCommand.js.map +1 -1
  62. package/lib/types.js +1 -2
  63. package/oclif.lock +8086 -0
  64. package/oclif.manifest.json +1664 -904
  65. package/package.json +33 -50
@@ -1,64 +1,63 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const core_1 = require("@salesforce/core");
10
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
11
- const flags_1 = require("../../../flags");
12
- const dataCommand_1 = require("../../../dataCommand");
13
- core_1.Messages.importMessagesDirectory(__dirname);
14
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-data', 'record.create');
15
- class Create extends sf_plugins_core_1.SfCommand {
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages } from '@salesforce/core';
10
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
11
+ import { orgFlags, perflogFlag } from '../../../flags.js';
12
+ import { stringToDictionary, collectErrorMessages } from '../../../dataCommand.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-data', 'record.create');
15
+ export default class Create extends SfCommand {
16
+ static summary = messages.getMessage('summary');
17
+ static description = messages.getMessage('description');
18
+ static examples = messages.getMessages('examples');
19
+ static aliases = ['force:data:record:create'];
20
+ static deprecateAliases = true;
21
+ static flags = {
22
+ ...orgFlags,
23
+ sobject: Flags.string({
24
+ char: 's',
25
+ required: true,
26
+ summary: messages.getMessage('flags.sobject.summary'),
27
+ aliases: ['sobjecttype'],
28
+ deprecateAliases: true,
29
+ }),
30
+ values: Flags.string({
31
+ char: 'v',
32
+ required: true,
33
+ summary: messages.getMessage('flags.values.summary'),
34
+ }),
35
+ 'use-tooling-api': Flags.boolean({
36
+ char: 't',
37
+ summary: messages.getMessage('flags.use-tooling-api.summary'),
38
+ aliases: ['usetoolingapi'],
39
+ deprecateAliases: true,
40
+ }),
41
+ perflog: perflogFlag,
42
+ };
16
43
  async run() {
17
44
  const { flags } = await this.parse(Create);
18
45
  this.spinner.start(`Creating record for ${flags.sobject}`);
19
46
  const sobject = (flags['use-tooling-api']
20
47
  ? flags['target-org'].getConnection(flags['api-version']).tooling
21
48
  : flags['target-org'].getConnection(flags['api-version'])).sobject(flags.sobject);
22
- const values = (0, dataCommand_1.stringToDictionary)(flags.values);
49
+ const values = stringToDictionary(flags.values);
23
50
  const result = await sobject.insert(values);
24
51
  if (result.success) {
25
52
  this.log(messages.getMessage('createSuccess', [result.id || 'unknown id']));
26
53
  this.spinner.stop();
27
54
  }
28
55
  else {
29
- const errors = (0, dataCommand_1.collectErrorMessages)(result);
56
+ const errors = collectErrorMessages(result);
30
57
  this.spinner.stop('failed');
31
58
  this.error(messages.getMessage('createFailure', [errors]));
32
59
  }
33
60
  return result;
34
61
  }
35
62
  }
36
- Create.summary = messages.getMessage('summary');
37
- Create.description = messages.getMessage('description');
38
- Create.examples = messages.getMessages('examples');
39
- Create.aliases = ['force:data:record:create'];
40
- Create.deprecateAliases = true;
41
- Create.flags = {
42
- ...flags_1.orgFlags,
43
- sobject: sf_plugins_core_1.Flags.string({
44
- char: 's',
45
- required: true,
46
- summary: messages.getMessage('flags.sobject.summary'),
47
- aliases: ['sobjecttype'],
48
- deprecateAliases: true,
49
- }),
50
- values: sf_plugins_core_1.Flags.string({
51
- char: 'v',
52
- required: true,
53
- summary: messages.getMessage('flags.values.summary'),
54
- }),
55
- 'use-tooling-api': sf_plugins_core_1.Flags.boolean({
56
- char: 't',
57
- summary: messages.getMessage('flags.use-tooling-api.summary'),
58
- aliases: ['usetoolingapi'],
59
- deprecateAliases: true,
60
- }),
61
- perflog: flags_1.perflogFlag,
62
- };
63
- exports.default = Create;
64
63
  //# sourceMappingURL=record.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"record.js","sourceRoot":"","sources":["../../../../src/commands/data/create/record.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA4C;AAE5C,iEAA+D;AAC/D,0CAAuD;AACvD,sDAAgF;AAEhF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;AAEnF,MAAqB,MAAO,SAAQ,2BAAqB;IA6BhD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,KAAK,CAAC,OAAO,E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C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAE3D,MAAM,OAAO,GAAG,CACd,KAAK,CAAC,iBAAiB,CAAC;YACtB,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO;YACjE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAC5D,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACzB,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;YAC5E,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SACrB;aAAM;YACL,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAC5D;QACD,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -1,31 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  /*
4
2
  * Copyright (c) 2020, salesforce.com, inc.
5
3
  * All rights reserved.
6
4
  * Licensed under the BSD 3-Clause license.
7
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
8
6
  */
9
- const core_1 = require("@salesforce/core");
10
- const bulkDataRequestCache_1 = require("../../../bulkDataRequestCache");
11
- const bulkOperationCommand_1 = require("../../../bulkOperationCommand");
12
- const bulkUtils_1 = require("../../../bulkUtils");
13
- core_1.Messages.importMessagesDirectory(__dirname);
14
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-data', 'bulkv2.delete');
15
- class Delete extends bulkOperationCommand_1.BulkOperationCommand {
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages } from '@salesforce/core';
10
+ import { BulkDeleteRequestCache } from '../../../bulkDataRequestCache.js';
11
+ import { BulkOperationCommand } from '../../../bulkOperationCommand.js';
12
+ import { validateSobjectType } from '../../../bulkUtils.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-data', 'bulkv2.delete');
15
+ export default class Delete extends BulkOperationCommand {
16
+ static examples = messages.getMessages('examples');
17
+ static summary = messages.getMessage('summary');
18
+ static description = messages.getMessage('description');
16
19
  async run() {
17
20
  const { flags } = await this.parse(Delete);
18
21
  const conn = flags['target-org'].getConnection(flags['api-version']);
19
- await (0, bulkUtils_1.validateSobjectType)(flags.sobject, conn);
22
+ await validateSobjectType(flags.sobject, conn);
20
23
  return this.runBulkOperation(flags.sobject, flags.file, conn, flags.async ? 0 : flags.wait?.minutes, flags.verbose, 'delete');
21
24
  }
22
25
  // eslint-disable-next-line class-methods-use-this
23
26
  async getCache() {
24
- return bulkDataRequestCache_1.BulkDeleteRequestCache.create();
27
+ return BulkDeleteRequestCache.create();
25
28
  }
26
29
  }
27
- Delete.examples = messages.getMessages('examples');
28
- Delete.summary = messages.getMessage('summary');
29
- Delete.description = messages.getMessage('description');
30
- exports.default = Delete;
31
30
  //# sourceMappingURL=bulk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bulk.js","sourceRoot":"","sources":["../../../../src/commands/data/delete/bulk.ts"],"names":[],"m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ACb,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,kDAAkD;IACxC,KAAK,CAAC,QAAQ;QACtB,OAAO,sBAAsB,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC"}
@@ -1,18 +1,54 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const core_1 = require("@salesforce/core");
10
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
11
- const flags_1 = require("../../../flags");
12
- const dataCommand_1 = require("../../../dataCommand");
13
- core_1.Messages.importMessagesDirectory(__dirname);
14
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-data', 'record.delete');
15
- class Delete extends sf_plugins_core_1.SfCommand {
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages, SfError } from '@salesforce/core';
10
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
11
+ import { orgFlags, perflogFlag } from '../../../flags.js';
12
+ import { collectErrorMessages, query } from '../../../dataCommand.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-data', 'record.delete');
15
+ export default class Delete extends SfCommand {
16
+ static summary = messages.getMessage('summary');
17
+ static description = messages.getMessage('description');
18
+ static examples = messages.getMessages('examples');
19
+ static aliases = ['force:data:record:delete'];
20
+ static deprecateAliases = true;
21
+ static flags = {
22
+ ...orgFlags,
23
+ sobject: Flags.string({
24
+ char: 's',
25
+ required: true,
26
+ summary: messages.getMessage('flags.sobject.summary'),
27
+ aliases: ['sobjecttype'],
28
+ deprecateAliases: true,
29
+ }),
30
+ // eslint-disable-next-line sf-plugin/id-flag-suggestions
31
+ 'record-id': Flags.salesforceId({
32
+ length: 'both',
33
+ char: 'i',
34
+ summary: messages.getMessage('flags.record-id.summary'),
35
+ exactlyOne: ['where', 'record-id'],
36
+ aliases: ['sobjectid'],
37
+ deprecateAliases: true,
38
+ }),
39
+ where: Flags.string({
40
+ char: 'w',
41
+ summary: messages.getMessage('flags.where.summary'),
42
+ exactlyOne: ['where', 'record-id'],
43
+ }),
44
+ 'use-tooling-api': Flags.boolean({
45
+ char: 't',
46
+ summary: messages.getMessage('flags.use-tooling-api.summary'),
47
+ aliases: ['usetoolingapi'],
48
+ deprecateAliases: true,
49
+ }),
50
+ perflog: perflogFlag,
51
+ };
16
52
  async run() {
17
53
  const { flags } = await this.parse(Delete);
18
54
  this.spinner.start('Deleting Record');
@@ -22,14 +58,14 @@ class Delete extends sf_plugins_core_1.SfCommand {
22
58
  ? flags['target-org'].getConnection(flags['api-version']).tooling
23
59
  : flags['target-org'].getConnection(flags['api-version']);
24
60
  // "where flag" will be defined if sobjectId is not
25
- const sObjectId = flags['record-id'] ?? (await (0, dataCommand_1.query)(conn, flags.sobject, flags.where)).Id;
61
+ const sObjectId = flags['record-id'] ?? (await query(conn, flags.sobject, flags.where)).Id;
26
62
  const result = await conn.sobject(flags.sobject).destroy(sObjectId);
27
63
  if (result.success) {
28
64
  this.log(messages.getMessage('deleteSuccess', [sObjectId]));
29
65
  }
30
66
  else {
31
67
  status = 'Failed';
32
- const errors = (0, dataCommand_1.collectErrorMessages)(result);
68
+ const errors = collectErrorMessages(result);
33
69
  this.error(messages.getMessage('deleteFailure', [errors]));
34
70
  }
35
71
  this.spinner.stop(status);
@@ -41,45 +77,8 @@ class Delete extends sf_plugins_core_1.SfCommand {
41
77
  if (!(err instanceof Error)) {
42
78
  throw err;
43
79
  }
44
- throw new core_1.SfError(err.message, err.name);
80
+ throw new SfError(err.message, err.name);
45
81
  }
46
82
  }
47
83
  }
48
- Delete.summary = messages.getMessage('summary');
49
- Delete.description = messages.getMessage('description');
50
- Delete.examples = messages.getMessages('examples');
51
- Delete.aliases = ['force:data:record:delete'];
52
- Delete.deprecateAliases = true;
53
- Delete.flags = {
54
- ...flags_1.orgFlags,
55
- sobject: sf_plugins_core_1.Flags.string({
56
- char: 's',
57
- required: true,
58
- summary: messages.getMessage('flags.sobject.summary'),
59
- aliases: ['sobjecttype'],
60
- deprecateAliases: true,
61
- }),
62
- // eslint-disable-next-line sf-plugin/id-flag-suggestions
63
- 'record-id': sf_plugins_core_1.Flags.salesforceId({
64
- length: 'both',
65
- char: 'i',
66
- summary: messages.getMessage('flags.record-id.summary'),
67
- exactlyOne: ['where', 'record-id'],
68
- aliases: ['sobjectid'],
69
- deprecateAliases: true,
70
- }),
71
- where: sf_plugins_core_1.Flags.string({
72
- char: 'w',
73
- summary: messages.getMessage('flags.where.summary'),
74
- exactlyOne: ['where', 'record-id'],
75
- }),
76
- 'use-tooling-api': sf_plugins_core_1.Flags.boolean({
77
- char: 't',
78
- summary: messages.getMessage('flags.use-tooling-api.summary'),
79
- aliases: ['usetoolingapi'],
80
- deprecateAliases: true,
81
- }),
82
- perflog: flags_1.perflogFlag,
83
- };
84
- exports.default = Delete;
85
84
  //# sourceMappingURL=record.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"record.js","sourceRoot":"","sources":["../../../../src/commands/data/delete/record.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAAqD;AAErD,iEAA+D;AAC/D,0CAAuD;AACvD,sDAAmE;AAEnE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC;AAEnF,MAAqB,MAAO,SAAQ,2BAAqB;IAuChD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACtC,IAAI,MAAM,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
  /*
4
2
  * Copyright (c) 2020, salesforce.com, inc.
5
3
  * All rights reserved.
6
4
  * Licensed under the BSD 3-Clause license.
7
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
8
6
  */
9
- const core_1 = require("@salesforce/core");
10
- const bulkDataRequestCache_1 = require("../../../bulkDataRequestCache");
11
- const resumeBulkCommand_1 = require("../../../resumeBulkCommand");
12
- const bulkUtils_1 = require("../../../bulkUtils");
13
- core_1.Messages.importMessagesDirectory(__dirname);
14
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-data', 'bulk.delete.resume');
15
- class DeleteResume extends resumeBulkCommand_1.ResumeBulkCommand {
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages } from '@salesforce/core';
10
+ import { BulkDeleteRequestCache } from '../../../bulkDataRequestCache.js';
11
+ import { ResumeBulkCommand } from '../../../resumeBulkCommand.js';
12
+ import { isBulkV2RequestDone } from '../../../bulkUtils.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-data', 'bulk.delete.resume');
15
+ export default class DeleteResume extends ResumeBulkCommand {
16
+ static summary = messages.getMessage('summary');
17
+ static description = messages.getMessage('description');
18
+ static examples = messages.getMessages('examples');
19
+ static deprecateAliases = true;
16
20
  async run() {
17
21
  const { flags } = await this.parse(DeleteResume);
18
- const cache = await bulkDataRequestCache_1.BulkDeleteRequestCache.create();
22
+ const cache = await BulkDeleteRequestCache.create();
19
23
  const resumeOptions = await cache.resolveResumeOptionsFromCache(flags['job-id'], flags['use-most-recent'], flags['target-org'], flags['api-version']);
20
24
  this.connection = resumeOptions.options.connection;
21
25
  this.operation = 'delete';
22
26
  resumeOptions.options.operation = 'delete';
23
27
  const resumeResults = await this.resume(resumeOptions, flags.wait);
24
- if ((0, bulkUtils_1.isBulkV2RequestDone)(resumeResults.jobInfo)) {
25
- await bulkDataRequestCache_1.BulkDeleteRequestCache.unset(resumeOptions.jobInfo.id);
28
+ if (isBulkV2RequestDone(resumeResults.jobInfo)) {
29
+ await BulkDeleteRequestCache.unset(resumeOptions.jobInfo.id);
26
30
  }
27
31
  return resumeResults;
28
32
  }
29
33
  }
30
- DeleteResume.summary = messages.getMessage('summary');
31
- DeleteResume.description = messages.getMessage('description');
32
- DeleteResume.examples = messages.getMessages('examples');
33
- DeleteResume.deprecateAliases = true;
34
- exports.default = DeleteResume;
35
34
  //# sourceMappingURL=resume.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/data/delete/resume.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,2CAA4C;AAE5C,wEAAuE;AACvE,kEAA+D;AAC/D,kDAAyD;AAEzD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC;AAExF,MAAqB,YAAa,SAAQ,qCAAiB;IAMlD,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,KAAK,GAAG,MAAM,6CAAsB,CAAC,MAAM,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,6BAA6B,CAC7D,KAAK,CAAC,QAAQ,CAAC,EACf,KAAK,CAAC,iBAAiB,CAAC,EACxB,KAAK,CAAC,YAAY,CAAC,EACnB,KAAK,CAAC,aAAa,CAAC,CACrB,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;QACnD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,aAAa,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC3C,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,MAA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GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,gBAAgB,GAAG,IAAI,CAAC;IAExC,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,MAAM,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,6BAA6B,CAC7D,KAAK,CAAC,QAAQ,CAAC,EACf,KAAK,CAAC,iBAAiB,CAAC,EACxB,KAAK,CAAC,YAAY,CAAC,EACnB,KAAK,CAAC,aAAa,CAAC,CACrB,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;QACnD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,aAAa,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC3C,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,mBAAmB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;YAC9C,MAAM,sBAAsB,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAC9D;QACD,OAAO,aAAa,CAAC;IACvB,CAAC"}
@@ -1,22 +1,49 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const core_1 = require("@salesforce/core");
10
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
11
- const flags_1 = require("../../../flags");
12
- const exportApi_1 = require("../../../api/data/tree/exportApi");
13
- core_1.Messages.importMessagesDirectory(__dirname);
14
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-data', 'tree.export');
15
- class Export extends sf_plugins_core_1.SfCommand {
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages } from '@salesforce/core';
10
+ import { SfCommand, Flags, Ux } from '@salesforce/sf-plugins-core';
11
+ import { orgFlags } from '../../../flags.js';
12
+ import { ExportApi } from '../../../api/data/tree/exportApi.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-data', 'tree.export');
15
+ export default class Export extends SfCommand {
16
+ static summary = messages.getMessage('summary');
17
+ static description = messages.getMessage('description');
18
+ static examples = messages.getMessages('examples');
19
+ static aliases = ['force:data:tree:export'];
20
+ static deprecateAliases = true;
21
+ static flags = {
22
+ ...orgFlags,
23
+ query: Flags.string({
24
+ char: 'q',
25
+ summary: messages.getMessage('flags.query.summary'),
26
+ required: true,
27
+ }),
28
+ plan: Flags.boolean({
29
+ char: 'p',
30
+ summary: messages.getMessage('flags.plan.summary'),
31
+ }),
32
+ prefix: Flags.string({
33
+ char: 'x',
34
+ summary: messages.getMessage('flags.prefix.summary'),
35
+ }),
36
+ 'output-dir': Flags.directory({
37
+ char: 'd',
38
+ summary: messages.getMessage('flags.output-dir.summary'),
39
+ aliases: ['outputdir'],
40
+ deprecateAliases: true,
41
+ }),
42
+ };
16
43
  async run() {
17
44
  const { flags } = await this.parse(Export);
18
- const ux = new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() });
19
- const exportApi = new exportApi_1.ExportApi(flags['target-org'], ux);
45
+ const ux = new Ux({ jsonEnabled: this.jsonEnabled() });
46
+ const exportApi = new ExportApi(flags['target-org'], ux);
20
47
  const exportConfig = {
21
48
  outputDir: flags['output-dir'],
22
49
  plan: flags.plan,
@@ -26,32 +53,4 @@ class Export extends sf_plugins_core_1.SfCommand {
26
53
  return exportApi.export(exportConfig);
27
54
  }
28
55
  }
29
- Export.summary = messages.getMessage('summary');
30
- Export.description = messages.getMessage('description');
31
- Export.examples = messages.getMessages('examples');
32
- Export.aliases = ['force:data:tree:export'];
33
- Export.deprecateAliases = true;
34
- Export.flags = {
35
- ...flags_1.orgFlags,
36
- query: sf_plugins_core_1.Flags.string({
37
- char: 'q',
38
- summary: messages.getMessage('flags.query.summary'),
39
- required: true,
40
- }),
41
- plan: sf_plugins_core_1.Flags.boolean({
42
- char: 'p',
43
- summary: messages.getMessage('flags.plan.summary'),
44
- }),
45
- prefix: sf_plugins_core_1.Flags.string({
46
- char: 'x',
47
- summary: messages.getMessage('flags.prefix.summary'),
48
- }),
49
- 'output-dir': sf_plugins_core_1.Flags.directory({
50
- char: 'd',
51
- summary: messages.getMessage('flags.output-dir.summary'),
52
- aliases: ['outputdir'],
53
- deprecateAliases: true,
54
- }),
55
- };
56
- exports.default = Export;
57
56
  //# sourceMappingURL=tree.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../src/commands/data/export/tree.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA4C;AAC5C,iEAAmE;AACnE,0CAA0C;AAC1C,gEAA2E;AAG3E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;AAEjF,MAAqB,MAAO,SAAQ,2BAAmD;IA8B9E,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,EAAE,GAAG,IAAI,oBAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAA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