@jayree/sfdx-plugin-manifest 1.0.3 → 2.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.
package/README.md CHANGED
@@ -18,7 +18,7 @@ $ sfdx plugins:install @jayree/sfdx-plugin-manifest
18
18
  $ sfdx jayree:COMMAND
19
19
  running command...
20
20
  $ sfdx plugins
21
- @jayree/sfdx-plugin-manifest 1.0.3
21
+ @jayree/sfdx-plugin-manifest 2.0.0
22
22
  $ sfdx help jayree:COMMAND
23
23
  USAGE
24
24
  $ sfdx jayree:COMMAND
@@ -58,7 +58,7 @@ EXAMPLE
58
58
  $ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml
59
59
  ```
60
60
 
61
- _See code: [commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v1.0.3/commands/jayree/manifest/cleanup.ts)_
61
+ _See code: [commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.0.0/commands/jayree/manifest/cleanup.ts)_
62
62
 
63
63
  ### `sfdx jayree:manifest:generate`
64
64
 
@@ -109,7 +109,7 @@ EXAMPLES
109
109
  <Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
110
110
  ```
111
111
 
112
- _See code: [commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v1.0.3/commands/jayree/manifest/generate.ts)_
112
+ _See code: [commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.0.0/commands/jayree/manifest/generate.ts)_
113
113
 
114
114
  ### `sfdx jayree:manifest:git:diff`
115
115
 
@@ -117,7 +117,7 @@ create a manifest and destructiveChanges manifest using 'git diff' data
117
117
 
118
118
  ```
119
119
  USAGE
120
- $ sfdx jayree:manifest:git:diff [--json] [--loglevel
120
+ $ sfdx jayree:manifest:git:diff [-o <string>] [--json] [--loglevel
121
121
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
122
122
 
123
123
  ARGUMENTS
@@ -125,6 +125,9 @@ ARGUMENTS
125
125
  REF2 commit or branch to compare to the base commit
126
126
 
127
127
  OPTIONS
128
+ -o, --outputdir=outputdir directory to save the created
129
+ manifest files
130
+
128
131
  --json format output as json
129
132
 
130
133
  --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
@@ -153,5 +156,5 @@ EXAMPLES
153
156
  uses the diff of what is unique in branchB (REF2)
154
157
  ```
155
158
 
156
- _See code: [commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v1.0.3/commands/jayree/manifest/git/diff.ts)_
159
+ _See code: [commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.0.0/commands/jayree/manifest/git/diff.ts)_
157
160
  <!-- commandsstop -->
@@ -35,9 +35,17 @@ class GeneratePackageXML extends jayreeSfdxCommand_1.JayreeSfdxCommand {
35
35
  const childrenPromises = [];
36
36
  const componentTypes = new Set();
37
37
  for await (const componentResult of componentPromises) {
38
- Aggregator.push(...componentResult);
39
38
  for (const component of componentResult) {
40
- const componentType = registryAccess.getTypeByName(component.type.toLowerCase());
39
+ let componentType;
40
+ if (typeof component.type === 'string') {
41
+ componentType = registryAccess.getTypeByName(component.type);
42
+ }
43
+ else {
44
+ // fix { type: { "$": { "xsi:nil": "true" } } }
45
+ componentType = registryAccess.getTypeBySuffix((0, utils_1.extName)(component.fileName));
46
+ component.type = componentType.name;
47
+ }
48
+ Aggregator.push(component);
41
49
  componentTypes.add(componentType);
42
50
  const folderContentType = componentType.folderContentType;
43
51
  if (folderContentType) {
@@ -144,8 +152,7 @@ class GeneratePackageXML extends jayreeSfdxCommand_1.JayreeSfdxCommand {
144
152
  if (query.type === source_deploy_retrieve_1.registry.types.standardvalueset.name && members.length === 0) {
145
153
  const standardValueSetPromises = stdValueSets.fullNames.map(async (standardValueSetFullName) => {
146
154
  try {
147
- const queryResult = (await this.cacheConnection.tooling.query(`SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '${standardValueSetFullName}'`));
148
- const standardValueSetRecord = queryResult.records[0];
155
+ const standardValueSetRecord = await this.cacheConnection.singleRecordQuery(`SELECT Id, MasterLabel, Metadata FROM StandardValueSet WHERE MasterLabel = '${standardValueSetFullName}'`, { tooling: true });
149
156
  return (standardValueSetRecord.Metadata.standardValue.length && {
150
157
  fullName: standardValueSetRecord.MasterLabel,
151
158
  fileName: `${source_deploy_retrieve_1.registry.types.standardvalueset.directoryName}/${standardValueSetRecord.MasterLabel}.${source_deploy_retrieve_1.registry.types.standardvalueset.suffix}`,
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/commands/jayree/manifest/generate.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAyD;AAEzD,2CAAwD;AACxD,+EAM4C;AAC5C,4EAAgG;AAChG,+BAA+B;AAC/B,gFAAgF;AAChF,kEAA+D;AAE/D,MAAM,YAAY,GAAG,IAAA,kBAAU,EAAC,oBAAoB,CAAC,CAAC;AACtD,MAAM,cAAc,GAAG,IAAI,uCAAc,EAAE,CAAC;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAAC;AA6B3F,MAAqB,kBAAmB,SAAQ,qCAAiB;IAuC/D,sCAAsC;IAC/B,KAAK,CAAC,GAAG;;QACd,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACzE,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAS,MAAM,CAAC,CAAC;QA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AC;QACvB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;KAC7D,CAAC;IACF,cAAc,EAAE,eAAK,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;KAClE,CAAC;IACF,mBAAmB,EAAE,eAAK,CAAC,OAAO,CAAC;QACjC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC;KACnE,CAAC;IACF,IAAI,EAAE,eAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACxD,CAAC;IACF,cAAc,EAAE,eAAK,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;KAClE,CAAC;CACH,CAAC;AAEe,mCAAgB,GAAG,IAAI,CAAC;AACxB,yCAAsB,GAAG,KAAK,CAAC;AAC/B,kCAAe,GAAG,KAAK,CAAC"}
@@ -1,6 +1,7 @@
1
- import { SfdxCommand } from '@salesforce/command';
1
+ import { FlagsConfig } from '@salesforce/command';
2
2
  import { AnyJson } from '@salesforce/ts-types';
3
- export default class GitDiff extends SfdxCommand {
3
+ import { JayreeSfdxCommand } from '../../../../jayreeSfdxCommand';
4
+ export default class GitDiff extends JayreeSfdxCommand {
4
5
  static description: string;
5
6
  static examples: string[];
6
7
  static args: {
@@ -10,10 +11,21 @@ export default class GitDiff extends SfdxCommand {
10
11
  parse: (input: string) => string;
11
12
  hidden: boolean;
12
13
  }[];
14
+ protected static flagsConfig: FlagsConfig;
13
15
  protected static requiresUsername: boolean;
14
16
  protected static supportsDevhubUsername: boolean;
15
17
  protected static requiresProject: boolean;
16
18
  private isOutputEnabled;
19
+ private outputDir;
20
+ private projectRoot;
21
+ private sfdxProjectFolders;
22
+ private sourceApiVersion;
23
+ private destructiveChanges;
24
+ private manifest;
25
+ private gitLines;
26
+ private ref1VirtualTreeContainer;
27
+ private ref2VirtualTreeContainer;
28
+ private componentSet;
29
+ private outputErrors;
17
30
  run(): Promise<AnyJson>;
18
- private getGitArgsFromArgv;
19
31
  }
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
8
  */
9
9
  const os = require("os");
10
10
  const path_1 = require("path");
11
- const util = require("util");
12
11
  const command_1 = require("@salesforce/command");
13
12
  const core_1 = require("@salesforce/core");
14
13
  const fs = require("fs-extra");
15
14
  const listr2_1 = require("listr2");
16
15
  const kit = require("@salesforce/kit");
17
16
  const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
17
+ const jayreeSfdxCommand_1 = require("../../../../jayreeSfdxCommand");
18
18
  const gitdiff_1 = require("../../../../utils/gitdiff");
19
19
  core_1.Messages.importMessagesDirectory(__dirname);
20
20
  const messages = core_1.Messages.loadMessages('@jayree/sfdx-plugin-manifest', 'gitdiff');
@@ -34,72 +34,81 @@ const unexpectedArgument = (input) => {
34
34
  }
35
35
  return input;
36
36
  };
37
- class GitDiff extends command_1.SfdxCommand {
37
+ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
38
38
  async run() {
39
39
  var _a, _b;
40
+ this.outputDir = this.getFlag('outputdir');
41
+ this.projectRoot = this.project.getPath();
42
+ this.sfdxProjectFolders = this.project.getPackageDirectories().map((p) => (0, gitdiff_1.ensureOSPath)(p.path));
43
+ this.sourceApiVersion = (await this.project.retrieveSfdxProjectJson()).getContents().sourceApiVersion;
44
+ this.destructiveChanges = (0, path_1.join)(this.projectRoot, this.outputDir, 'destructiveChanges.xml');
45
+ this.manifest = (0, path_1.join)(this.projectRoot, this.outputDir, 'package.xml');
46
+ (0, gitdiff_1.debug)({
47
+ outputDir: this.outputDir,
48
+ projectRoot: this.projectRoot,
49
+ sfdxProjectFolders: this.sfdxProjectFolders,
50
+ });
40
51
  const isContentTypeJSON = kit.env.getString('SFDX_CONTENT_TYPE', '').toUpperCase() === 'JSON';
41
52
  this.isOutputEnabled = !(process.argv.find((arg) => arg === '--json') || isContentTypeJSON);
42
- const gitArgs = this.getGitArgsFromArgv();
53
+ const gitArgs = await (0, gitdiff_1.getGitArgsFromArgv)(this.args.ref1, this.args.ref2, this.argv, this.projectRoot);
54
+ (0, gitdiff_1.debug)({ gitArgs });
43
55
  const tasks = new listr2_1.Listr([
44
56
  {
45
57
  title: 'Analyze sfdx-project',
46
- task: async (ctx, task) => {
47
- ctx.projectRoot = this.project.getPath();
48
- ctx.sfdxProjectFolders = this.project.getPackageDirectories().map((p) => (0, gitdiff_1.ensureOSPath)(p.path));
49
- ctx.sourceApiVersion = (await this.project.retrieveSfdxProjectJson()).getContents().sourceApiVersion;
50
- task.output = `packageDirectories: ${ctx.sfdxProjectFolders.length} sourceApiVersion: ${ctx.sourceApiVersion}`;
58
+ task: (ctx, task) => {
59
+ task.output = `packageDirectories: ${this.sfdxProjectFolders.length} sourceApiVersion: ${this.sourceApiVersion}`;
51
60
  },
52
61
  options: { persistentOutput: true },
53
62
  },
54
63
  {
55
- title: "Execute 'git --no-pager diff --name-status --no-renames <pending>'",
64
+ title: `Execute 'git --no-pager diff --name-status --no-renames ${gitArgs.refString}'`,
56
65
  task: async (ctx, task) => {
57
- ctx.git = gitArgs;
58
- task.title = `Execute 'git --no-pager diff --name-status --no-renames ${ctx.git.ref1ref2}'`;
59
- ctx.gitLines = await (0, gitdiff_1.getGitDiff)(ctx.sfdxProjectFolders, ctx.git.ref1, ctx.git.ref2, ctx.projectRoot);
60
- task.output = `Changed files: ${ctx.gitLines.length}`;
66
+ this.gitLines = await (0, gitdiff_1.getGitDiff)(this.sfdxProjectFolders, gitArgs.ref1, gitArgs.ref2, this.projectRoot);
67
+ task.output = `Changed files: ${this.gitLines.length}`;
61
68
  },
62
69
  options: { persistentOutput: true },
63
70
  },
64
71
  {
65
72
  title: 'Create virtual tree container',
66
- skip: (ctx) => ctx.gitLines.length === 0,
73
+ skip: () => !this.gitLines.length,
67
74
  task: (ctx, task) => task.newListr([
68
75
  {
69
- title: `ref1: ${ctx.git.ref1}`,
70
- // eslint-disable-next-line @typescript-eslint/no-shadow
71
- task: async (ctx) => {
72
- ctx.ref1VirtualTreeContainer = await (0, gitdiff_1.createVirtualTreeContainer)(ctx.git.ref1, ctx.projectRoot, ctx.gitLines.filter((l) => l.status === 'M').map((l) => l.path));
76
+ title: `ref1: ${gitArgs.ref1}`,
77
+ task: async () => {
78
+ this.ref1VirtualTreeContainer = await (0, gitdiff_1.createVirtualTreeContainer)(gitArgs.ref1, this.projectRoot, this.gitLines.filter((l) => l.status === 'M').map((l) => l.path));
73
79
  },
74
80
  },
75
81
  {
76
- title: ctx.git.ref2 !== '' ? `ref2: ${ctx.git.ref2}` : undefined,
77
- // eslint-disable-next-line @typescript-eslint/no-shadow
78
- task: async (ctx) => {
79
- ctx.ref2VirtualTreeContainer =
80
- ctx.git.ref2 !== ''
81
- ? await (0, gitdiff_1.createVirtualTreeContainer)(ctx.git.ref2, ctx.projectRoot, ctx.gitLines.filter((l) => l.status === 'M').map((l) => l.path))
82
- : new gitdiff_1.NodeFSTreeContainer();
82
+ title: gitArgs.ref2 !== '' ? `ref2: ${gitArgs.ref2}` : undefined,
83
+ task: async () => {
84
+ this.ref2VirtualTreeContainer =
85
+ gitArgs.ref2 !== ''
86
+ ? await (0, gitdiff_1.createVirtualTreeContainer)(gitArgs.ref2, this.projectRoot, this.gitLines.filter((l) => l.status === 'M').map((l) => l.path))
87
+ : new source_deploy_retrieve_1.NodeFSTreeContainer();
83
88
  },
84
89
  },
85
90
  ], { concurrent: true }),
86
91
  },
87
92
  {
88
93
  title: 'Analyze git diff results',
89
- skip: (ctx) => ctx.gitLines.length === 0,
94
+ skip: () => !this.gitLines.length,
90
95
  task: async (ctx, task) => {
91
- ctx.gitResults = await (0, gitdiff_1.getGitResults)(ctx.gitLines, ctx.ref1VirtualTreeContainer, ctx.ref2VirtualTreeContainer);
92
- task.output = `Added: ${ctx.gitResults.counts.added}, Deleted: ${ctx.gitResults.counts.deleted}, Modified: ${ctx.gitResults.counts.modified}, Unchanged: ${ctx.gitResults.counts.unchanged}, Ignored: ${ctx.gitResults.counts.ignored}${ctx.gitResults.counts.error ? `, Errors: ${ctx.gitResults.counts.error}` : ''}`;
96
+ const { manifest, output } = await (0, gitdiff_1.getGitResults)(this.gitLines, this.ref1VirtualTreeContainer, this.ref2VirtualTreeContainer);
97
+ task.output = `Added: ${output.counts.added}, Deleted: ${output.counts.deleted}, Modified: ${output.counts.modified}, Unchanged: ${output.counts.unchanged}, Ignored: ${output.counts.ignored}${output.counts.error ? `, Errors: ${output.counts.error}` : ''}`;
98
+ this.outputErrors = output.errors;
99
+ (0, gitdiff_1.debug)({ manifest });
100
+ this.componentSet = (0, gitdiff_1.fixComponentSetChilds)(manifest);
101
+ this.componentSet.sourceApiVersion = this.sourceApiVersion;
93
102
  },
94
103
  options: { persistentOutput: true },
95
104
  },
96
105
  {
97
106
  // title: 'Error output',
98
- skip: (ctx) => !ctx.gitResults.errors.length,
107
+ skip: () => !(this.outputErrors && this.outputErrors.length),
99
108
  task: (ctx, task) => {
100
- const errors = [...ctx.gitResults.errors];
101
- const moreErrors = errors.splice(5);
102
- for (const message of errors) {
109
+ (0, gitdiff_1.debug)({ errors: this.outputErrors });
110
+ const moreErrors = this.outputErrors.splice(5);
111
+ for (const message of this.outputErrors) {
103
112
  task.output = `Error: ${message}`;
104
113
  }
105
114
  task.output = moreErrors.length ? `... ${moreErrors.length} more errors` : '';
@@ -108,51 +117,26 @@ class GitDiff extends command_1.SfdxCommand {
108
117
  },
109
118
  {
110
119
  title: 'Generate manifests',
111
- skip: (ctx) => !ctx.gitResults || (!ctx.gitResults.manifest.size && !ctx.gitResults.destructiveChanges.size),
120
+ skip: () => !(this.componentSet && this.componentSet.size),
112
121
  task: (ctx, task) => task.newListr([
113
122
  {
114
- title: (0, path_1.join)('destructiveChanges', 'destructiveChanges.xml'),
115
- // eslint-disable-next-line @typescript-eslint/no-shadow
116
- skip: (ctx) => !ctx.gitResults.destructiveChanges.size,
117
- // eslint-disable-next-line @typescript-eslint/no-shadow
118
- task: async (ctx, task) => {
119
- ctx.destructiveChangesComponentSet = (0, gitdiff_1.buildManifestComponentSet)(ctx.gitResults.destructiveChanges, true);
120
- if (!ctx.destructiveChangesComponentSet.getObject(source_deploy_retrieve_1.DestructiveChangesType.POST).Package.types.length) {
121
- task.skip();
122
- return;
123
- }
124
- ctx.destructiveChangesComponentSet.sourceApiVersion = ctx.sourceApiVersion;
125
- ctx.destructiveChanges = {
126
- files: [
127
- (0, path_1.join)(ctx.projectRoot, 'destructiveChanges', 'destructiveChanges.xml'),
128
- (0, path_1.join)(ctx.projectRoot, 'destructiveChanges', 'package.xml'),
129
- ],
130
- };
131
- await fs.ensureDir((0, path_1.dirname)(ctx.destructiveChanges.files[0]));
132
- await fs.writeFile(ctx.destructiveChanges.files[0], ctx.destructiveChangesComponentSet.getPackageXml(undefined, source_deploy_retrieve_1.DestructiveChangesType.POST));
133
- await fs.writeFile(ctx.destructiveChanges.files[1], ctx.destructiveChangesComponentSet.getPackageXml());
123
+ title: (0, path_1.relative)(this.projectRoot, this.manifest),
124
+ task: async () => {
125
+ await fs.ensureDir((0, path_1.dirname)(this.manifest));
126
+ await fs.writeFile(this.manifest, this.componentSet.getPackageXml());
134
127
  },
135
128
  options: { persistentOutput: true },
136
129
  },
137
130
  {
138
- title: (0, path_1.join)('package', 'package.xml'),
139
- // eslint-disable-next-line @typescript-eslint/no-shadow
140
- skip: (ctx) => !ctx.gitResults.manifest.size,
141
- // eslint-disable-next-line @typescript-eslint/no-shadow
142
- task: async (ctx, task) => {
143
- ctx.manifestComponentSet = (0, gitdiff_1.buildManifestComponentSet)(ctx.gitResults.manifest);
144
- if (!ctx.manifestComponentSet.getObject().Package.types.length) {
145
- task.skip();
146
- return;
147
- }
148
- ctx.manifestComponentSet.sourceApiVersion = ctx.sourceApiVersion;
149
- ctx.manifest = { file: (0, path_1.join)(ctx.projectRoot, 'package', 'package.xml') };
150
- await fs.ensureDir((0, path_1.dirname)(ctx.manifest.file));
151
- await fs.writeFile(ctx.manifest.file, ctx.manifestComponentSet.getPackageXml());
131
+ title: (0, path_1.relative)(this.projectRoot, this.destructiveChanges),
132
+ skip: () => !this.componentSet.getTypesOfDestructiveChanges().length,
133
+ task: async () => {
134
+ await fs.ensureDir((0, path_1.dirname)(this.destructiveChanges));
135
+ await fs.writeFile(this.destructiveChanges, this.componentSet.getPackageXml(undefined, source_deploy_retrieve_1.DestructiveChangesType.POST));
152
136
  },
153
137
  options: { persistentOutput: true },
154
138
  },
155
- ], { concurrent: true, exitOnError: false }),
139
+ ], { concurrent: true }),
156
140
  },
157
141
  ], {
158
142
  rendererOptions: { showTimer: true, collapse: false, lazy: true, collapseErrors: false },
@@ -160,26 +144,10 @@ class GitDiff extends command_1.SfdxCommand {
160
144
  rendererFallback: gitdiff_1.debug.enabled,
161
145
  });
162
146
  try {
163
- const context = await tasks.run();
164
- if (gitdiff_1.debug.enabled && this.isOutputEnabled) {
165
- logger.success(`Context: ${JSON.stringify(context, (key, value) => {
166
- if (value instanceof source_deploy_retrieve_1.ComponentSet && value !== null) {
167
- let types = value.getObject().Package.types;
168
- if (types.length === 0) {
169
- types = value.getObject(source_deploy_retrieve_1.DestructiveChangesType.POST).Package.types;
170
- }
171
- return types;
172
- }
173
- if (value instanceof source_deploy_retrieve_1.VirtualTreeContainer) {
174
- return typeof value;
175
- }
176
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
177
- return value;
178
- }, 2)}`);
179
- }
147
+ await tasks.run();
180
148
  return {
181
- destructiveChanges: (_a = context.destructiveChangesComponentSet) === null || _a === void 0 ? void 0 : _a.getObject(source_deploy_retrieve_1.DestructiveChangesType.POST),
182
- manifest: (_b = context.manifestComponentSet) === null || _b === void 0 ? void 0 : _b.getObject(),
149
+ destructiveChanges: (_a = this.componentSet) === null || _a === void 0 ? void 0 : _a.getObject(source_deploy_retrieve_1.DestructiveChangesType.POST),
150
+ manifest: (_b = this.componentSet) === null || _b === void 0 ? void 0 : _b.getObject(),
183
151
  };
184
152
  }
185
153
  catch (e) {
@@ -189,26 +157,6 @@ class GitDiff extends command_1.SfdxCommand {
189
157
  throw e;
190
158
  }
191
159
  }
192
- getGitArgsFromArgv() {
193
- const argv = this.argv.filter((v) => !v.includes('-'));
194
- let ref1ref2 = this.args.ref1;
195
- const a = argv.join('.').split('.');
196
- if ((a.length === 3 || a.length === 4) && typeof this.args.ref2 === 'undefined') {
197
- this.args.ref1 = a[0];
198
- this.args.ref2 = a[a.length - 1];
199
- }
200
- else if (a.length === 2 && typeof this.args.ref2 !== 'undefined') {
201
- ref1ref2 = `${this.args.ref1}..${this.args.ref2}`;
202
- }
203
- else if (a.length === 1) {
204
- this.args.ref2 = '';
205
- }
206
- else {
207
- throw new Error(`Ambiguous ${util.format('argument%s', argv.length === 1 ? '' : 's')}: ${argv.join(', ')}
208
- See more help with --help`);
209
- }
210
- return { ref1: this.args.ref1, ref2: this.args.ref2, ref1ref2 };
211
- }
212
160
  }
213
161
  exports.default = GitDiff;
214
162
  GitDiff.description = messages.getMessage('commandDescription');
@@ -229,6 +177,13 @@ GitDiff.args = [
229
177
  hidden: false,
230
178
  },
231
179
  ];
180
+ GitDiff.flagsConfig = {
181
+ outputdir: command_1.flags.string({
182
+ char: 'o',
183
+ description: messages.getMessage('outputdir'),
184
+ default: '',
185
+ }),
186
+ };
232
187
  GitDiff.requiresUsername = false;
233
188
  GitDiff.supportsDevhubUsername = false;
234
189
  GitDiff.requiresProject = true;
@@ -1 +1 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../src/commands/jayree/manifest/git/diff.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,+BAAqC;AACrC,6BAA6B;AAC7B,iDAAkD;AAClD,2CAA4C;AAE5C,+BAA+B;AAC/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7D,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,KAAK;KACd;CACF,CAAC;AAEe,mBAAW,GAAgB;IAC1C,SAAS,EAAE,eAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;QAC7C,OAAO,EAAE,EAAE;KACZ,CAAC;CACH,CAAC;AAEe,wBAAgB,GAAG,KAAK,CAAC;AACzB,8BAAsB,GAAG,KAAK,CAAC;AAC/B,uBAAe,GAAG,IAAI,CAAC"}
@@ -12,12 +12,12 @@ const path_1 = require("path");
12
12
  const fs = require("fs-extra");
13
13
  const debug_1 = require("debug");
14
14
  const terminalRenderer = require("marked-terminal");
15
- const marked = require("marked");
15
+ const marked_1 = require("marked");
16
16
  const debug = (0, debug_1.debug)('jayree:hooks');
17
17
  const changelog = function () {
18
18
  process.once('exit', () => {
19
19
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
20
- marked.setOptions({ renderer: new terminalRenderer() });
20
+ marked_1.marked.setOptions({ renderer: new terminalRenderer() });
21
21
  try {
22
22
  const moduleRootPath = (0, path_1.join)(__dirname, '..', '..');
23
23
  const changelogFile = fs.readFileSync((0, path_1.join)(moduleRootPath, 'CHANGELOG.md'), 'utf8');
@@ -40,9 +40,9 @@ const changelog = function () {
40
40
  changelogText = changelogText.substring(0, changelogText.lastIndexOf('\n'));
41
41
  if (changelogText.length > 0) {
42
42
  // eslint-disable-next-line no-console
43
- console.log(marked(`# CHANGELOG (${packageJson.name})`));
43
+ console.log((0, marked_1.marked)(`# CHANGELOG (${packageJson.name})`));
44
44
  // eslint-disable-next-line no-console
45
- console.log(marked(changelogText));
45
+ console.log((0, marked_1.marked)(changelogText));
46
46
  }
47
47
  else {
48
48
  debug(`${packageJson.name} - no update`);
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],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,GAAG,CAAC,EAAE;oBAC5B,sCAAsC;oBACtC,OAAO,CAAC,GAAG,CAAC,IAAA,eAAM,EAAC,gBAAgB,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;oBACzD,sCAAsC;oBACtC,OAAO,CAAC,GAAG,CAAC,IAAA,eAAM,EAAC,aAAa,CAAC,CAAC,CAAC;iBACpC;qBAAM;oBACL,KAAK,CAAC,GAAG,WAAW,CAAC,IAAI,cAAc,CAAC,CAAC;iBAC1C;gBACD,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;aACjE;SACF;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC,KAAK,CAAC,CAAC;SACd;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AApCW,QAAA,SAAS,aAoCpB"}
@@ -1,18 +1,10 @@
1
1
  /// <reference types="debug" />
2
2
  import { ComponentSet, VirtualTreeContainer, SourceComponent, NodeFSTreeContainer as FSTreeContainer } from '@salesforce/source-deploy-retrieve';
3
- export declare const NodeFSTreeContainer: typeof FSTreeContainer;
3
+ import git from 'isomorphic-git';
4
4
  export declare const debug: import("debug").Debugger;
5
- export interface Ctx {
6
- projectRoot: string;
7
- sfdxProjectFolders: string[];
8
- sourceApiVersion: string;
9
- gitLines: Array<{
10
- path: string;
11
- status: string;
12
- }>;
13
- gitResults: {
14
- manifest: ComponentSet;
15
- destructiveChanges: ComponentSet;
5
+ declare type gitResults = {
6
+ manifest: ComponentSet;
7
+ output: {
16
8
  unchanged: string[];
17
9
  ignored: {
18
10
  ref1: string[];
@@ -28,22 +20,17 @@ export interface Ctx {
28
20
  };
29
21
  errors: string[];
30
22
  };
31
- ref1VirtualTreeContainer: VirtualTreeContainer;
32
- ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer;
33
- destructiveChangesComponentSet: ComponentSet;
34
- manifestComponentSet: ComponentSet;
35
- git: {
36
- ref1: string;
37
- ref2: string;
38
- ref1ref2: string;
39
- };
40
- destructiveChanges: {
41
- files: string[];
42
- };
43
- manifest: {
44
- file: string;
45
- };
46
- }
23
+ };
24
+ declare type git = {
25
+ ref1: string;
26
+ ref2: string;
27
+ refString: string;
28
+ };
29
+ export declare type gitLines = Array<{
30
+ path: string;
31
+ status: string;
32
+ }>;
33
+ export declare function getGitArgsFromArgv(ref1: string, ref2: string, argv: string[], dir: string): Promise<git>;
47
34
  export declare function ensureOSPath(path: string): string;
48
35
  export declare function ensureGitPath(path: string): string;
49
36
  export declare function createVirtualTreeContainer(ref: string, dir: string, modifiedFiles: string[]): Promise<VirtualTreeContainer>;
@@ -52,6 +39,7 @@ export declare function analyzeFile(path: string, ref1VirtualTreeContainer: Virt
52
39
  toManifest?: SourceComponent[];
53
40
  toDestructiveChanges?: SourceComponent[];
54
41
  }>;
55
- export declare function getGitDiff(sfdxProjectFolders: string[], ref1: string, ref2: string, dir: string): Promise<Ctx['gitLines']>;
56
- export declare function getGitResults(gitLines: Ctx['gitLines'], ref1VirtualTreeContainer: VirtualTreeContainer, ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer): Promise<Ctx['gitResults']>;
57
- export declare function buildManifestComponentSet(cs: ComponentSet, forDestructiveChanges?: boolean): ComponentSet;
42
+ export declare function getGitDiff(sfdxProjectFolders: string[], ref1: string, ref2: string, dir: string): Promise<gitLines>;
43
+ export declare function getGitResults(gitLines: gitLines, ref1VirtualTreeContainer: VirtualTreeContainer, ref2VirtualTreeContainer: VirtualTreeContainer | FSTreeContainer): Promise<gitResults>;
44
+ export declare function fixComponentSetChilds(cs: ComponentSet): ComponentSet;
45
+ export {};
@@ -6,17 +6,114 @@
6
6
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.buildManifestComponentSet = exports.getGitResults = exports.getGitDiff = exports.analyzeFile = exports.createVirtualTreeContainer = exports.ensureGitPath = exports.ensureOSPath = exports.debug = exports.NodeFSTreeContainer = void 0;
9
+ exports.fixComponentSetChilds = exports.getGitResults = exports.getGitDiff = exports.analyzeFile = exports.createVirtualTreeContainer = exports.ensureGitPath = exports.ensureOSPath = exports.getGitArgsFromArgv = exports.debug = void 0;
10
10
  const path_1 = require("path");
11
+ const util = require("util");
11
12
  const fs = require("fs-extra");
12
13
  const equal = require("fast-deep-equal");
13
14
  const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
14
15
  const utils_1 = require("@salesforce/source-deploy-retrieve/lib/src/utils");
15
16
  const debug_1 = require("debug");
16
17
  const isomorphic_git_1 = require("isomorphic-git");
17
- exports.NodeFSTreeContainer = source_deploy_retrieve_1.NodeFSTreeContainer;
18
18
  exports.debug = (0, debug_1.debug)('jayree:manifest:git:diff');
19
19
  const registryAccess = new source_deploy_retrieve_1.RegistryAccess();
20
+ async function resolveRef(refOrig, dir) {
21
+ if (refOrig === '') {
22
+ return '';
23
+ }
24
+ const getCommitLog = async (ref) => {
25
+ try {
26
+ const [log] = await isomorphic_git_1.default.log({
27
+ fs,
28
+ dir,
29
+ ref,
30
+ depth: 1,
31
+ });
32
+ return { oid: log.oid, parents: log.commit.parent };
33
+ }
34
+ catch (error) {
35
+ throw new Error(`ambiguous argument '${ref}': unknown revision or path not in the working tree.
36
+ See more help with --help`);
37
+ }
38
+ };
39
+ if (!['~', '^'].some((el) => refOrig.includes(el))) {
40
+ return (await getCommitLog(refOrig)).oid;
41
+ }
42
+ const firstIndex = [refOrig.indexOf('^'), refOrig.indexOf('~')]
43
+ .filter((a) => a >= 0)
44
+ .reduce((a, b) => Math.min(a, b));
45
+ let path = refOrig.substring(firstIndex);
46
+ let ref = refOrig.substring(0, firstIndex);
47
+ while (path.length && ref !== undefined) {
48
+ if (path.substring(0, 1) === '^') {
49
+ path = path.substring(1);
50
+ let next = Number(path.substring(0, 1));
51
+ path = next ? path.substring(1) : path;
52
+ next = next ? next : 1;
53
+ ref = (await getCommitLog(ref)).parents[next - 1];
54
+ }
55
+ else if (path.substring(0, 1) === '~') {
56
+ path = path.substring(1);
57
+ let next = Number(path.substring(0, 1));
58
+ path = next ? path.substring(1) : path;
59
+ next = next ? next : 1;
60
+ for (let index = 0; index <= next - 1; index++) {
61
+ ref = (await getCommitLog(ref)).parents[0];
62
+ }
63
+ }
64
+ else {
65
+ ref = undefined;
66
+ }
67
+ }
68
+ if (ref === undefined) {
69
+ throw new Error(`ambiguous argument '${refOrig}': unknown revision or path not in the working tree.`);
70
+ }
71
+ return ref;
72
+ }
73
+ async function getGitArgsFromArgv(ref1, ref2, argv, dir) {
74
+ const newArgv = [];
75
+ while (argv.length) {
76
+ let [e] = argv.splice(0, 1);
77
+ if (e.includes('=')) {
78
+ // skip parameter=value
79
+ }
80
+ else if (e.includes('-')) {
81
+ // remove value
82
+ [e] = argv.splice(0, 1);
83
+ }
84
+ else {
85
+ newArgv.push(e);
86
+ }
87
+ }
88
+ argv = newArgv;
89
+ let refString = ref1;
90
+ const a = argv.join('.').split('.');
91
+ if ((a.length === 3 || a.length === 4) && typeof ref2 === 'undefined') {
92
+ ref1 = a[0];
93
+ ref2 = a[a.length - 1];
94
+ }
95
+ else if (a.length === 2 && typeof ref2 !== 'undefined') {
96
+ refString = `${ref1}..${ref2}`;
97
+ }
98
+ else if (a.length === 1) {
99
+ ref2 = '';
100
+ }
101
+ else {
102
+ throw new Error(`Ambiguous ${util.format('argument%s', argv.length === 1 ? '' : 's')}: ${argv.join(', ')}
103
+ See more help with --help`);
104
+ }
105
+ ref1 = await resolveRef(ref1, dir);
106
+ ref2 = await resolveRef(ref2, dir);
107
+ if (a.length === 4) {
108
+ ref1 = (await isomorphic_git_1.default.findMergeBase({
109
+ fs,
110
+ dir,
111
+ oids: [ref2, ref1],
112
+ }))[0];
113
+ }
114
+ return { ref1, ref2, refString };
115
+ }
116
+ exports.getGitArgsFromArgv = getGitArgsFromArgv;
20
117
  function ensureOSPath(path) {
21
118
  return path.split(path_1.posix.sep).join(path_1.sep);
22
119
  }
@@ -29,7 +126,6 @@ async function createVirtualTreeContainer(ref, dir, modifiedFiles) {
29
126
  var _a, _b, _c, _d;
30
127
  const paths = (await isomorphic_git_1.default.listFiles({ fs, dir, ref })).map((p) => ensureOSPath(p));
31
128
  const oid = await isomorphic_git_1.default.resolveRef({ fs, dir, ref });
32
- (0, exports.debug)({ modifiedFiles });
33
129
  const virtualDirectoryByFullPath = new Map();
34
130
  for (const filename of paths) {
35
131
  let dirPath = (0, path_1.dirname)(filename);
@@ -68,36 +164,35 @@ async function analyzeFile(path, ref1VirtualTreeContainer, ref2VirtualTreeContai
68
164
  if (ref1Component.type.strictDirectoryName === true || !ref1Component.type.children) {
69
165
  return { status: 0 };
70
166
  }
71
- const SourceComponentNotInSource = ref1Component.getChildren().filter((x) => !ref2Component
167
+ const ref2ChildUniqueIdArray = ref2Component.getChildren().map((childComponent) => {
168
+ return getUniqueIdentifier(childComponent);
169
+ });
170
+ const ref1ChildUniqueIdArray = ref1Component.getChildren().map((childComponent) => {
171
+ return getUniqueIdentifier(childComponent);
172
+ });
173
+ const childComponentsNotInRef2 = ref1Component
72
174
  .getChildren()
73
- .map((f) => {
74
- return getUniqueIdentifier(f);
75
- })
76
- .includes(getUniqueIdentifier(x))); // deleted
77
- const SourceComponentNotInTarget = ref2Component.getChildren().filter((x) => !ref1Component
175
+ .filter((childComponent) => !ref2ChildUniqueIdArray.includes(getUniqueIdentifier(childComponent))); // deleted
176
+ const childComponentsNotInRef1 = ref2Component
78
177
  .getChildren()
79
- .map((f) => {
80
- return getUniqueIdentifier(f);
81
- })
82
- .includes(getUniqueIdentifier(x))); // added
83
- const SourceComponentInSourceAndTarget = ref1Component.getChildren().filter((x) => ref2Component
178
+ .filter((childComponent) => !ref1ChildUniqueIdArray.includes(getUniqueIdentifier(childComponent))); // added
179
+ const childComponentsInRef1AndRef2 = ref1Component
84
180
  .getChildren()
85
- .map((f) => {
86
- return getUniqueIdentifier(f);
87
- })
88
- .includes(getUniqueIdentifier(x))); // modified?
89
- (0, exports.debug)({ SourceComponentNotInSource, SourceComponentNotInTarget, SourceComponentInSourceAndTarget });
90
- for (const x of SourceComponentInSourceAndTarget) {
91
- const [y] = ref2Component.getChildren().filter((f) => getUniqueIdentifier(x) === getUniqueIdentifier(f));
92
- if (!equal(await x.parseXml(), await y.parseXml())) {
93
- SourceComponentNotInTarget.push(y); // modified! -> add to added
181
+ .filter((childComponent) => ref2ChildUniqueIdArray.includes(getUniqueIdentifier(childComponent))); // modified?
182
+ (0, exports.debug)({ childComponentsNotInRef2, childComponentsNotInRef1, childComponentsInRef1AndRef2 });
183
+ for (const childComponentRef1 of childComponentsInRef1AndRef2) {
184
+ const [childComponentRef2] = ref2Component
185
+ .getChildren()
186
+ .filter((childComponent) => getUniqueIdentifier(childComponentRef1) === getUniqueIdentifier(childComponent));
187
+ if (!equal(await childComponentRef1.parseXml(), await childComponentRef2.parseXml())) {
188
+ childComponentsNotInRef1.push(childComponentRef2); // modified! -> add to added
94
189
  }
95
190
  }
96
- (0, exports.debug)({ SourceComponentNotInTarget });
191
+ (0, exports.debug)({ childComponentsNotInRef1 });
97
192
  return {
98
- status: SourceComponentNotInSource.length + SourceComponentNotInTarget.length,
99
- toManifest: SourceComponentNotInTarget,
100
- toDestructiveChanges: SourceComponentNotInSource,
193
+ status: childComponentsNotInRef2.length + childComponentsNotInRef1.length,
194
+ toManifest: childComponentsNotInRef1,
195
+ toDestructiveChanges: childComponentsNotInRef2,
101
196
  };
102
197
  }
103
198
  exports.analyzeFile = analyzeFile;
@@ -143,7 +238,6 @@ async function getGitDiff(sfdxProjectFolders, ref1, ref2, dir) {
143
238
  .filter((l) => sfdxProjectFolders.some((f) => {
144
239
  return l.path.startsWith(f);
145
240
  }));
146
- const renames = [];
147
241
  gitLines = gitLines.filter((line) => {
148
242
  if (line.status === 'D') {
149
243
  for (const sfdxFolder of sfdxProjectFolders) {
@@ -151,70 +245,83 @@ async function getGitDiff(sfdxProjectFolders, ref1, ref2, dir) {
151
245
  const filePath = line.path.replace(line.path.startsWith(defaultFolder) ? defaultFolder : sfdxFolder, '');
152
246
  const target = gitLines.find((t) => t.path.endsWith(filePath) && t.status === 'A');
153
247
  if (target) {
154
- renames.push({ from: line.path, to: target.path });
248
+ (0, exports.debug)(`rename: ${line.path} -> ${target.path}`);
155
249
  return false;
156
250
  }
157
251
  }
158
252
  }
159
253
  return true;
160
254
  });
161
- (0, exports.debug)({ gitLines, renames, sfdxProjectFolders });
255
+ (0, exports.debug)({ gitLines });
162
256
  return gitLines;
163
257
  }
164
258
  exports.getGitDiff = getGitDiff;
165
259
  async function getGitResults(gitLines, ref1VirtualTreeContainer, ref2VirtualTreeContainer) {
166
260
  const results = {
167
261
  manifest: new source_deploy_retrieve_1.ComponentSet(undefined, registryAccess),
168
- destructiveChanges: new source_deploy_retrieve_1.ComponentSet(undefined, registryAccess),
169
- unchanged: [],
170
- ignored: { ref1: [], ref2: [] },
171
- counts: { added: 0, deleted: 0, modified: 0, unchanged: 0, ignored: 0, error: 0 },
172
- errors: [],
262
+ output: {
263
+ unchanged: [],
264
+ ignored: { ref1: [], ref2: [] },
265
+ counts: { added: 0, deleted: 0, modified: 0, unchanged: 0, ignored: 0, error: 0 },
266
+ errors: [],
267
+ },
173
268
  };
174
269
  const ref1Resolver = new source_deploy_retrieve_1.MetadataResolver(registryAccess, ref1VirtualTreeContainer);
175
270
  const ref2Resolver = new source_deploy_retrieve_1.MetadataResolver(registryAccess, ref2VirtualTreeContainer);
271
+ const getComponentsFromPath = (resolver, path) => {
272
+ let result = [];
273
+ try {
274
+ result = resolver.getComponentsFromPath(path);
275
+ }
276
+ catch (error) {
277
+ results.output.counts.error++;
278
+ results.output.errors.push(error);
279
+ }
280
+ return result;
281
+ };
176
282
  for (const [, { status, path }] of gitLines.entries()) {
177
283
  if (status === 'D') {
178
- for (const c of ref1Resolver.getComponentsFromPath(path)) {
284
+ for (const c of getComponentsFromPath(ref1Resolver, path)) {
179
285
  if (c.xml === path || gitLines.find((x) => x.path === c.xml)) {
180
- results.destructiveChanges.add(c, source_deploy_retrieve_1.DestructiveChangesType.POST);
181
- results.counts.deleted++;
286
+ results.manifest.add(c, source_deploy_retrieve_1.DestructiveChangesType.POST);
287
+ results.output.counts.deleted++;
182
288
  }
183
289
  else {
184
290
  try {
291
+ // in case a binary source file of a bundle was deleted, check if the bundle ist still valid and update instead of delete
185
292
  ref2Resolver.getComponentsFromPath(c.xml);
186
293
  results.manifest.add(c);
187
- results.counts.added++;
294
+ results.output.counts.added++;
188
295
  }
189
296
  catch (error) {
190
- results.counts.error++;
191
- results.errors.push(error);
297
+ results.output.counts.error++;
298
+ results.output.errors.push(error);
192
299
  }
193
300
  }
194
301
  }
195
302
  }
196
303
  else if (status === 'A') {
197
- for (const c of ref2Resolver.getComponentsFromPath(path)) {
304
+ for (const c of getComponentsFromPath(ref2Resolver, path)) {
198
305
  results.manifest.add(c);
199
- results.counts.added++;
306
+ results.output.counts.added++;
200
307
  }
201
308
  }
202
309
  else {
203
310
  const check = await analyzeFile(path, ref1VirtualTreeContainer, ref2VirtualTreeContainer);
204
311
  if (check.status === 0) {
205
- for (const c of ref2Resolver.getComponentsFromPath(path)) {
312
+ for (const c of getComponentsFromPath(ref2Resolver, path)) {
206
313
  results.manifest.add(c);
207
- results.counts.added++;
314
+ results.output.counts.added++;
208
315
  }
209
316
  }
210
317
  else if (check.status === -1) {
211
- results.unchanged.push(path);
212
- results.counts.unchanged++;
318
+ results.output.unchanged.push(path);
319
+ results.output.counts.unchanged++;
213
320
  }
214
321
  else {
215
- results.counts.modified++;
322
+ results.output.counts.modified++;
216
323
  for (const c of check.toDestructiveChanges) {
217
- results.destructiveChanges.add(c, source_deploy_retrieve_1.DestructiveChangesType.POST);
324
+ results.manifest.add(c, source_deploy_retrieve_1.DestructiveChangesType.POST);
218
325
  }
219
326
  for (const c of check.toManifest) {
220
327
  results.manifest.add(c);
@@ -222,35 +329,34 @@ async function getGitResults(gitLines, ref1VirtualTreeContainer, ref2VirtualTree
222
329
  }
223
330
  }
224
331
  }
225
- results.ignored = {
332
+ results.output.ignored = {
226
333
  ref1: Array.from(ref1Resolver.forceIgnoredPaths),
227
334
  ref2: Array.from(ref2Resolver.forceIgnoredPaths),
228
335
  };
229
- results.counts.ignored = ref1Resolver.forceIgnoredPaths.size + ref2Resolver.forceIgnoredPaths.size;
336
+ results.output.counts.ignored = ref1Resolver.forceIgnoredPaths.size + ref2Resolver.forceIgnoredPaths.size;
230
337
  return results;
231
338
  }
232
339
  exports.getGitResults = getGitResults;
233
- function buildManifestComponentSet(cs, forDestructiveChanges = false) {
234
- let csArray = cs.toArray();
340
+ function fixComponentSetChilds(cs) {
341
+ let sourceComponents = cs.getSourceComponents();
235
342
  // SDR library is more strict and avoids fixes like this
236
- if (!forDestructiveChanges) {
237
- const childsTobeReplacedByParent = [
238
- ...Object.keys(source_deploy_retrieve_1.registry.types.workflow.children.types),
239
- ...Object.keys(source_deploy_retrieve_1.registry.types.sharingrules.children.types),
240
- ];
241
- csArray = csArray.map((component) => {
242
- if (childsTobeReplacedByParent.includes(component.type.id)) {
243
- return component.parent;
244
- }
245
- return component;
246
- });
247
- }
248
- return new source_deploy_retrieve_1.ComponentSet(csArray.sort((a, b) => {
343
+ const childsTobeReplacedByParent = [
344
+ ...Object.keys(source_deploy_retrieve_1.registry.types.workflow.children.types),
345
+ ...Object.keys(source_deploy_retrieve_1.registry.types.sharingrules.children.types),
346
+ ];
347
+ sourceComponents = sourceComponents.map((component) => {
348
+ if (!component.isMarkedForDelete() && childsTobeReplacedByParent.includes(component.type.id)) {
349
+ (0, exports.debug)(`replace: ${component.type.name}:${component.fullName} -> ${component.parent.type.name}:${component.parent.fullName}`);
350
+ return component.parent;
351
+ }
352
+ return component;
353
+ });
354
+ return new source_deploy_retrieve_1.ComponentSet(sourceComponents.toArray().sort((a, b) => {
249
355
  if (a.type.name === b.type.name) {
250
356
  return a.fullName.toLowerCase() > b.fullName.toLowerCase() ? 1 : -1;
251
357
  }
252
358
  return a.type.name.toLowerCase() > b.type.name.toLowerCase() ? 1 : -1;
253
359
  }), registryAccess);
254
360
  }
255
- exports.buildManifestComponentSet = buildManifestComponentSet;
361
+ exports.fixComponentSetChilds = fixComponentSetChilds;
256
362
  //# sourceMappingURL=gitdiff.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gitdiff.js","sourceRoot":"","sources":["../../src/utils/gitdiff.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA2D;AAC3D,+BAA+B;AAC/B,yCAAyC;AACzC,+EAU4C;AAC5C,4EAAoF;AACpF,iCAAuC;AACvC,mDAAiC;AAEpB,QAAA,mBAAmB,GAAG,4CAAe,CAAC;AAEtC,QAAA,KAAK,GAAG,IAAA,aAAK,EAAC,0BAA0B,CAAC,CAAC;AAEvD,MAAM,cAAc,GAAG,IAAI,uCAAc,EAAE,CAAC;AAgC5C,SAAgB,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC,CAAC;AACzC,CAAC;AAFD,oCAEC;AAED,SAAgB,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAG,CAAC,CAAC,IAAI,CAAC,YAAK,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAFD,sCAEC;AAEM,KAAK,UAAU,0BAA0B,CAC9C,GAAW,EACX,GAAW,EACX,aAAuB;;IAEvB,MAAM,KAAK,GAAG,CAAC,MAAM,wBAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAClF,MAAM,GAAG,GAAG,MAAM,wBAAG,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAA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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACrE;QACD,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC,CAAC,EACF,cAAc,CACf,CAAC;AACJ,CAAC;AA1BD,sDA0BC"}
@@ -18,4 +18,5 @@ uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1)
18
18
  `$ sfdx jayree:manifest:git:diff branchA...branchB
19
19
  uses the diff of what is unique in branchB (REF2)`,
20
20
  ],
21
+ outputdir: 'directory to save the created manifest files',
21
22
  };
@@ -1 +1 @@
1
- {"version":"1.0.3","commands":{"jayree:manifest:cleanup":{"id":"jayree:manifest:cleanup","description":"removes those tags from a manifest file that are present in a second manifest file\nUse this command to remove components or metadata types from a manifes file.\nIf the 'cleanup' manifest file (--file) doesn't exist, a template file is created, which can then be modified.","usage":"<%= command.id %> [-x <filepath>] [-f <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml"],"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"},"manifest":{"name":"manifest","type":"option","char":"x","description":"path to the manifest file"},"file":{"name":"file","type":"option","char":"f","description":"path to the second 'cleanup' manifest file"}},"args":[]},"jayree:manifest:generate":{"id":"jayree:manifest:generate","description":"generate a complete manifest file form the specified org\nUse this command to generate a manifest file based on an existing org.","usage":"<%= command.id %> [-q <array>] [-c] [-w] [--includeflowversions] [-f <string>] [-x] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":["jayree:packagexml"],"examples":["$ sfdx jayree:manifest:generate --targetusername myOrg@example.com","<?xml version='1.0' encoding='UTF-8'?>","<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>"],"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"},"quickfilter":{"name":"quickfilter","type":"option","char":"q","description":"csv separated list of metadata type, member or file names to filter on"},"matchcase":{"name":"matchcase","type":"boolean","char":"c","description":"enable 'match case' for the quickfilter","allowNo":false},"matchwholeword":{"name":"matchwholeword","type":"boolean","char":"w","description":"enable 'match whole word' for the quickfilter","allowNo":false},"includeflowversions":{"name":"includeflowversions","type":"boolean","description":"include flow versions as with api version 43.0","allowNo":false},"file":{"name":"file","type":"option","char":"f","description":"write to 'file' instead of stdout"},"excludemanaged":{"name":"excludemanaged","type":"boolean","char":"x","description":"exclude managed packages from output","allowNo":false}},"args":[]},"jayree:manifest:git:diff":{"id":"jayree:manifest:git:diff","description":"create a manifest and destructiveChanges manifest using 'git diff' data\nUse this command to create a manifest and destructiveChanges manifest file based on the difference (git diff) of two git refs.\n\nYou can use all ways to spell <commit> which are valid for 'git diff'.\n(See https://git-scm.com/docs/git-diff)","usage":"<%= command.id %> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:git:diff <commit> <commit>","$ sfdx jayree:manifest:git:diff <commit>..<commit>","uses the changes between two arbitrary <commit>","","$ sfdx jayree:manifest:git:diff <commit>...<commit>","uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>."," ","$ sfdx jayree:manifest:git:diff branchA..branchB","uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1)","","$ sfdx jayree:manifest:git:diff branchA...branchB","uses the diff of what is unique in branchB (REF2)"],"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"}},"args":[{"name":"ref1","description":"base commit or branch","required":true,"hidden":false},{"name":"ref2","description":"commit or branch to compare to the base commit","required":false,"hidden":false}]}}}
1
+ {"version":"2.0.0","commands":{"jayree:manifest:cleanup":{"id":"jayree:manifest:cleanup","description":"removes those tags from a manifest file that are present in a second manifest file\nUse this command to remove components or metadata types from a manifes file.\nIf the 'cleanup' manifest file (--file) doesn't exist, a template file is created, which can then be modified.","usage":"<%= command.id %> [-x <filepath>] [-f <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml"],"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"},"manifest":{"name":"manifest","type":"option","char":"x","description":"path to the manifest file"},"file":{"name":"file","type":"option","char":"f","description":"path to the second 'cleanup' manifest file"}},"args":[]},"jayree:manifest:generate":{"id":"jayree:manifest:generate","description":"generate a complete manifest file form the specified org\nUse this command to generate a manifest file based on an existing org.","usage":"<%= command.id %> [-q <array>] [-c] [-w] [--includeflowversions] [-f <string>] [-x] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":["jayree:packagexml"],"examples":["$ sfdx jayree:manifest:generate --targetusername myOrg@example.com","<?xml version='1.0' encoding='UTF-8'?>","<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>"],"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"},"quickfilter":{"name":"quickfilter","type":"option","char":"q","description":"csv separated list of metadata type, member or file names to filter on"},"matchcase":{"name":"matchcase","type":"boolean","char":"c","description":"enable 'match case' for the quickfilter","allowNo":false},"matchwholeword":{"name":"matchwholeword","type":"boolean","char":"w","description":"enable 'match whole word' for the quickfilter","allowNo":false},"includeflowversions":{"name":"includeflowversions","type":"boolean","description":"include flow versions as with api version 43.0","allowNo":false},"file":{"name":"file","type":"option","char":"f","description":"write to 'file' instead of stdout"},"excludemanaged":{"name":"excludemanaged","type":"boolean","char":"x","description":"exclude managed packages from output","allowNo":false}},"args":[]},"jayree:manifest:git:diff":{"id":"jayree:manifest:git:diff","description":"create a manifest and destructiveChanges manifest using 'git diff' data\nUse this command to create a manifest and destructiveChanges manifest file based on the difference (git diff) of two git refs.\n\nYou can use all ways to spell <commit> which are valid for 'git diff'.\n(See https://git-scm.com/docs/git-diff)","usage":"<%= command.id %> [-o <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-manifest","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:manifest:git:diff <commit> <commit>","$ sfdx jayree:manifest:git:diff <commit>..<commit>","uses the changes between two arbitrary <commit>","","$ sfdx jayree:manifest:git:diff <commit>...<commit>","uses the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>."," ","$ sfdx jayree:manifest:git:diff branchA..branchB","uses the diff of what is unique in branchB (REF2) and unique in branchA (REF1)","","$ sfdx jayree:manifest:git:diff branchA...branchB","uses the diff of what is unique in branchB (REF2)"],"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"},"outputdir":{"name":"outputdir","type":"option","char":"o","description":"directory to save the created manifest files","default":""}},"args":[{"name":"ref1","description":"base commit or branch","required":true,"hidden":false},{"name":"ref2","description":"commit or branch to compare to the base commit","required":false,"hidden":false}]}}}
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@jayree/sfdx-plugin-manifest",
3
3
  "description": "jayree sfdx manifest commands",
4
- "version": "1.0.3",
4
+ "version": "2.0.0",
5
5
  "author": "jayree",
6
6
  "bugs": "https://github.com/jayree/sfdx-plugin-manifest/issues",
7
7
  "dependencies": {
8
- "@oclif/command": "^1.8.0",
9
- "@oclif/config": "^1.17.0",
8
+ "@oclif/command": "^1.8.3",
9
+ "@oclif/config": "^1.17.1",
10
10
  "@oclif/errors": "^1.3.5",
11
- "@salesforce/command": "^4.1.4",
12
- "@salesforce/core": "^2.28.2",
13
- "@salesforce/kit": "^1.5.17",
14
- "@salesforce/source-deploy-retrieve": "^5.1.2",
11
+ "@salesforce/command": "^4.1.5",
12
+ "@salesforce/core": "^2.29.0",
13
+ "@salesforce/kit": "^1.5.18",
14
+ "@salesforce/source-deploy-retrieve": "^5.6.3",
15
15
  "@salesforce/ts-types": "^1.5.20",
16
16
  "cli-ux": "^5.6.3",
17
17
  "debug": "^4.3.2",
@@ -20,16 +20,16 @@
20
20
  "fs-extra": "^10.0.0",
21
21
  "isomorphic-git": "^1.10.1",
22
22
  "jsforce": "^1.10.1",
23
- "listr2": "^3.13.1",
24
- "marked": "^3.0.8",
23
+ "listr2": "^3.13.4",
24
+ "marked": "^4.0.4",
25
25
  "marked-terminal": "^4.2.0",
26
26
  "tslib": "^2.3.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@commitlint/cli": "^13.2.1",
30
- "@commitlint/config-conventional": "^13.2.0",
29
+ "@commitlint/cli": "^15.0.0",
30
+ "@commitlint/config-conventional": "^15.0.0",
31
31
  "@oclif/dev-cli": "^1.26.0",
32
- "@oclif/plugin-help": "^3.2.3",
32
+ "@oclif/plugin-help": "^3.2.5",
33
33
  "@oclif/test": "^1.2.8",
34
34
  "@salesforce/dev-config": "^2.1.2",
35
35
  "@salesforce/dev-scripts": "^0.9.18",
@@ -39,21 +39,21 @@
39
39
  "@types/debug": "^4.1.7",
40
40
  "@types/fs-extra": "^9.0.13",
41
41
  "@types/jsforce": "^1.9.35",
42
- "@types/marked": "^3.0.2",
42
+ "@types/marked": "^4.0.1",
43
43
  "@types/mocha": "^9.0.0",
44
- "@types/node": "^16.11.6",
44
+ "@types/node": "^16.11.9",
45
45
  "@types/sinon": "10.0.6",
46
- "@typescript-eslint/eslint-plugin": "^5.2.0",
47
- "@typescript-eslint/parser": "^5.2.0",
46
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
47
+ "@typescript-eslint/parser": "^5.4.0",
48
48
  "chai": "^4.3.4",
49
- "eslint": "^8.1.0",
49
+ "eslint": "^8.3.0",
50
50
  "eslint-config-oclif": "^4.0",
51
51
  "eslint-config-prettier": "^8.3.0",
52
52
  "eslint-config-salesforce": "^0.1.6",
53
53
  "eslint-config-salesforce-license": "^0.1.6",
54
54
  "eslint-config-salesforce-typescript": "^0.2.8",
55
55
  "eslint-plugin-header": "^3.1.1",
56
- "eslint-plugin-import": "2.25.2",
56
+ "eslint-plugin-import": "2.25.3",
57
57
  "eslint-plugin-jsdoc": "^37.0.3",
58
58
  "eslint-plugin-prettier": "^4.0.0",
59
59
  "eslint-plugin-typescript": "^0.14.0",
@@ -64,11 +64,11 @@
64
64
  "patch-package": "^6.4.7",
65
65
  "pinst": "^2.1.6",
66
66
  "prettier": "^2.4.1",
67
- "pretty-quick": "^3.1.1",
68
- "sinon": "11.1.2",
69
- "source-map-support": "~0.5.20",
67
+ "pretty-quick": "^3.1.2",
68
+ "sinon": "12.0.1",
69
+ "source-map-support": "~0.5.21",
70
70
  "ts-node": "^10.4.0",
71
- "typescript": "^4.4.4"
71
+ "typescript": "^4.5.2"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=14.18.1"
package/CHANGELOG.md DELETED
@@ -1,34 +0,0 @@
1
- ## [1.0.3](https://github.com/jayree/sfdx-plugin-manifest/compare/v1.0.2...v1.0.3) (2021-10-31)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * **deps:** bump @salesforce/source-deploy-retrieve from 5.1.1 to 5.1.2 ([3f061e8](https://github.com/jayree/sfdx-plugin-manifest/commit/3f061e80f3ee66e9af306baaa8c0dd640694d52c))
7
- * **deps:** bump fast-xml-parser from 3.21.0 to 3.21.1 ([ea4c7b6](https://github.com/jayree/sfdx-plugin-manifest/commit/ea4c7b696381e3a9b9bf656e71332b58fec71d66))
8
-
9
- ## [1.0.2](https://github.com/jayree/sfdx-plugin-manifest/compare/v1.0.1...v1.0.2) (2021-10-29)
10
-
11
-
12
- ### Bug Fixes
13
-
14
- * **deps:** bump @salesforce/source-deploy-retrieve from 5.0.1 to 5.1.1 ([bb40fac](https://github.com/jayree/sfdx-plugin-manifest/commit/bb40fac5c2f8facbfe36df10908b9ae0ed342503))
15
- * **deps:** bump fast-xml-parser from 3.20.3 to 3.21.0 ([77cceff](https://github.com/jayree/sfdx-plugin-manifest/commit/77cceffd9546cf262cdb341a5cb8c0a27e2a587b))
16
- * **deps:** bump listr2 from 3.12.2 to 3.13.1 ([0afae6e](https://github.com/jayree/sfdx-plugin-manifest/commit/0afae6ea8729afeb069998d2fc5cb192e5e65440))
17
- * **deps:** bump marked from 3.0.7 to 3.0.8 ([fb76d91](https://github.com/jayree/sfdx-plugin-manifest/commit/fb76d91ef590575bab75c0e12188b13aa4794b2b))
18
- * **gitdiff:** optimize createVirtualTreeContainer method ([8a0579a](https://github.com/jayree/sfdx-plugin-manifest/commit/8a0579ae1fb4b7ce39f0c515344b1db05913af77))
19
- * **gitdiff:** set sourceApiVersion ([cc3d5df](https://github.com/jayree/sfdx-plugin-manifest/commit/cc3d5df8e3455867f5d8628e28f4c36a85b745da))
20
- * **gitdiff:** sort types and members in manifest ([7f76423](https://github.com/jayree/sfdx-plugin-manifest/commit/7f76423a0566ba34091b81b442901f5fe17f51f1))
21
-
22
- ## [1.0.1](https://github.com/jayree/sfdx-plugin-manifest/compare/v1.0.0...v1.0.1) (2021-10-21)
23
-
24
-
25
- ### Bug Fixes
26
-
27
- * **deps:** bump @salesforce/source-deploy-retrieve from 4.5.11 to 5.0.1 ([6c30cfa](https://github.com/jayree/sfdx-plugin-manifest/commit/6c30cfad891ecda913838b01d86e1e3a5e575a29))
28
-
29
- # 1.0.0 (2021-10-19)
30
-
31
-
32
- ### Features
33
-
34
- * add manifest:generate :cleanup :git:diff commands ([74cd719](https://github.com/jayree/sfdx-plugin-manifest/commit/74cd7194727665ae1f25b056780aeb4861f58137))