@jayree/sfdx-plugin-manifest 2.2.8 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +35 -0
- package/LICENSE.txt +2 -2
- package/README.md +4 -4
- package/lib/commands/jayree/manifest/cleanup.d.ts +1 -1
- package/lib/commands/jayree/manifest/cleanup.js +13 -16
- package/lib/commands/jayree/manifest/cleanup.js.map +1 -1
- package/lib/commands/jayree/manifest/generate.d.ts +2 -2
- package/lib/commands/jayree/manifest/generate.js +21 -24
- package/lib/commands/jayree/manifest/generate.js.map +1 -1
- package/lib/commands/jayree/manifest/git/diff.d.ts +1 -1
- package/lib/commands/jayree/manifest/git/diff.js +40 -51
- package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
- package/lib/hooks/changelog.js +19 -23
- package/lib/hooks/changelog.js.map +1 -1
- package/lib/index.js +2 -4
- package/lib/index.js.map +1 -1
- package/lib/jayreeSfdxCommand.js +5 -9
- package/lib/jayreeSfdxCommand.js.map +1 -1
- package/lib/utils/gitdiff.d.ts +2 -2
- package/lib/utils/gitdiff.js +61 -77
- package/lib/utils/gitdiff.js.map +1 -1
- package/lib/utils/manifest.js +19 -27
- package/lib/utils/manifest.js.map +1 -1
- package/messages/gitdiff.json +11 -0
- package/oclif.manifest.json +1 -1
- package/package.json +27 -26
- package/messages/gitdiff.js +0 -20
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,38 @@
|
|
1
|
+
# [2.3.0](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.2.10...v2.3.0) (2022-09-08)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **deps:** bump @oclif/core from 1.13.10 to 1.16.0 ([c4b4bec](https://github.com/jayree/sfdx-plugin-manifest/commit/c4b4bec2c97d6857b2c1c8bbc3648fd15ac4aae9))
|
7
|
+
* **deps:** bump @oclif/core from 1.16.0 to 1.16.1 ([e8c8488](https://github.com/jayree/sfdx-plugin-manifest/commit/e8c848876f1371d8ee36fdeaf6c738c7e009b0ac))
|
8
|
+
* **deps:** bump @salesforce/kit from 1.5.45 to 1.6.0 ([712f64b](https://github.com/jayree/sfdx-plugin-manifest/commit/712f64ba1dc7f858419072ab0933428936e37856))
|
9
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 6.3.0 to 6.5.0 ([9c5ce03](https://github.com/jayree/sfdx-plugin-manifest/commit/9c5ce030017497b89e13301af86ce427d807dd21))
|
10
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 6.5.0 to 6.7.0 ([95f721e](https://github.com/jayree/sfdx-plugin-manifest/commit/95f721e3f834408fd1b85b7354e065bb3d0d528c))
|
11
|
+
* **deps:** bump isomorphic-git from 1.19.1 to 1.21.0 ([9eae30d](https://github.com/jayree/sfdx-plugin-manifest/commit/9eae30d028bce8e3ea70ada4d9c4a1c7f9402a05))
|
12
|
+
* **deps:** bump listr2 from 5.0.2 to 5.0.5 ([7462e79](https://github.com/jayree/sfdx-plugin-manifest/commit/7462e79356ea670a8848c89e7fc5e4bec34a0058))
|
13
|
+
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* move to ESM ([6eb55f1](https://github.com/jayree/sfdx-plugin-manifest/commit/6eb55f18522515ca0a20fae00824bd8d8a7b3818))
|
18
|
+
|
19
|
+
## [2.2.10](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.2.9...v2.2.10) (2022-08-11)
|
20
|
+
|
21
|
+
|
22
|
+
### Bug Fixes
|
23
|
+
|
24
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 6.2.9 to 6.3.0 ([5d52aff](https://github.com/jayree/sfdx-plugin-manifest/commit/5d52aff21ebcfecc0ae176d8235e212eba71c62a))
|
25
|
+
|
26
|
+
## [2.2.9](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.2.8...v2.2.9) (2022-08-10)
|
27
|
+
|
28
|
+
|
29
|
+
### Bug Fixes
|
30
|
+
|
31
|
+
* **deps:** bump @oclif/core from 1.13.0 to 1.13.10 ([22b579e](https://github.com/jayree/sfdx-plugin-manifest/commit/22b579e242ba6ee240f851dfb519ca6f7f71bd8f))
|
32
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 6.2.6 to 6.2.9 ([8d0c93d](https://github.com/jayree/sfdx-plugin-manifest/commit/8d0c93daa2f177f51970f838e116d209f492826f))
|
33
|
+
* **deps:** bump listr2 from 5.0.1 to 5.0.2 ([d00b56d](https://github.com/jayree/sfdx-plugin-manifest/commit/d00b56d7b3c49fa78589f83665a2a31197dc8230))
|
34
|
+
* remove datamappingobjectdefinition ([95c1e02](https://github.com/jayree/sfdx-plugin-manifest/commit/95c1e026209b0eeb60b9ebd802f8a278f45a3139))
|
35
|
+
|
1
36
|
## [2.2.8](https://github.com/jayree/sfdx-plugin-manifest/compare/v2.2.7...v2.2.8) (2022-08-02)
|
2
37
|
|
3
38
|
|
package/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2022, jayree
|
2
2
|
All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
9
9
|
|
10
10
|
* Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
11
11
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
@@ -22,7 +22,7 @@ $ sfdx plugins:install @jayree/sfdx-plugin-manifest
|
|
22
22
|
$ sfdx jayree:[COMMAND]
|
23
23
|
running command...
|
24
24
|
$ sfdx plugins
|
25
|
-
@jayree/sfdx-plugin-manifest 2.
|
25
|
+
@jayree/sfdx-plugin-manifest 2.3.0
|
26
26
|
$ sfdx help jayree:[COMMAND]
|
27
27
|
USAGE
|
28
28
|
$ sfdx jayree:COMMAND
|
@@ -65,7 +65,7 @@ EXAMPLES
|
|
65
65
|
$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml
|
66
66
|
```
|
67
67
|
|
68
|
-
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.
|
68
|
+
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.3.0/src/commands/jayree/manifest/cleanup.ts)_
|
69
69
|
|
70
70
|
### `sfdx jayree:manifest:generate`
|
71
71
|
|
@@ -109,7 +109,7 @@ EXAMPLES
|
|
109
109
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
110
110
|
```
|
111
111
|
|
112
|
-
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.
|
112
|
+
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.3.0/src/commands/jayree/manifest/generate.ts)_
|
113
113
|
|
114
114
|
### `sfdx jayree:manifest:git:diff`
|
115
115
|
|
@@ -163,5 +163,5 @@ EXAMPLES
|
|
163
163
|
uses the diff of what is unique in branchB (REF2)
|
164
164
|
```
|
165
165
|
|
166
|
-
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.
|
166
|
+
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v2.3.0/src/commands/jayree/manifest/git/diff.ts)_
|
167
167
|
<!-- commandsstop -->
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FlagsConfig } from '@salesforce/command';
|
2
2
|
import { AnyJson } from '@salesforce/ts-types';
|
3
|
-
import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand';
|
3
|
+
import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand.js';
|
4
4
|
export default class CleanupManifest extends JayreeSfdxCommand {
|
5
5
|
static description: string;
|
6
6
|
static examples: string[];
|
@@ -1,20 +1,18 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
/*
|
4
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) 2022, jayree
|
5
3
|
* All rights reserved.
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
8
6
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
const messages =
|
17
|
-
class CleanupManifest extends
|
7
|
+
import os from 'os';
|
8
|
+
import { flags } from '@salesforce/command';
|
9
|
+
import { Messages } from '@salesforce/core';
|
10
|
+
import fs from 'fs-extra';
|
11
|
+
import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand.js';
|
12
|
+
import { cleanupManifestFile } from '../../../utils/manifest.js';
|
13
|
+
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
14
|
+
const messages = Messages.loadMessages('@jayree/sfdx-plugin-manifest', 'manifestcleanup');
|
15
|
+
export default class CleanupManifest extends JayreeSfdxCommand {
|
18
16
|
async run() {
|
19
17
|
const file = this.getFlag('file');
|
20
18
|
if (!(await fs.pathExists(file))) {
|
@@ -50,20 +48,19 @@ class CleanupManifest extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
50
48
|
this.ux.log(`Cleanup manifest file template '${file}' was created`);
|
51
49
|
}
|
52
50
|
else {
|
53
|
-
await
|
51
|
+
await cleanupManifestFile(this.getFlag('manifest'), file);
|
54
52
|
}
|
55
53
|
return {};
|
56
54
|
}
|
57
55
|
}
|
58
|
-
exports.default = CleanupManifest;
|
59
56
|
CleanupManifest.description = messages.getMessage('commandDescription');
|
60
57
|
CleanupManifest.examples = messages.getMessage('examples').split(os.EOL);
|
61
58
|
CleanupManifest.flagsConfig = {
|
62
|
-
manifest:
|
59
|
+
manifest: flags.filepath({
|
63
60
|
char: 'x',
|
64
61
|
description: messages.getMessage('manifestFlagDescription'),
|
65
62
|
}),
|
66
|
-
file:
|
63
|
+
file: flags.filepath({
|
67
64
|
char: 'f',
|
68
65
|
description: messages.getMessage('fileFlagDescription'),
|
69
66
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../../src/commands/jayree/manifest/cleanup.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../../src/commands/jayree/manifest/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,KAAK,EAAe,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,iBAAiB,CAAC,CAAC;AAE1F,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,iBAAiB;IAoBrD,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAS,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE;YAChC,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,EAAE,CAAC,SAAS,CAChB,IAAI,EACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BP,CACM,CAAC;YACF,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,mCAAmC,IAAI,eAAe,CAAC,CAAC;SACrE;aAAM;YACL,MAAM,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAS,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;SACnE;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;;AA3Da,2BAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,wBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAEtD,2BAAW,GAAgB;IAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QACvB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;KAC5D,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACxD,CAAC;CACH,CAAC;AAEe,gCAAgB,GAAG,KAAK,CAAC;AACzB,sCAAsB,GAAG,KAAK,CAAC;AAC/B,+BAAe,GAAG,IAAI,CAAC"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { FlagsConfig } from '@salesforce/command';
|
2
|
-
import { FileProperties, ListMetadataQuery } from '@salesforce/source-deploy-retrieve/lib/src/client/types';
|
2
|
+
import { FileProperties, ListMetadataQuery } from '@salesforce/source-deploy-retrieve/lib/src/client/types.js';
|
3
3
|
import { Connection } from '@salesforce/core';
|
4
4
|
import { PackageManifestObject } from '@salesforce/source-deploy-retrieve';
|
5
|
-
import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand';
|
5
|
+
import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand.js';
|
6
6
|
export interface QueryResult {
|
7
7
|
size: number;
|
8
8
|
totalSize: number;
|
@@ -1,22 +1,20 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
/*
|
4
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) 2022, jayree
|
5
3
|
* All rights reserved.
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
8
6
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
const registryAccess = new
|
17
|
-
|
18
|
-
const messages =
|
19
|
-
class GeneratePackageXML extends
|
7
|
+
import os from 'os';
|
8
|
+
import { flags } from '@salesforce/command';
|
9
|
+
import { Messages } from '@salesforce/core';
|
10
|
+
import { RegistryAccess, ComponentSet } from '@salesforce/source-deploy-retrieve';
|
11
|
+
import { ensureArray } from '@salesforce/kit';
|
12
|
+
import fs from 'fs-extra';
|
13
|
+
import { JayreeSfdxCommand } from '../../../jayreeSfdxCommand.js';
|
14
|
+
const registryAccess = new RegistryAccess();
|
15
|
+
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
16
|
+
const messages = Messages.loadMessages('@jayree/sfdx-plugin-manifest', 'manifestgenerate');
|
17
|
+
export default class GeneratePackageXML extends JayreeSfdxCommand {
|
20
18
|
// eslint-disable-next-line complexity
|
21
19
|
async run() {
|
22
20
|
await this.org.refreshAuth();
|
@@ -33,7 +31,7 @@ class GeneratePackageXML extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
33
31
|
((component.namespacePrefix &&
|
34
32
|
(all.includes(component.manageableState) || component.manageableState === undefined)) ||
|
35
33
|
all.includes(component.manageableState))));
|
36
|
-
let componentSet = await
|
34
|
+
let componentSet = await ComponentSet.fromConnection({
|
37
35
|
usernameOrConnection: this.cacheConnection,
|
38
36
|
componentFilter,
|
39
37
|
});
|
@@ -98,7 +96,7 @@ class GeneratePackageXML extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
98
96
|
if (!apiVersion) {
|
99
97
|
apiVersion = this.cacheConnection.getApiVersion();
|
100
98
|
}
|
101
|
-
members = (
|
99
|
+
members = ensureArray((await this.cacheConnection.metadata.list(query, apiVersion)));
|
102
100
|
}
|
103
101
|
catch (error) {
|
104
102
|
members = [];
|
@@ -107,35 +105,34 @@ class GeneratePackageXML extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
107
105
|
return members;
|
108
106
|
}
|
109
107
|
}
|
110
|
-
exports.default = GeneratePackageXML;
|
111
108
|
GeneratePackageXML.description = messages.getMessage('commandDescription');
|
112
109
|
GeneratePackageXML.examples = messages.getMessage('examples').split(os.EOL);
|
113
110
|
GeneratePackageXML.flagsConfig = {
|
114
|
-
quickfilter:
|
111
|
+
quickfilter: flags.array({
|
115
112
|
char: 'q',
|
116
113
|
description: messages.getMessage('quickfilterFlagDescription'),
|
117
114
|
}),
|
118
|
-
matchcase:
|
115
|
+
matchcase: flags.boolean({
|
119
116
|
char: 'c',
|
120
117
|
description: messages.getMessage('matchCaseFlagDescription'),
|
121
118
|
}),
|
122
|
-
matchwholeword:
|
119
|
+
matchwholeword: flags.boolean({
|
123
120
|
char: 'w',
|
124
121
|
description: messages.getMessage('matchWholeWordFlagDescription'),
|
125
122
|
}),
|
126
|
-
includeflowversions:
|
123
|
+
includeflowversions: flags.boolean({
|
127
124
|
description: messages.getMessage('includeflowversionsDescription'),
|
128
125
|
}),
|
129
|
-
file:
|
126
|
+
file: flags.string({
|
130
127
|
char: 'f',
|
131
128
|
description: messages.getMessage('fileFlagDescription'),
|
132
129
|
}),
|
133
|
-
excludemanaged:
|
130
|
+
excludemanaged: flags.boolean({
|
134
131
|
char: 'x',
|
135
132
|
description: messages.getMessage('excludeManagedFlagDescription'),
|
136
133
|
exclusive: ['excludeall'],
|
137
134
|
}),
|
138
|
-
excludeall:
|
135
|
+
excludeall: flags.boolean({
|
139
136
|
char: 'a',
|
140
137
|
description: messages.getMessage('excludeAllFlagDescription'),
|
141
138
|
exclusive: ['excludemanaged'],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/commands/jayree/manifest/generate.ts"],"names":[],"mappings":"
|
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,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,CAAC;AAElE,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAE5C,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAAC;AAsB3F,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,iBAAiB;IA2C/D,sCAAsC;IAC/B,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAS,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,IAAI,IAAI,aAAa,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAEhD,MAAM,OAAO,GAAG,CAAC,MAA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AAC,UAAU,CAAC,+BAA+B,CAAC;KAClE,CAAC;IACF,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC;QACjC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC;KACnE,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACxD,CAAC;IACF,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;QACjE,SAAS,EAAE,CAAC,YAAY,CAAC;KAC1B,CAAC;IACF,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC;QACxB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QAC7D,SAAS,EAAE,CAAC,gBAAgB,CAAC;KAC9B,CAAC;CACH,CAAC;AAEe,mCAAgB,GAAG,IAAI,CAAC;AACxB,yCAAsB,GAAG,KAAK,CAAC;AAC/B,kCAAe,GAAG,KAAK,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ArgInput } from '@oclif/core/lib/interfaces';
|
2
2
|
import { FlagsConfig } from '@salesforce/command';
|
3
3
|
import { AnyJson } from '@salesforce/ts-types';
|
4
|
-
import { JayreeSfdxCommand } from '../../../../jayreeSfdxCommand';
|
4
|
+
import { JayreeSfdxCommand } from '../../../../jayreeSfdxCommand.js';
|
5
5
|
export default class GitDiff extends JayreeSfdxCommand {
|
6
6
|
static description: string;
|
7
7
|
static examples: string[];
|
@@ -1,32 +1,22 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
/*
|
4
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) 2022, jayree
|
5
3
|
* All rights reserved.
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
8
6
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
const messages =
|
21
|
-
const logger = new
|
22
|
-
// workaround until listr2 can catch emitWarnings with v4.0
|
23
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
24
|
-
const original = process.emitWarning;
|
25
|
-
process.emitWarning = (warning) => {
|
26
|
-
process.once('beforeExit', () => {
|
27
|
-
return original(warning);
|
28
|
-
});
|
29
|
-
};
|
7
|
+
import os from 'os';
|
8
|
+
import { join, dirname, relative } from 'path';
|
9
|
+
import { flags } from '@salesforce/command';
|
10
|
+
import { Messages } from '@salesforce/core';
|
11
|
+
import fs from 'fs-extra';
|
12
|
+
import { Logger, Listr } from 'listr2';
|
13
|
+
import kit from '@salesforce/kit';
|
14
|
+
import { NodeFSTreeContainer, DestructiveChangesType, } from '@salesforce/source-deploy-retrieve';
|
15
|
+
import { JayreeSfdxCommand } from '../../../../jayreeSfdxCommand.js';
|
16
|
+
import { getGitResults, createVirtualTreeContainer, fixComponentSetChilds, getGitDiff, debug, ensureOSPath, getGitArgsFromArgv, } from '../../../../utils/gitdiff.js';
|
17
|
+
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
18
|
+
const messages = Messages.loadMessages('@jayree/sfdx-plugin-manifest', 'gitdiff');
|
19
|
+
const logger = new Logger({ useIcons: false });
|
30
20
|
// eslint-disable-next-line @typescript-eslint/require-await
|
31
21
|
const unexpectedArgument = async (input) => {
|
32
22
|
if (input.includes('-')) {
|
@@ -35,25 +25,25 @@ const unexpectedArgument = async (input) => {
|
|
35
25
|
}
|
36
26
|
return input;
|
37
27
|
};
|
38
|
-
class GitDiff extends
|
28
|
+
export default class GitDiff extends JayreeSfdxCommand {
|
39
29
|
async run() {
|
40
30
|
this.destructiveChangesOnly = this.getFlag('destructivechangesonly');
|
41
31
|
this.outputDir = this.getFlag('outputdir');
|
42
32
|
this.projectRoot = this.project.getPath();
|
43
|
-
this.sfdxProjectFolders = this.project.getPackageDirectories().map((p) =>
|
33
|
+
this.sfdxProjectFolders = this.project.getPackageDirectories().map((p) => ensureOSPath(p.path));
|
44
34
|
this.sourceApiVersion = (await this.project.retrieveSfProjectJson()).getContents().sourceApiVersion;
|
45
|
-
this.destructiveChanges =
|
46
|
-
this.manifest =
|
47
|
-
|
35
|
+
this.destructiveChanges = join(this.projectRoot, this.outputDir, 'destructiveChanges.xml');
|
36
|
+
this.manifest = join(this.projectRoot, this.outputDir, 'package.xml');
|
37
|
+
debug({
|
48
38
|
outputDir: this.outputDir,
|
49
39
|
projectRoot: this.projectRoot,
|
50
40
|
sfdxProjectFolders: this.sfdxProjectFolders,
|
51
41
|
});
|
52
42
|
const isContentTypeJSON = kit.env.getString('SFDX_CONTENT_TYPE', '').toUpperCase() === 'JSON';
|
53
43
|
this.isOutputEnabled = !(process.argv.find((arg) => arg === '--json') || isContentTypeJSON);
|
54
|
-
const gitArgs = await
|
55
|
-
|
56
|
-
const tasks = new
|
44
|
+
const gitArgs = await getGitArgsFromArgv(this.args.ref1, this.args.ref2, this.argv, this.projectRoot);
|
45
|
+
debug({ gitArgs });
|
46
|
+
const tasks = new Listr([
|
57
47
|
{
|
58
48
|
title: 'Analyze sfdx-project',
|
59
49
|
task: (ctx, task) => {
|
@@ -64,7 +54,7 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
64
54
|
{
|
65
55
|
title: `Execute 'git --no-pager diff --name-status --no-renames ${gitArgs.refString}'`,
|
66
56
|
task: async (ctx, task) => {
|
67
|
-
this.gitLines = await
|
57
|
+
this.gitLines = await getGitDiff(this.sfdxProjectFolders, gitArgs.ref1, gitArgs.ref2, this.projectRoot);
|
68
58
|
task.output = `Changed files: ${this.gitLines.length}`;
|
69
59
|
},
|
70
60
|
options: { persistentOutput: true },
|
@@ -76,7 +66,7 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
76
66
|
{
|
77
67
|
title: `ref1: ${gitArgs.ref1}`,
|
78
68
|
task: async () => {
|
79
|
-
this.ref1VirtualTreeContainer = await
|
69
|
+
this.ref1VirtualTreeContainer = await createVirtualTreeContainer(gitArgs.ref1, this.projectRoot, this.gitLines.filter((l) => l.status === 'M').map((l) => l.path));
|
80
70
|
},
|
81
71
|
},
|
82
72
|
{
|
@@ -84,8 +74,8 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
84
74
|
task: async () => {
|
85
75
|
this.ref2VirtualTreeContainer =
|
86
76
|
gitArgs.ref2 !== ''
|
87
|
-
? await
|
88
|
-
: new
|
77
|
+
? await createVirtualTreeContainer(gitArgs.ref2, this.projectRoot, this.gitLines.filter((l) => l.status === 'M').map((l) => l.path))
|
78
|
+
: new NodeFSTreeContainer();
|
89
79
|
},
|
90
80
|
},
|
91
81
|
], { concurrent: true }),
|
@@ -94,11 +84,11 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
94
84
|
title: 'Analyze git diff results',
|
95
85
|
skip: () => !this.gitLines.length,
|
96
86
|
task: async (ctx, task) => {
|
97
|
-
const { manifest, output } = await
|
87
|
+
const { manifest, output } = await getGitResults(this.gitLines, this.ref1VirtualTreeContainer, this.ref2VirtualTreeContainer, this.destructiveChangesOnly);
|
98
88
|
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}` : ''}`;
|
99
89
|
this.outputErrors = output.errors;
|
100
|
-
|
101
|
-
this.componentSet =
|
90
|
+
debug({ manifest });
|
91
|
+
this.componentSet = fixComponentSetChilds(manifest);
|
102
92
|
this.componentSet.sourceApiVersion = this.sourceApiVersion;
|
103
93
|
},
|
104
94
|
options: { persistentOutput: true },
|
@@ -107,7 +97,7 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
107
97
|
// title: 'Error output',
|
108
98
|
skip: () => !this.outputErrors?.length,
|
109
99
|
task: (ctx, task) => {
|
110
|
-
|
100
|
+
debug({ errors: this.outputErrors });
|
111
101
|
const moreErrors = this.outputErrors.splice(5);
|
112
102
|
for (const message of this.outputErrors) {
|
113
103
|
task.output = `Error: ${message}`;
|
@@ -121,19 +111,19 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
121
111
|
skip: () => !this.componentSet?.size,
|
122
112
|
task: (ctx, task) => task.newListr([
|
123
113
|
{
|
124
|
-
title:
|
114
|
+
title: relative(this.projectRoot, this.manifest),
|
125
115
|
task: async () => {
|
126
|
-
await fs.ensureDir(
|
116
|
+
await fs.ensureDir(dirname(this.manifest));
|
127
117
|
await fs.writeFile(this.manifest, await this.componentSet.getPackageXml());
|
128
118
|
},
|
129
119
|
options: { persistentOutput: true },
|
130
120
|
},
|
131
121
|
{
|
132
|
-
title:
|
122
|
+
title: relative(this.projectRoot, this.destructiveChanges),
|
133
123
|
skip: () => !this.componentSet.getTypesOfDestructiveChanges().length,
|
134
124
|
task: async () => {
|
135
|
-
await fs.ensureDir(
|
136
|
-
await fs.writeFile(this.destructiveChanges, await this.componentSet.getPackageXml(undefined,
|
125
|
+
await fs.ensureDir(dirname(this.destructiveChanges));
|
126
|
+
await fs.writeFile(this.destructiveChanges, await this.componentSet.getPackageXml(undefined, DestructiveChangesType.POST));
|
137
127
|
},
|
138
128
|
options: { persistentOutput: true },
|
139
129
|
},
|
@@ -142,24 +132,23 @@ class GitDiff extends jayreeSfdxCommand_1.JayreeSfdxCommand {
|
|
142
132
|
], {
|
143
133
|
rendererOptions: { showTimer: true, collapse: false, lazy: true, collapseErrors: false },
|
144
134
|
rendererSilent: !this.isOutputEnabled,
|
145
|
-
rendererFallback:
|
135
|
+
rendererFallback: debug.enabled,
|
146
136
|
});
|
147
137
|
try {
|
148
138
|
await tasks.run();
|
149
139
|
return {
|
150
|
-
destructiveChanges: this.componentSet?.getObject(
|
140
|
+
destructiveChanges: this.componentSet?.getObject(DestructiveChangesType.POST),
|
151
141
|
manifest: this.componentSet?.getObject(),
|
152
142
|
};
|
153
143
|
}
|
154
144
|
catch (e) {
|
155
|
-
if (
|
145
|
+
if (debug.enabled && this.isOutputEnabled) {
|
156
146
|
logger.fail(e.message);
|
157
147
|
}
|
158
148
|
throw e;
|
159
149
|
}
|
160
150
|
}
|
161
151
|
}
|
162
|
-
exports.default = GitDiff;
|
163
152
|
GitDiff.description = messages.getMessage('commandDescription');
|
164
153
|
GitDiff.examples = messages.getMessage('examples').split(os.EOL);
|
165
154
|
GitDiff.args = [
|
@@ -179,12 +168,12 @@ GitDiff.args = [
|
|
179
168
|
},
|
180
169
|
];
|
181
170
|
GitDiff.flagsConfig = {
|
182
|
-
outputdir:
|
171
|
+
outputdir: flags.string({
|
183
172
|
char: 'o',
|
184
173
|
description: messages.getMessage('outputdir'),
|
185
174
|
default: '',
|
186
175
|
}),
|
187
|
-
destructivechangesonly:
|
176
|
+
destructivechangesonly: flags.boolean({
|
188
177
|
char: 'd',
|
189
178
|
description: messages.getMessage('destructivechangesonly'),
|
190
179
|
default: false,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../src/commands/jayree/manifest/git/diff.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../src/commands/jayree/manifest/git/diff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE/C,OAAO,EAAe,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM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