@jayree/sfdx-plugin-manifest 2.7.4 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +28 -0
- package/README.md +83 -66
- package/lib/SDR-extra/utils/localGitRepo.js +1 -1
- package/lib/SDR-extra/utils/localGitRepo.js.map +1 -1
- package/lib/commands/jayree/manifest/beta/git/diff.d.ts +8 -6
- package/lib/commands/jayree/manifest/beta/git/diff.js +11 -11
- package/lib/commands/jayree/manifest/beta/git/diff.js.map +1 -1
- package/lib/commands/jayree/manifest/cleanup.d.ts +11 -9
- package/lib/commands/jayree/manifest/cleanup.js +78 -18
- package/lib/commands/jayree/manifest/cleanup.js.map +1 -1
- package/lib/commands/jayree/manifest/generate.d.ts +18 -11
- package/lib/commands/jayree/manifest/generate.js +57 -48
- package/lib/commands/jayree/manifest/generate.js.map +1 -1
- package/lib/commands/jayree/manifest/git/diff.d.ts +17 -11
- package/lib/commands/jayree/manifest/git/diff.js +479 -55
- package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
- package/messages/{gitdiffbeta.md → gitdiff.md} +7 -0
- package/messages/manifestcleanup.md +21 -0
- package/messages/manifestgenerate.md +43 -0
- package/oclif.manifest.json +121 -262
- package/package.json +19 -20
- package/lib/jayreeSfdxCommand.d.ts +0 -8
- package/lib/jayreeSfdxCommand.js +0 -26
- package/lib/jayreeSfdxCommand.js.map +0 -1
- package/lib/utils/gitdiff.d.ts +0 -57
- package/lib/utils/gitdiff.js +0 -442
- package/lib/utils/gitdiff.js.map +0 -1
- package/lib/utils/manifest.d.ts +0 -1
- package/lib/utils/manifest.js +0 -66
- package/lib/utils/manifest.js.map +0 -1
- package/messages/gitdiff.json +0 -12
- package/messages/manifestcleanup.json +0 -6
- package/messages/manifestgenerate.json +0 -16
@@ -1,8 +1,6 @@
|
|
1
|
-
import {
|
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
|
31
|
-
static
|
32
|
-
static
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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 {
|
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
|
24
|
-
// eslint-disable-next-line complexity
|
21
|
+
export default class GeneratePackageXML extends SfCommand {
|
25
22
|
async run() {
|
26
|
-
await
|
27
|
-
const
|
28
|
-
this.
|
29
|
-
|
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) => !((
|
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
|
-
(
|
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.
|
40
|
+
usernameOrConnection: this.conn,
|
42
41
|
componentFilter,
|
43
42
|
});
|
44
|
-
if (
|
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 =
|
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 (!
|
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 (
|
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.
|
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.
|
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.
|
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.
|
93
|
+
this.log(await componentSet.getPackageXml());
|
95
94
|
}
|
96
|
-
|
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.
|
102
|
+
apiVersion = this.conn.getApiVersion();
|
104
103
|
}
|
105
|
-
members = ensureArray((await this.
|
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.
|
115
|
-
GeneratePackageXML.
|
116
|
-
GeneratePackageXML.
|
117
|
-
|
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('
|
121
|
+
description: messages.getMessage('flags.quick-filter.summary'),
|
122
|
+
deprecateAliases: true,
|
123
|
+
aliases: ['quickfilter'],
|
120
124
|
}),
|
121
|
-
|
125
|
+
'match-case': Flags.boolean({
|
122
126
|
char: 'c',
|
123
|
-
|
127
|
+
summary: messages.getMessage('flags.match-case.summary'),
|
128
|
+
deprecateAliases: true,
|
129
|
+
aliases: ['matchcase'],
|
124
130
|
}),
|
125
|
-
|
131
|
+
'match-whole-word': Flags.boolean({
|
126
132
|
char: 'w',
|
127
|
-
|
133
|
+
summary: messages.getMessage('flags.match-whole-word.summary'),
|
134
|
+
deprecateAliases: true,
|
135
|
+
aliases: ['matchwholeword'],
|
128
136
|
}),
|
129
|
-
|
130
|
-
|
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:
|
142
|
+
file: Flags.string({
|
133
143
|
char: 'f',
|
134
|
-
|
144
|
+
summary: messages.getMessage('flags.file.summary'),
|
135
145
|
}),
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
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,
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/commands/jayree/manifest/generate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,SAAS,EACT,KAAK,EACL,oBAAoB,EACpB,iCAAiC,EACjC,+BAA+B,EAC/B,EAAE,GACH,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAc,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAyB,MAAM,oCAAoC,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB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AAC;IACF,uBAAuB,EAAE,KAAK,CAAC,OAAO,CAAC;QACrC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qCAAqC,CAAC;QACnE,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACjC,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;KACnD,CAAC;IACF,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC;QAC/B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;QAC7D,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,gBAAgB,EAAE,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 {
|
2
|
-
import {
|
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
|
9
|
-
static
|
10
|
-
static
|
11
|
-
static
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
}
|