@jayree/sfdx-plugin-manifest 2.7.3 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +83 -66
  3. package/lib/SDR-extra/utils/localGitRepo.js +1 -1
  4. package/lib/SDR-extra/utils/localGitRepo.js.map +1 -1
  5. package/lib/commands/jayree/manifest/beta/git/diff.d.ts +8 -6
  6. package/lib/commands/jayree/manifest/beta/git/diff.js +11 -11
  7. package/lib/commands/jayree/manifest/beta/git/diff.js.map +1 -1
  8. package/lib/commands/jayree/manifest/cleanup.d.ts +11 -9
  9. package/lib/commands/jayree/manifest/cleanup.js +78 -18
  10. package/lib/commands/jayree/manifest/cleanup.js.map +1 -1
  11. package/lib/commands/jayree/manifest/generate.d.ts +18 -11
  12. package/lib/commands/jayree/manifest/generate.js +57 -48
  13. package/lib/commands/jayree/manifest/generate.js.map +1 -1
  14. package/lib/commands/jayree/manifest/git/diff.d.ts +17 -11
  15. package/lib/commands/jayree/manifest/git/diff.js +479 -55
  16. package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
  17. package/messages/{gitdiffbeta.md → gitdiff.md} +7 -0
  18. package/messages/manifestcleanup.md +21 -0
  19. package/messages/manifestgenerate.md +43 -0
  20. package/oclif.manifest.json +319 -1
  21. package/package.json +19 -20
  22. package/lib/jayreeSfdxCommand.d.ts +0 -8
  23. package/lib/jayreeSfdxCommand.js +0 -26
  24. package/lib/jayreeSfdxCommand.js.map +0 -1
  25. package/lib/utils/gitdiff.d.ts +0 -57
  26. package/lib/utils/gitdiff.js +0 -442
  27. package/lib/utils/gitdiff.js.map +0 -1
  28. package/lib/utils/manifest.d.ts +0 -1
  29. package/lib/utils/manifest.js +0 -66
  30. package/lib/utils/manifest.js.map +0 -1
  31. package/messages/gitdiff.json +0 -12
  32. package/messages/manifestcleanup.json +0 -6
  33. package/messages/manifestgenerate.json +0 -16
@@ -1,8 +1,6 @@
1
- import { FlagsConfig } from '@salesforce/command';
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
2
  import { FileProperties, ListMetadataQuery } from '@salesforce/source-deploy-retrieve/lib/src/client/types.js';
3
- import { Connection } from '@salesforce/core';
4
3
  import { PackageManifestObject } from '@salesforce/source-deploy-retrieve';
5
- import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand.js';
6
4
  export interface QueryResult {
7
5
  size: number;
8
6
  totalSize: number;
@@ -27,14 +25,23 @@ export interface FlowDefinitionRecord {
27
25
  VersionNumber: string;
28
26
  };
29
27
  }
30
- export default class GeneratePackageXML extends JayreeSfdxCommand {
31
- static description: string;
32
- static examples: string[];
33
- protected static flagsConfig: FlagsConfig;
34
- protected static requiresUsername: boolean;
35
- protected static supportsDevhubUsername: boolean;
36
- protected static requiresProject: boolean;
37
- protected cacheConnection: Connection;
28
+ export default class GeneratePackageXML extends SfCommand<PackageManifestObject> {
29
+ static readonly summary: string;
30
+ static readonly description: string;
31
+ static readonly examples: string[];
32
+ static readonly flags: {
33
+ 'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
34
+ 'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
35
+ 'quick-filter': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
36
+ 'match-case': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
37
+ 'match-whole-word': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
38
+ 'include-flow-versions': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
39
+ file: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
40
+ 'exclude-managed': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
41
+ 'exclude-all': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
42
+ };
43
+ private logger;
44
+ private conn;
38
45
  run(): Promise<PackageManifestObject>;
39
46
  protected listMembers(query: ListMetadataQuery, apiVersion?: string): Promise<FileProperties[]>;
40
47
  }
@@ -4,15 +4,13 @@
4
4
  * Licensed under the BSD 3-Clause license.
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
- import os from 'os';
8
7
  import { dirname } from 'node:path';
9
8
  import { fileURLToPath } from 'node:url';
10
- import { flags } from '@salesforce/command';
11
- import { Messages } from '@salesforce/core';
9
+ import { SfCommand, Flags, arrayWithDeprecation, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, Ux, } from '@salesforce/sf-plugins-core';
10
+ import { Messages, Logger } from '@salesforce/core';
12
11
  import { RegistryAccess, ComponentSet } from '@salesforce/source-deploy-retrieve';
13
12
  import { ensureArray } from '@salesforce/kit';
14
13
  import fs from 'fs-extra';
15
- import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand.js';
16
14
  // eslint-disable-next-line no-underscore-dangle
17
15
  const __filename = fileURLToPath(import.meta.url);
18
16
  // eslint-disable-next-line no-underscore-dangle
@@ -20,44 +18,45 @@ const __dirname = dirname(__filename);
20
18
  Messages.importMessagesDirectory(__dirname);
21
19
  const registryAccess = new RegistryAccess();
22
20
  const messages = Messages.loadMessages('@jayree/sfdx-plugin-manifest', 'manifestgenerate');
23
- export default class GeneratePackageXML extends JayreeSfdxCommand {
24
- // eslint-disable-next-line complexity
21
+ export default class GeneratePackageXML extends SfCommand {
25
22
  async run() {
26
- await this.org.refreshAuth();
27
- const file = this.getFlag('file');
28
- this.ux.startSpinner(`Generating ${file || 'package.xml'}`);
29
- this.cacheConnection = this.org.getConnection();
23
+ this.logger = await Logger.child('jayree:manifest:generate');
24
+ const { flags } = await this.parse(GeneratePackageXML);
25
+ this.conn = flags['target-org'].getConnection(flags['api-version']);
26
+ const ux = new Ux({ jsonEnabled: this.jsonEnabled() });
27
+ const file = flags['file'];
28
+ ux.spinner.start(`Generating ${file || 'package.xml'}`);
30
29
  const managed = ['beta', 'deleted', 'deprecated', 'installed', 'released'];
31
30
  const all = ['beta', 'deleted', 'deprecated', 'installed', 'released', 'installedEditable', 'deprecatedEditable'];
32
- const componentFilter = (component) => !((this.getFlag('excludemanaged') &&
31
+ const componentFilter = (component) => !((flags['exclude-managed'] &&
33
32
  ((component.namespacePrefix &&
34
33
  (managed.includes(component.manageableState) || component.manageableState === undefined)) ||
35
34
  managed.includes(component.manageableState))) ||
36
- (this.getFlag('excludeall') &&
35
+ (flags['exclude-all'] &&
37
36
  ((component.namespacePrefix &&
38
37
  (all.includes(component.manageableState) || component.manageableState === undefined)) ||
39
38
  all.includes(component.manageableState))));
40
39
  let componentSet = await ComponentSet.fromConnection({
41
- usernameOrConnection: this.cacheConnection,
40
+ usernameOrConnection: this.conn,
42
41
  componentFilter,
43
42
  });
44
- if (this.getFlag('includeflowversions')) {
43
+ if (flags['include-flow-versions']) {
45
44
  const flowResult = await this.listMembers({ type: 'Flow' }, '43.0');
46
45
  for (const component of flowResult.filter(componentFilter)) {
47
46
  componentSet.add({ fullName: component.fullName, type: registryAccess.getTypeByName(component.type) });
48
47
  }
49
48
  }
50
- const quickFilter = this.getFlag('quickfilter');
49
+ const quickFilter = flags['quick-filter'];
51
50
  if (quickFilter) {
52
51
  componentSet = componentSet.filter((component) => {
53
52
  let filter = quickFilter;
54
53
  const comp = { fullName: component.fullName, type: component.type.name };
55
- if (!this.getFlag('matchcase')) {
54
+ if (!flags['match-case']) {
56
55
  filter = quickFilter.join('~').toLowerCase().split('~');
57
56
  comp.fullName = component.fullName.toLocaleLowerCase();
58
57
  comp.type = component.type.name.toLowerCase();
59
58
  }
60
- if (this.getFlag('matchwholeword')) {
59
+ if (flags['match-whole-word']) {
61
60
  return filter.includes(comp.fullName) || filter.includes(comp.type);
62
61
  }
63
62
  else {
@@ -70,13 +69,13 @@ export default class GeneratePackageXML extends JayreeSfdxCommand {
70
69
  const hasFlows = componentSet.toArray().filter((component) => component.type.name === 'Flow');
71
70
  if (hasFlows.length) {
72
71
  try {
73
- const flowDefinitionQuery = (await this.cacheConnection.tooling.query(`SELECT DeveloperName, ActiveVersion.VersionNumber, LatestVersion.VersionNumber FROM FlowDefinition where DeveloperName in (${hasFlows
72
+ const flowDefinitionQuery = (await this.conn.tooling.query(`SELECT DeveloperName, ActiveVersion.VersionNumber, LatestVersion.VersionNumber FROM FlowDefinition where DeveloperName in (${hasFlows
74
73
  .map((component) => `'${component.fullName}'`)
75
74
  .toString()})`));
76
75
  const flowDefinitionRecods = flowDefinitionQuery.records;
77
76
  for (const record of flowDefinitionRecods) {
78
77
  if (record.LatestVersion?.VersionNumber !== record.ActiveVersion?.VersionNumber) {
79
- this.ux.log(`DeveloperName: ${record.DeveloperName}, ActiveVersion: ${record.ActiveVersion?.VersionNumber}, LatestVersion: ${record.LatestVersion?.VersionNumber}`);
78
+ this.log(`DeveloperName: ${record.DeveloperName}, ActiveVersion: ${record.ActiveVersion?.VersionNumber}, LatestVersion: ${record.LatestVersion?.VersionNumber}`);
80
79
  }
81
80
  }
82
81
  }
@@ -85,24 +84,24 @@ export default class GeneratePackageXML extends JayreeSfdxCommand {
85
84
  }
86
85
  }
87
86
  componentSet = componentSet.filter((component) => component.type.name !== 'FlowDefinition');
88
- componentSet.apiVersion = this.cacheConnection.getApiVersion();
87
+ componentSet.apiVersion = this.conn.getApiVersion();
89
88
  if (file) {
90
89
  await fs.ensureFile(file);
91
90
  await fs.writeFile(file, await componentSet.getPackageXml());
92
91
  }
93
92
  else {
94
- this.ux.log(await componentSet.getPackageXml());
93
+ this.log(await componentSet.getPackageXml());
95
94
  }
96
- this.ux.stopSpinner();
95
+ ux.spinner.stop();
97
96
  return componentSet.getObject();
98
97
  }
99
98
  async listMembers(query, apiVersion) {
100
99
  let members;
101
100
  try {
102
101
  if (!apiVersion) {
103
- apiVersion = this.cacheConnection.getApiVersion();
102
+ apiVersion = this.conn.getApiVersion();
104
103
  }
105
- members = ensureArray((await this.cacheConnection.metadata.list(query, apiVersion)));
104
+ members = ensureArray((await this.conn.metadata.list(query, apiVersion)));
106
105
  }
107
106
  catch (error) {
108
107
  members = [];
@@ -111,40 +110,50 @@ export default class GeneratePackageXML extends JayreeSfdxCommand {
111
110
  return members;
112
111
  }
113
112
  }
114
- GeneratePackageXML.description = messages.getMessage('commandDescription');
115
- GeneratePackageXML.examples = messages.getMessage('examples').split(os.EOL);
116
- GeneratePackageXML.flagsConfig = {
117
- quickfilter: flags.array({
113
+ GeneratePackageXML.summary = messages.getMessage('summary');
114
+ GeneratePackageXML.description = messages.getMessage('description');
115
+ GeneratePackageXML.examples = messages.getMessages('examples');
116
+ GeneratePackageXML.flags = {
117
+ 'target-org': requiredOrgFlagWithDeprecations,
118
+ 'api-version': orgApiVersionFlagWithDeprecations,
119
+ 'quick-filter': arrayWithDeprecation({
118
120
  char: 'q',
119
- description: messages.getMessage('quickfilterFlagDescription'),
121
+ description: messages.getMessage('flags.quick-filter.summary'),
122
+ deprecateAliases: true,
123
+ aliases: ['quickfilter'],
120
124
  }),
121
- matchcase: flags.boolean({
125
+ 'match-case': Flags.boolean({
122
126
  char: 'c',
123
- description: messages.getMessage('matchCaseFlagDescription'),
127
+ summary: messages.getMessage('flags.match-case.summary'),
128
+ deprecateAliases: true,
129
+ aliases: ['matchcase'],
124
130
  }),
125
- matchwholeword: flags.boolean({
131
+ 'match-whole-word': Flags.boolean({
126
132
  char: 'w',
127
- description: messages.getMessage('matchWholeWordFlagDescription'),
133
+ summary: messages.getMessage('flags.match-whole-word.summary'),
134
+ deprecateAliases: true,
135
+ aliases: ['matchwholeword'],
128
136
  }),
129
- includeflowversions: flags.boolean({
130
- description: messages.getMessage('includeflowversionsDescription'),
137
+ 'include-flow-versions': Flags.boolean({
138
+ summary: messages.getMessage('flags.include-flow-versions.summary'),
139
+ deprecateAliases: true,
140
+ aliases: ['includeflowversions'],
131
141
  }),
132
- file: flags.string({
142
+ file: Flags.string({
133
143
  char: 'f',
134
- description: messages.getMessage('fileFlagDescription'),
144
+ summary: messages.getMessage('flags.file.summary'),
135
145
  }),
136
- excludemanaged: flags.boolean({
137
- char: 'x',
138
- description: messages.getMessage('excludeManagedFlagDescription'),
139
- exclusive: ['excludeall'],
146
+ 'exclude-managed': Flags.boolean({
147
+ summary: messages.getMessage('flags.exclude-managed.summary'),
148
+ exclusive: ['exclude-all'],
149
+ deprecateAliases: true,
150
+ aliases: ['excludemanaged', 'x'],
140
151
  }),
141
- excludeall: flags.boolean({
142
- char: 'a',
143
- description: messages.getMessage('excludeAllFlagDescription'),
144
- exclusive: ['excludemanaged'],
152
+ 'exclude-all': Flags.boolean({
153
+ summary: messages.getMessage('flags.exclude-all.summary'),
154
+ exclusive: ['exclude-managed'],
155
+ deprecateAliases: true,
156
+ aliases: ['excludeall', 'a'],
145
157
  }),
146
158
  };
147
- GeneratePackageXML.requiresUsername = true;
148
- GeneratePackageXML.supportsDevhubUsername = false;
149
- GeneratePackageXML.requiresProject = false;
150
159
  //# sourceMappingURL=generate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/commands/jayree/manifest/generate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAe,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAc,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAyB,MAAM,oCAAoC,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAA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AE,IAAI;QACtB,OAAO,EAAE,CAAC,gBAAgB,EAAE,GAAG,CAAC;KACjC,CAAC;IACF,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC;QAC3B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QACzD,SAAS,EAAE,CAAC,iBAAiB,CAAC;QAC9B,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC;KAC7B,CAAC;CACH,CAAC"}
@@ -1,18 +1,23 @@
1
- import { ArgInput } from '@oclif/core/lib/interfaces';
2
- import { FlagsConfig } from '@salesforce/command';
3
- import { JayreeSfdxCommand } from '../../../../jayreeSfdxCommand.js';
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ import { Optional } from '@salesforce/ts-types';
4
3
  export interface GitDiffCommandResult {
5
4
  destructiveChanges: object;
6
5
  manifest: object;
7
6
  }
8
- export default class GitDiff extends JayreeSfdxCommand {
9
- static description: string;
10
- static examples: string[];
11
- static args: ArgInput;
12
- protected static flagsConfig: FlagsConfig;
13
- protected static requiresUsername: boolean;
14
- protected static supportsDevhubUsername: boolean;
15
- protected static requiresProject: boolean;
7
+ export default class GitDiff extends SfCommand<GitDiffCommandResult> {
8
+ static readonly summary: string;
9
+ static readonly description: string;
10
+ static readonly examples: string[];
11
+ static readonly args: {
12
+ ref1: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
13
+ ref2: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
14
+ };
15
+ static readonly requiresProject = true;
16
+ static readonly flags: {
17
+ 'source-dir': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
18
+ 'output-dir': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
19
+ 'destructive-changes-only': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
20
+ };
16
21
  private isOutputEnabled;
17
22
  private outputDir;
18
23
  private destructiveChangesOnly;
@@ -28,4 +33,5 @@ export default class GitDiff extends JayreeSfdxCommand {
28
33
  private outputWarnings;
29
34
  private fsPaths;
30
35
  run(): Promise<GitDiffCommandResult>;
36
+ protected getSourceApiVersion(): Promise<Optional<string>>;
31
37
  }