@jayree/sfdx-plugin-legacy 1.0.0 → 1.1.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/CHANGELOG.md +37 -0
- package/LICENSE.txt +2 -2
- package/README.md +9 -9
- package/lib/commands/jayree/automation/changeset/deploy.js +22 -29
- package/lib/commands/jayree/automation/changeset/deploy.js.map +1 -1
- package/lib/commands/jayree/automation/changeset/list.js +10 -14
- package/lib/commands/jayree/automation/changeset/list.js.map +1 -1
- package/lib/commands/jayree/automation/ltngsync/status.js +16 -17
- package/lib/commands/jayree/automation/ltngsync/status.js.map +1 -1
- package/lib/commands/jayree/packagedescription/create.js +11 -17
- package/lib/commands/jayree/packagedescription/create.js.map +1 -1
- package/lib/commands/jayree/packagedescription/get.js +10 -16
- package/lib/commands/jayree/packagedescription/get.js.map +1 -1
- package/lib/commands/jayree/packagedescription/remove.js +12 -18
- package/lib/commands/jayree/packagedescription/remove.js.map +1 -1
- package/lib/commands/jayree/packagedescription/set.js +13 -19
- package/lib/commands/jayree/packagedescription/set.js.map +1 -1
- package/lib/hooks/changelog.js +18 -46
- package/lib/hooks/changelog.js.map +1 -1
- package/lib/index.js +1 -3
- package/lib/index.js.map +1 -1
- package/lib/utils/xml.js +11 -21
- package/lib/utils/xml.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +36 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/create.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,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AG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEvB,oCAAW,GAAG;IAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;QACxB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;QAC9D,SAAS,EAAE,CAAC,MAAM,CAAC;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEe,yCAAgB,GAAG,KAAK,CAAC;AACzB,+CAAsB,GAAG,KAAK,CAAC;AAC/B,wCAAe,GAAG,KAAK,CAAC"}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
1
|
/*
|
|
7
2
|
* Copyright (c) 2021, jayree
|
|
8
3
|
* All rights reserved.
|
|
9
4
|
* Licensed under the BSD 3-Clause license.
|
|
10
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
11
6
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const messages =
|
|
18
|
-
class GetPackageDescription extends
|
|
7
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
8
|
+
import { Messages } from '@salesforce/core';
|
|
9
|
+
import AdmZip from 'adm-zip';
|
|
10
|
+
import { parseManifest } from '../../../utils/xml.js';
|
|
11
|
+
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
|
12
|
+
const messages = Messages.loadMessages('@jayree/sfdx-plugin-legacy', 'getpackagedescription');
|
|
13
|
+
export default class GetPackageDescription extends SfdxCommand {
|
|
19
14
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
20
15
|
async run() {
|
|
21
16
|
const inputfile = this.args.file || this.flags.file;
|
|
22
|
-
const zip = new
|
|
17
|
+
const zip = new AdmZip(inputfile);
|
|
23
18
|
const zipEntries = zip.getEntries();
|
|
24
19
|
let text;
|
|
25
20
|
zipEntries.forEach((zipEntry) => {
|
|
26
21
|
const fileName = zipEntry.entryName;
|
|
27
22
|
if (fileName.includes('package.xml')) {
|
|
28
23
|
const fileContent = zip.readAsText(fileName);
|
|
29
|
-
const xml =
|
|
24
|
+
const xml = parseManifest(fileContent);
|
|
30
25
|
text = xml.Package.description ? xml.Package.description.toString() : '';
|
|
31
26
|
this.ux.log(text);
|
|
32
27
|
}
|
|
@@ -34,7 +29,6 @@ class GetPackageDescription extends command_1.SfdxCommand {
|
|
|
34
29
|
return { description: text };
|
|
35
30
|
}
|
|
36
31
|
}
|
|
37
|
-
exports.default = GetPackageDescription;
|
|
38
32
|
// hotfix to receive only one help page
|
|
39
33
|
// public static hidden = true;
|
|
40
34
|
GetPackageDescription.description = messages.getMessage('commandDescription');
|
|
@@ -45,7 +39,7 @@ Description of Package FILENAME
|
|
|
45
39
|
];
|
|
46
40
|
GetPackageDescription.args = [{ name: 'file' }];
|
|
47
41
|
GetPackageDescription.flagsConfig = {
|
|
48
|
-
file:
|
|
42
|
+
file: flags.string({
|
|
49
43
|
char: 'f',
|
|
50
44
|
description: messages.getMessage('fileFlagDescription'),
|
|
51
45
|
required: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/get.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/get.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OA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;aACnB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IAC/B,CAAC;;AA3CD,uCAAuC;AACvC,+BAA+B;AAEjB,iCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,8BAAQ,GAAG;IACvB;;KAEC;CACF,CAAC;AAEY,0BAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEvB,iCAAW,GAAG;IAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEe,sCAAgB,GAAG,KAAK,CAAC;AACzB,4CAAsB,GAAG,KAAK,CAAC;AAC/B,qCAAe,GAAG,KAAK,CAAC"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
1
|
/*
|
|
7
2
|
* Copyright (c) 2021, jayree
|
|
8
3
|
* All rights reserved.
|
|
9
4
|
* Licensed under the BSD 3-Clause license.
|
|
10
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
11
6
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const messages =
|
|
18
|
-
class RemovePackageDescription extends
|
|
7
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
8
|
+
import { Messages } from '@salesforce/core';
|
|
9
|
+
import AdmZip from 'adm-zip';
|
|
10
|
+
import { js2Manifest, parseManifest } from '../../../utils/xml.js';
|
|
11
|
+
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
|
12
|
+
const messages = Messages.loadMessages('@jayree/sfdx-plugin-legacy', 'removepackagedescription');
|
|
13
|
+
export default class RemovePackageDescription extends SfdxCommand {
|
|
19
14
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
20
15
|
async run() {
|
|
21
16
|
const inputfile = this.args.file || this.flags.file;
|
|
22
|
-
const newZip = new
|
|
23
|
-
const zip = new
|
|
17
|
+
const newZip = new AdmZip();
|
|
18
|
+
const zip = new AdmZip(inputfile);
|
|
24
19
|
const zipEntries = zip.getEntries();
|
|
25
20
|
let action;
|
|
26
21
|
let text;
|
|
@@ -30,7 +25,7 @@ class RemovePackageDescription extends command_1.SfdxCommand {
|
|
|
30
25
|
if (fileName.includes('package.xml')) {
|
|
31
26
|
let fileContentjs;
|
|
32
27
|
const fileTXTContent = zip.readAsText(fileName);
|
|
33
|
-
const xml =
|
|
28
|
+
const xml = parseManifest(fileTXTContent);
|
|
34
29
|
if (xml.Package.description && xml.Package.description.length > 0) {
|
|
35
30
|
text = xml.Package.description.toString();
|
|
36
31
|
action = 'removed';
|
|
@@ -42,7 +37,7 @@ class RemovePackageDescription extends command_1.SfdxCommand {
|
|
|
42
37
|
version: xml.Package.version,
|
|
43
38
|
},
|
|
44
39
|
};
|
|
45
|
-
newZip.addFile(fileName, Buffer.from(
|
|
40
|
+
newZip.addFile(fileName, Buffer.from(js2Manifest(fileContentjs)), '', 0o644);
|
|
46
41
|
}
|
|
47
42
|
else {
|
|
48
43
|
action = '';
|
|
@@ -60,7 +55,6 @@ class RemovePackageDescription extends command_1.SfdxCommand {
|
|
|
60
55
|
return { old_description: text, task: action };
|
|
61
56
|
}
|
|
62
57
|
}
|
|
63
|
-
exports.default = RemovePackageDescription;
|
|
64
58
|
// hotfix to receive only one help page
|
|
65
59
|
// public static hidden = true;
|
|
66
60
|
RemovePackageDescription.description = messages.getMessage('commandDescription');
|
|
@@ -70,7 +64,7 @@ RemovePackageDescription.examples = [
|
|
|
70
64
|
];
|
|
71
65
|
RemovePackageDescription.args = [{ name: 'file' }];
|
|
72
66
|
RemovePackageDescription.flagsConfig = {
|
|
73
|
-
file:
|
|
67
|
+
file: flags.string({
|
|
74
68
|
char: 'f',
|
|
75
69
|
description: messages.getMessage('fileFlagDescription'),
|
|
76
70
|
required: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/remove.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/remove.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnE,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,CAAC;AAEjG,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,WAAW;IAyB/D,4DAA4D;IACrD,KAAK,CAAC,GAAG;QACd,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACpD,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QAE5B,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;QAClC,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QAEpC,IAAI,MAAM,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AW,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;aAClD;QACH,CAAC,CAAC,CAAC;QACH,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;SAC5B;QAED,qCAAqC;QACrC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACjD,CAAC;;AAnED,uCAAuC;AACvC,+BAA+B;AAEjB,oCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,iCAAQ,GAAG;IACvB;KACC;CACF,CAAC;AAEY,6BAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEvB,oCAAW,GAAG;IAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEe,yCAAgB,GAAG,KAAK,CAAC;AACzB,+CAAsB,GAAG,KAAK,CAAC;AAC/B,wCAAe,GAAG,KAAK,CAAC"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
1
|
/*
|
|
7
2
|
* Copyright (c) 2021, jayree
|
|
8
3
|
* All rights reserved.
|
|
9
4
|
* Licensed under the BSD 3-Clause license.
|
|
10
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
11
6
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const messages =
|
|
18
|
-
class SetPackageDescription extends
|
|
7
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
8
|
+
import { Messages } from '@salesforce/core';
|
|
9
|
+
import AdmZip from 'adm-zip';
|
|
10
|
+
import { js2Manifest, parseManifest } from '../../../utils/xml.js';
|
|
11
|
+
Messages.importMessagesDirectory(new URL('./', import.meta.url).pathname);
|
|
12
|
+
const messages = Messages.loadMessages('@jayree/sfdx-plugin-legacy', 'setpackagedescription');
|
|
13
|
+
export default class SetPackageDescription extends SfdxCommand {
|
|
19
14
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
20
15
|
async run() {
|
|
21
16
|
const inputfile = this.args.file || this.flags.file;
|
|
22
|
-
const newZip = new
|
|
23
|
-
const zip = new
|
|
17
|
+
const newZip = new AdmZip();
|
|
18
|
+
const zip = new AdmZip(inputfile);
|
|
24
19
|
const zipEntries = zip.getEntries();
|
|
25
20
|
const text = this.flags.description.replace(/\\n/g, '\n');
|
|
26
21
|
let action;
|
|
@@ -29,7 +24,7 @@ class SetPackageDescription extends command_1.SfdxCommand {
|
|
|
29
24
|
const fileContent = zip.readFile(fileName);
|
|
30
25
|
if (fileName.includes('package.xml')) {
|
|
31
26
|
const fileTXTContent = zip.readAsText(fileName);
|
|
32
|
-
const xml =
|
|
27
|
+
const xml = parseManifest(fileTXTContent);
|
|
33
28
|
if (xml.Package.description && xml.Package.description.length > 0) {
|
|
34
29
|
action = 'updated';
|
|
35
30
|
}
|
|
@@ -38,7 +33,7 @@ class SetPackageDescription extends command_1.SfdxCommand {
|
|
|
38
33
|
}
|
|
39
34
|
xml.Package['description'] = text;
|
|
40
35
|
this.ux.log(action + ' description: ' + text);
|
|
41
|
-
newZip.addFile(fileName, Buffer.from(
|
|
36
|
+
newZip.addFile(fileName, Buffer.from(js2Manifest({ Package: xml.Package })), '', 0o644);
|
|
42
37
|
}
|
|
43
38
|
else {
|
|
44
39
|
newZip.addFile(fileName, fileContent, '', 0o644);
|
|
@@ -48,7 +43,6 @@ class SetPackageDescription extends command_1.SfdxCommand {
|
|
|
48
43
|
return { description: text, task: action };
|
|
49
44
|
}
|
|
50
45
|
}
|
|
51
|
-
exports.default = SetPackageDescription;
|
|
52
46
|
// hotfix to receive only one help page
|
|
53
47
|
// public static hidden = true;
|
|
54
48
|
SetPackageDescription.description = messages.getMessage('commandDescription');
|
|
@@ -58,12 +52,12 @@ SetPackageDescription.examples = [
|
|
|
58
52
|
];
|
|
59
53
|
SetPackageDescription.args = [{ name: 'file' }];
|
|
60
54
|
SetPackageDescription.flagsConfig = {
|
|
61
|
-
file:
|
|
55
|
+
file: flags.string({
|
|
62
56
|
char: 'f',
|
|
63
57
|
description: messages.getMessage('fileFlagDescription'),
|
|
64
58
|
required: true,
|
|
65
59
|
}),
|
|
66
|
-
description:
|
|
60
|
+
description: flags.string({
|
|
67
61
|
char: 'd',
|
|
68
62
|
description: messages.getMessage('descriptionFlagDescription'),
|
|
69
63
|
dependsOn: ['file'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/set.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/jayree/packagedescription/set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnE,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,uBAAuB,CAAC,CAAC;AAE9F,MAAM,CA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,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;aACzF;iBAAM;gBACL,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;aAClD;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE3B,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC7C,CAAC;;AA9DD,uCAAuC;AACvC,+BAA+B;AAEjB,iCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,8BAAQ,GAAG;IACvB;KACC;CACF,CAAC;AAEY,0BAAI,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAEvB,iCAAW,GAAG;IAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;QACxB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;QAC9D,SAAS,EAAE,CAAC,MAAM,CAAC;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;AAEe,sCAAgB,GAAG,KAAK,CAAC;AACzB,4CAAsB,GAAG,KAAK,CAAC;AAC/B,qCAAe,GAAG,KAAK,CAAC"}
|
package/lib/hooks/changelog.js
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.changelog = void 0;
|
|
27
1
|
/*
|
|
28
2
|
* Copyright (c) 2021, jayree
|
|
29
3
|
* All rights reserved.
|
|
@@ -31,20 +5,19 @@ exports.changelog = void 0;
|
|
|
31
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
32
6
|
*/
|
|
33
7
|
/* istanbul ignore file */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
const debug = (0, debug_1.debug)('jayree:hooks');
|
|
8
|
+
import { join } from 'path';
|
|
9
|
+
import fs from 'fs-extra';
|
|
10
|
+
import Debug from 'debug';
|
|
11
|
+
import TerminalRenderer from 'marked-terminal';
|
|
12
|
+
import { marked } from 'marked';
|
|
13
|
+
import semver from 'semver';
|
|
14
|
+
const debug = Debug('jayree:hooks');
|
|
42
15
|
// original from https://github.com/salesforcecli/plugin-info/blob/main/src/shared/parseReleaseNotes.ts
|
|
43
16
|
const parseReleaseNotes = (notes, version) => {
|
|
44
17
|
let found = false;
|
|
45
18
|
let closestVersion;
|
|
46
19
|
let versions;
|
|
47
|
-
const parsed =
|
|
20
|
+
const parsed = marked.lexer(notes);
|
|
48
21
|
let tokens;
|
|
49
22
|
const findVersion = (desiredVersion) => {
|
|
50
23
|
versions = [];
|
|
@@ -73,20 +46,20 @@ const parseReleaseNotes = (notes, version) => {
|
|
|
73
46
|
findVersion(closestVersion);
|
|
74
47
|
}
|
|
75
48
|
if (closestVersion !== undefined) {
|
|
76
|
-
const warning =
|
|
49
|
+
const warning = marked.lexer(`# ATTENTION: Version ${version} was not found. Showing notes for closest patch version ${closestVersion}.`)[0];
|
|
77
50
|
tokens.unshift(warning);
|
|
78
51
|
}
|
|
79
52
|
return tokens;
|
|
80
53
|
};
|
|
81
54
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
82
|
-
const changelog = async function () {
|
|
55
|
+
export const changelog = async function () {
|
|
83
56
|
process.once('exit', () => {
|
|
84
57
|
try {
|
|
85
|
-
const pluginRootPath = (
|
|
86
|
-
const { name, version } = fs.readJsonSync(
|
|
87
|
-
const changelogFile = fs.readFileSync(
|
|
88
|
-
const cacheDir =
|
|
89
|
-
const versionFile =
|
|
58
|
+
const pluginRootPath = join(new URL('./', import.meta.url).pathname, '..', '..');
|
|
59
|
+
const { name, version } = fs.readJsonSync(join(pluginRootPath, 'package.json'));
|
|
60
|
+
const changelogFile = fs.readFileSync(join(pluginRootPath, 'CHANGELOG.md'), 'utf8');
|
|
61
|
+
const cacheDir = join(this.config.cacheDir, name);
|
|
62
|
+
const versionFile = join(cacheDir, 'version');
|
|
90
63
|
fs.ensureFileSync(versionFile);
|
|
91
64
|
let latestVersion;
|
|
92
65
|
try {
|
|
@@ -102,11 +75,11 @@ const changelog = async function () {
|
|
|
102
75
|
debug(`${name} - didn't find version '${version}'.`);
|
|
103
76
|
}
|
|
104
77
|
else {
|
|
105
|
-
|
|
78
|
+
marked.setOptions({
|
|
106
79
|
renderer: new TerminalRenderer({ emoji: false }),
|
|
107
80
|
});
|
|
108
|
-
tokens.unshift(
|
|
109
|
-
|
|
81
|
+
tokens.unshift(marked.lexer(`# Changelog for '${name}':`)[0]);
|
|
82
|
+
this.log(marked.parser(tokens));
|
|
110
83
|
fs.writeJsonSync(versionFile, { version });
|
|
111
84
|
}
|
|
112
85
|
}
|
|
@@ -119,5 +92,4 @@ const changelog = async function () {
|
|
|
119
92
|
}
|
|
120
93
|
});
|
|
121
94
|
};
|
|
122
|
-
exports.changelog = changelog;
|
|
123
95
|
//# sourceMappingURL=changelog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0BAA0B;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAEpC,uGAAuG;AACvG,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,OAAe,EAAkB,EAAE;IAC3E,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,cAAsB,CAAC;IAC3B,IAAI,QAAkB,CAAC;IAEvB,MAAM,M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KAAK,CAAC,GAAG,IAAI,2BAA2B,OAAO,IAAI,CAAC,CAAC;iBACtD;qBAAM;oBACL,MAAM,CAAC,UAAU,CAAC;wBAChB,QAAQ,EAAE,IAAI,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;qBACjD,CAAC,CAAC;oBACH,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;oBAChC,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;iBAC5C;aACF;iBAAM;gBACL,KAAK,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC;aAC9B;SACF;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC,KAAK,CAAC,CAAC;SACd;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
2
|
* Copyright (c) 2021, 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
|
-
|
|
7
|
+
export default {};
|
|
10
8
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAe,EAAE,CAAC"}
|
package/lib/utils/xml.js
CHANGED
|
@@ -1,50 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeToArray = exports.parseSourceComponent = exports.js2SourceComponent = exports.js2Manifest = exports.parseManifest = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2021, jayree
|
|
6
3
|
* All rights reserved.
|
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
function parseManifest(xmlData) {
|
|
15
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
7
|
+
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
8
|
+
import { XML_DECL, XML_NS_KEY, XML_NS_URL } from '@salesforce/source-deploy-retrieve/lib/src/common/index.js';
|
|
9
|
+
export function parseManifest(xmlData) {
|
|
10
|
+
const parser = new XMLParser({
|
|
16
11
|
stopNodes: ['version'],
|
|
17
12
|
parseTagValue: false,
|
|
18
13
|
});
|
|
19
14
|
return parser.parse(xmlData);
|
|
20
15
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const js2Xml = new fast_xml_parser_1.XMLBuilder({ format: true, indentBy: ' ', ignoreAttributes: false });
|
|
16
|
+
export function js2Manifest(jsData) {
|
|
17
|
+
const js2Xml = new XMLBuilder({ format: true, indentBy: ' ', ignoreAttributes: false });
|
|
24
18
|
jsData.Package[XML_NS_KEY] = XML_NS_URL;
|
|
25
19
|
return XML_DECL.concat(js2Xml.build(jsData));
|
|
26
20
|
}
|
|
27
|
-
exports.js2Manifest = js2Manifest;
|
|
28
21
|
const XML_DECL_KEY = '?xml';
|
|
29
|
-
function js2SourceComponent(jsData) {
|
|
30
|
-
const js2Xml = new
|
|
22
|
+
export function js2SourceComponent(jsData) {
|
|
23
|
+
const js2Xml = new XMLBuilder({ format: true, indentBy: ' ', ignoreAttributes: false });
|
|
31
24
|
delete jsData[XML_DECL_KEY];
|
|
32
25
|
return XML_DECL.concat(js2Xml.build(jsData));
|
|
33
26
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
27
|
+
export function parseSourceComponent(xmlData) {
|
|
28
|
+
const parser = new XMLParser({
|
|
37
29
|
ignoreAttributes: false,
|
|
38
30
|
parseTagValue: false,
|
|
39
31
|
});
|
|
40
32
|
return parser.parse(xmlData);
|
|
41
33
|
}
|
|
42
|
-
|
|
43
|
-
function normalizeToArray(entryOrArray) {
|
|
34
|
+
export function normalizeToArray(entryOrArray) {
|
|
44
35
|
if (entryOrArray) {
|
|
45
36
|
return Array.isArray(entryOrArray) ? entryOrArray : [entryOrArray];
|
|
46
37
|
}
|
|
47
38
|
return [];
|
|
48
39
|
}
|
|
49
|
-
exports.normalizeToArray = normalizeToArray;
|
|
50
40
|
//# sourceMappingURL=xml.js.map
|
package/lib/utils/xml.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/utils/xml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/utils/xml.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,4DAA4D,CAAC;AAE9G,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,SAAS,EAAE,CAAC,SAAS,CAAC;QACtB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC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":"creates an empty package with the description","strict":true,"usage":"<%= command.id %> (-d <string> -f <string>) [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:create --file FILENAME --description 'DESCRIPTION'\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to create","required":true,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"new description value","required":true,"multiple":false,"dependsOn":["file"]}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to create","required":true,"input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","description":"new description value","dependsOn":["file"],"required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:packagedescription:get":{"id":"jayree:packagedescription:get","description":"get the description within a package","strict":true,"usage":"<%= command.id %> -f <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:get --file FILENAME\nDescription of Package FILENAME\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to read","required":true,"multiple":false}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to read","required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:packagedescription:remove":{"id":"jayree:packagedescription:remove","description":"remove the description within a package","strict":true,"usage":"<%= command.id %> -f <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:remove --file FILENAME\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to read","required":true,"multiple":false}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to read","required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:packagedescription:set":{"id":"jayree:packagedescription:set","description":"set the description within a package","strict":true,"usage":"<%= command.id %> (-d <string> -f <string>) [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:set --file FILENAME --description 'NEW DESCRIPTION'\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to read","required":true,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"new description value","required":true,"multiple":false,"dependsOn":["file"]}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to read","required":true,"input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","description":"new description value","dependsOn":["file"],"required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:automation:changeset:deploy":{"id":"jayree:automation:changeset:deploy","description":"deploy incomming change set to an org (beta)","strict":true,"usage":"<%= command.id %> [-r <string> -l <string>] [-c] [--nodialog -s <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:automation:changeset:deploy -s ChangeSet -l RunLocalTests --nodialog\nDeploying Change Set 'ChangeSet'...\n\n=== Status\nStatus: Pending\njobid: 0Xxx100000xx1x1\n","$ sfdx jayree:automation:changeset:deploy\n? Change Sets Awaiting Deployment (Use arrow keys)\n ChangeSet3\n ChangeSet2\n❯ ChangeSet1\n"],"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)","multiple":false,"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","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"changeset":{"name":"changeset","type":"option","char":"s","description":"name of changeset to deploy","required":false,"multiple":false},"runtests":{"name":"runtests","type":"option","char":"r","description":"tests to run if --testlevel RunSpecifiedTests","required":false,"multiple":false,"dependsOn":["testlevel"]},"testlevel":{"name":"testlevel","type":"option","char":"l","description":"deployment testing level (Default,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)","required":false,"multiple":false,"options":["Default","RunSpecifiedTests","RunLocalTests","RunAllTestsInOrg"]},"checkonly":{"name":"checkonly","type":"boolean","char":"c","description":"validate deploy but don’t save to the org (default:false)","required":false,"allowNo":false},"nodialog":{"name":"nodialog","type":"boolean","description":"don't show the dialog wizard","required":false,"allowNo":false,"dependsOn":["changeset"]}},"args":[],"flagsConfig":{"changeset":{"kind":"string","char":"s","description":"name of changeset to deploy","required":false,"input":[],"multiple":false,"type":"option"},"runtests":{"kind":"string","char":"r","description":"tests to run if --testlevel RunSpecifiedTests","required":false,"dependsOn":["testlevel"],"input":[],"multiple":false,"type":"option"},"testlevel":{"kind":"string","char":"l","description":"deployment testing level (Default,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)","required":false,"options":["Default","RunSpecifiedTests","RunLocalTests","RunAllTestsInOrg"],"input":[],"multiple":false,"type":"option"},"checkonly":{"kind":"boolean","char":"c","description":"validate deploy but don’t save to the org (default:false)","required":false,"allowNo":false,"type":"boolean"},"nodialog":{"kind":"boolean","description":"don't show the dialog wizard","required":false,"dependsOn":["changeset"],"allowNo":false,"type":"boolean"}},"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false},"jayree:automation:changeset:list":{"id":"jayree:automation:changeset:list","description":"list incomming change sets of an org (beta)","strict":true,"usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"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)","multiple":false,"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","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false},"jayree:automation:ltngsync:status":{"id":"jayree:automation:ltngsync:status","description":"check the Lightning Sync User Sync Status and reset sync if needed (beta)","strict":true,"usage":"<%= command.id %> -o <string> [-s] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:automation:ltngsync:status -o 'Name'\nconfigSetup: User assigned to active Lightning Sync configuration... Yes\nuserContacts/userEvents: Salesforce and Exchange email addresses linked... Linked/Linked\nuserContacts/userEvents: Salesforce to Exchange sync status... Initial sync completed/Initial sync completed\nuserContacts/userEvents: Exchange to Salesforce sync status... Initial sync completed/Initial sync completed\n"],"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)","multiple":false,"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","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"officeuser":{"name":"officeuser","type":"option","char":"o","description":"'name' (firstname lastname) of the SF user","required":true,"multiple":false},"statusonly":{"name":"statusonly","type":"boolean","char":"s","description":"get Lightning Sync status of the SF user, only","required":false,"allowNo":false},"wait":{"name":"wait","type":"option","char":"w","description":"wait time for command to wait for status change in minutes (default: infinitely)","required":false,"multiple":false}},"args":[],"flagsConfig":{"officeuser":{"kind":"string","char":"o","description":"'name' (firstname lastname) of the SF user","required":true,"input":[],"multiple":false,"type":"option"},"statusonly":{"kind":"boolean","char":"s","description":"get Lightning Sync status of the SF user, only","required":false,"allowNo":false,"type":"boolean"},"wait":{"kind":"integer","char":"w","description":"wait time for command to wait for status change in minutes (default: infinitely)","required":false,"input":[],"multiple":false,"type":"option"}},"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false}}}
|
|
1
|
+
{"version":"1.1.0","commands":{"jayree:packagedescription:create":{"id":"jayree:packagedescription:create","description":"creates an empty package with the description","strict":true,"usage":"<%= command.id %> (-d <string> -f <string>) [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:create --file FILENAME --description 'DESCRIPTION'\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to create","required":true,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"new description value","required":true,"multiple":false,"dependsOn":["file"]}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to create","required":true,"input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","description":"new description value","dependsOn":["file"],"required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:packagedescription:get":{"id":"jayree:packagedescription:get","description":"get the description within a package","strict":true,"usage":"<%= command.id %> -f <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:get --file FILENAME\nDescription of Package FILENAME\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to read","required":true,"multiple":false}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to read","required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:packagedescription:remove":{"id":"jayree:packagedescription:remove","description":"remove the description within a package","strict":true,"usage":"<%= command.id %> -f <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:remove --file FILENAME\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to read","required":true,"multiple":false}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to read","required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:packagedescription:set":{"id":"jayree:packagedescription:set","description":"set the description within a package","strict":true,"usage":"<%= command.id %> (-d <string> -f <string>) [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:packagedescription:set --file FILENAME --description 'NEW DESCRIPTION'\n "],"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)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"file":{"name":"file","type":"option","char":"f","description":"file to read","required":true,"multiple":false},"description":{"name":"description","type":"option","char":"d","description":"new description value","required":true,"multiple":false,"dependsOn":["file"]}},"args":[{"name":"file"}],"flagsConfig":{"file":{"kind":"string","char":"f","description":"file to read","required":true,"input":[],"multiple":false,"type":"option"},"description":{"kind":"string","char":"d","description":"new description value","dependsOn":["file"],"required":true,"input":[],"multiple":false,"type":"option"}},"requiresUsername":false,"supportsDevhubUsername":false,"requiresProject":false},"jayree:automation:changeset:deploy":{"id":"jayree:automation:changeset:deploy","description":"deploy incomming change set to an org (beta)","strict":true,"usage":"<%= command.id %> [-r <string> -l <string>] [-c] [--nodialog -s <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:automation:changeset:deploy -s ChangeSet -l RunLocalTests --nodialog\nDeploying Change Set 'ChangeSet'...\n\n=== Status\nStatus: Pending\njobid: 0Xxx100000xx1x1\n","$ sfdx jayree:automation:changeset:deploy\n? Change Sets Awaiting Deployment (Use arrow keys)\n ChangeSet3\n ChangeSet2\n❯ ChangeSet1\n"],"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)","multiple":false,"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","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"changeset":{"name":"changeset","type":"option","char":"s","description":"name of changeset to deploy","required":false,"multiple":false},"runtests":{"name":"runtests","type":"option","char":"r","description":"tests to run if --testlevel RunSpecifiedTests","required":false,"multiple":false,"dependsOn":["testlevel"]},"testlevel":{"name":"testlevel","type":"option","char":"l","description":"deployment testing level (Default,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)","required":false,"multiple":false,"options":["Default","RunSpecifiedTests","RunLocalTests","RunAllTestsInOrg"]},"checkonly":{"name":"checkonly","type":"boolean","char":"c","description":"validate deploy but don’t save to the org (default:false)","required":false,"allowNo":false},"nodialog":{"name":"nodialog","type":"boolean","description":"don't show the dialog wizard","required":false,"allowNo":false,"dependsOn":["changeset"]}},"args":[],"flagsConfig":{"changeset":{"kind":"string","char":"s","description":"name of changeset to deploy","required":false,"input":[],"multiple":false,"type":"option"},"runtests":{"kind":"string","char":"r","description":"tests to run if --testlevel RunSpecifiedTests","required":false,"dependsOn":["testlevel"],"input":[],"multiple":false,"type":"option"},"testlevel":{"kind":"string","char":"l","description":"deployment testing level (Default,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)","required":false,"options":["Default","RunSpecifiedTests","RunLocalTests","RunAllTestsInOrg"],"input":[],"multiple":false,"type":"option"},"checkonly":{"kind":"boolean","char":"c","description":"validate deploy but don’t save to the org (default:false)","required":false,"allowNo":false,"type":"boolean"},"nodialog":{"kind":"boolean","description":"don't show the dialog wizard","required":false,"dependsOn":["changeset"],"allowNo":false,"type":"boolean"}},"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false},"jayree:automation:changeset:list":{"id":"jayree:automation:changeset:list","description":"list incomming change sets of an org (beta)","strict":true,"usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"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)","multiple":false,"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","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false},"jayree:automation:ltngsync:status":{"id":"jayree:automation:ltngsync:status","description":"check the Lightning Sync User Sync Status and reset sync if needed (beta)","strict":true,"usage":"<%= command.id %> -o <string> [-s] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@jayree/sfdx-plugin-legacy","pluginAlias":"@jayree/sfdx-plugin-legacy","pluginType":"core","aliases":[],"examples":["$ sfdx jayree:automation:ltngsync:status -o 'Name'\nconfigSetup: User assigned to active Lightning Sync configuration... Yes\nuserContacts/userEvents: Salesforce and Exchange email addresses linked... Linked/Linked\nuserContacts/userEvents: Salesforce to Exchange sync status... Initial sync completed/Initial sync completed\nuserContacts/userEvents: Exchange to Salesforce sync status... Initial sync completed/Initial sync completed\n"],"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)","multiple":false,"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","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"officeuser":{"name":"officeuser","type":"option","char":"o","description":"'name' (firstname lastname) of the SF user","required":true,"multiple":false},"statusonly":{"name":"statusonly","type":"boolean","char":"s","description":"get Lightning Sync status of the SF user, only","required":false,"allowNo":false},"wait":{"name":"wait","type":"option","char":"w","description":"wait time for command to wait for status change in minutes (default: infinitely)","required":false,"multiple":false}},"args":[],"flagsConfig":{"officeuser":{"kind":"string","char":"o","description":"'name' (firstname lastname) of the SF user","required":true,"input":[],"multiple":false,"type":"option"},"statusonly":{"kind":"boolean","char":"s","description":"get Lightning Sync status of the SF user, only","required":false,"allowNo":false,"type":"boolean"},"wait":{"kind":"integer","char":"w","description":"wait time for command to wait for status change in minutes (default: infinitely)","required":false,"input":[],"multiple":false,"type":"option"}},"requiresUsername":true,"supportsDevhubUsername":false,"requiresProject":false}}}
|