@jayree/sfdx-plugin-legacy 1.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE.txt +12 -0
  3. package/README.md +251 -0
  4. package/lib/commands/jayree/automation/changeset/deploy.d.ts +23 -0
  5. package/lib/commands/jayree/automation/changeset/deploy.js +397 -0
  6. package/lib/commands/jayree/automation/changeset/deploy.js.map +1 -0
  7. package/lib/commands/jayree/automation/changeset/list.d.ts +11 -0
  8. package/lib/commands/jayree/automation/changeset/list.js +98 -0
  9. package/lib/commands/jayree/automation/changeset/list.js.map +1 -0
  10. package/lib/commands/jayree/automation/ltngsync/status.d.ts +22 -0
  11. package/lib/commands/jayree/automation/ltngsync/status.js +239 -0
  12. package/lib/commands/jayree/automation/ltngsync/status.js.map +1 -0
  13. package/lib/commands/jayree/packagedescription/create.d.ts +17 -0
  14. package/lib/commands/jayree/packagedescription/create.js +62 -0
  15. package/lib/commands/jayree/packagedescription/create.js.map +1 -0
  16. package/lib/commands/jayree/packagedescription/get.d.ts +16 -0
  17. package/lib/commands/jayree/packagedescription/get.js +57 -0
  18. package/lib/commands/jayree/packagedescription/get.js.map +1 -0
  19. package/lib/commands/jayree/packagedescription/remove.d.ts +16 -0
  20. package/lib/commands/jayree/packagedescription/remove.js +82 -0
  21. package/lib/commands/jayree/packagedescription/remove.js.map +1 -0
  22. package/lib/commands/jayree/packagedescription/set.d.ts +17 -0
  23. package/lib/commands/jayree/packagedescription/set.js +76 -0
  24. package/lib/commands/jayree/packagedescription/set.js.map +1 -0
  25. package/lib/hooks/changelog.d.ts +2 -0
  26. package/lib/hooks/changelog.js +123 -0
  27. package/lib/hooks/changelog.js.map +1 -0
  28. package/lib/index.d.ts +2 -0
  29. package/lib/index.js +10 -0
  30. package/lib/index.js.map +1 -0
  31. package/lib/utils/xml.d.ts +5 -0
  32. package/lib/utils/xml.js +50 -0
  33. package/lib/utils/xml.js.map +1 -0
  34. package/messages/createpackagedescription.json +5 -0
  35. package/messages/deploychangeset.json +8 -0
  36. package/messages/getpackagedescription.json +4 -0
  37. package/messages/listchangeset.json +3 -0
  38. package/messages/ltngsyncstatus.json +6 -0
  39. package/messages/removepackagedescription.json +4 -0
  40. package/messages/setpackagedescription.json +5 -0
  41. package/oclif.manifest.json +1 -0
  42. package/package.json +160 -0
@@ -0,0 +1,123 @@
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
+ /*
28
+ * Copyright (c) 2021, jayree
29
+ * All rights reserved.
30
+ * Licensed under the BSD 3-Clause license.
31
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
32
+ */
33
+ /* istanbul ignore file */
34
+ const path_1 = require("path");
35
+ const fs = __importStar(require("fs-extra"));
36
+ const debug_1 = require("debug");
37
+ const TerminalRenderer = require("marked-terminal");
38
+ const marked_1 = require("marked");
39
+ const semver = __importStar(require("semver"));
40
+ const core_1 = require("@oclif/core");
41
+ const debug = (0, debug_1.debug)('jayree:hooks');
42
+ // original from https://github.com/salesforcecli/plugin-info/blob/main/src/shared/parseReleaseNotes.ts
43
+ const parseReleaseNotes = (notes, version) => {
44
+ let found = false;
45
+ let closestVersion;
46
+ let versions;
47
+ const parsed = marked_1.marked.lexer(notes);
48
+ let tokens;
49
+ const findVersion = (desiredVersion) => {
50
+ versions = [];
51
+ tokens = parsed.filter((token) => {
52
+ // TODO: Could make header depth (2) a setting in oclif.info.releasenotes
53
+ if (token.type === 'heading' && token.depth <= 2) {
54
+ const coercedVersion = semver.coerce(token.text).version;
55
+ // We will use this to find the closest patch if passed version is not found
56
+ versions.push(coercedVersion);
57
+ if (coercedVersion === desiredVersion) {
58
+ found = true;
59
+ return token;
60
+ }
61
+ found = false;
62
+ }
63
+ else if (found === true) {
64
+ return token;
65
+ }
66
+ });
67
+ };
68
+ findVersion(version);
69
+ if (!tokens.length) {
70
+ // If version was not found, try again with the closest patch version
71
+ const semverRange = `${semver.major(version)}.${semver.minor(version)}.x`;
72
+ closestVersion = semver.maxSatisfying(versions, semverRange);
73
+ findVersion(closestVersion);
74
+ }
75
+ if (closestVersion !== undefined) {
76
+ const warning = marked_1.marked.lexer(`# ATTENTION: Version ${version} was not found. Showing notes for closest patch version ${closestVersion}.`)[0];
77
+ tokens.unshift(warning);
78
+ }
79
+ return tokens;
80
+ };
81
+ // eslint-disable-next-line @typescript-eslint/require-await
82
+ const changelog = async function () {
83
+ process.once('exit', () => {
84
+ try {
85
+ const pluginRootPath = (0, path_1.join)(__dirname, '..', '..', '..');
86
+ const { name, version } = fs.readJsonSync((0, path_1.join)(pluginRootPath, 'package.json'));
87
+ const changelogFile = fs.readFileSync((0, path_1.join)(pluginRootPath, 'CHANGELOG.md'), 'utf8');
88
+ const cacheDir = (0, path_1.join)(this.config.cacheDir, name);
89
+ const versionFile = (0, path_1.join)(cacheDir, 'version');
90
+ fs.ensureFileSync(versionFile);
91
+ let latestVersion;
92
+ try {
93
+ latestVersion = fs.readJSONSync(versionFile);
94
+ }
95
+ catch (error) {
96
+ latestVersion = { version: '0.0.0' };
97
+ }
98
+ debug({ latestVersion: latestVersion.version, version });
99
+ if (latestVersion.version !== version) {
100
+ const tokens = parseReleaseNotes(changelogFile, version);
101
+ if (!tokens.length) {
102
+ debug(`${name} - didn't find version '${version}'.`);
103
+ }
104
+ else {
105
+ marked_1.marked.setOptions({
106
+ renderer: new TerminalRenderer({ emoji: false }),
107
+ });
108
+ tokens.unshift(marked_1.marked.lexer(`# Changelog for '${name}':`)[0]);
109
+ core_1.CliUx.ux.log(marked_1.marked.parser(tokens));
110
+ fs.writeJsonSync(versionFile, { version });
111
+ }
112
+ }
113
+ else {
114
+ debug(`${name} - no update`);
115
+ }
116
+ }
117
+ catch (error) {
118
+ debug(error);
119
+ }
120
+ });
121
+ };
122
+ exports.changelog = changelog;
123
+ //# sourceMappingURL=changelog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,0BAA0B;AAC1B,+BAA4B;AAC5B,6CAA+B;AAC/B,iCAAuC;AACvC,oDAAqD;AACrD,mCAAgC;AAChC,+CAAiC;AACjC,sCAA0C;AAE1C,MAAM,KAAK,GAAG,IAAA,aAAK,EAAC,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,MAAM,GAAG,eAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEnC,IAAI,MAAsB,CAAC;IAE3B,MAAM,WAAW,GAAG,C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AK,EAAE,KAAK,EAAE,CAAC;qBACjD,CAAC,CAAC;oBACH,MAAM,CAAC,OAAO,CAAC,eAAM,CAAC,KAAK,CAAC,oBAAoB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9D,YAAK,CAAC,EAAE,CAAC,GAAG,CAAC,eAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;oBACpC,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;AAtCW,QAAA,SAAS,aAsCpB"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
package/lib/index.js ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * Copyright (c) 2021, jayree
5
+ * All rights reserved.
6
+ * Licensed under the BSD 3-Clause license.
7
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
8
+ */
9
+ exports.default = {};
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,kBAAe,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function parseManifest(xmlData: string): any;
2
+ export declare function js2Manifest(jsData: any): string;
3
+ export declare function js2SourceComponent(jsData: any): string;
4
+ export declare function parseSourceComponent(xmlData: string): any;
5
+ export declare function normalizeToArray<T>(entryOrArray: T | T[] | undefined): T[];
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeToArray = exports.parseSourceComponent = exports.js2SourceComponent = exports.js2Manifest = exports.parseManifest = void 0;
4
+ /*
5
+ * Copyright (c) 2021, jayree
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const fast_xml_parser_1 = require("fast-xml-parser");
11
+ const XML_DECL = '<?xml version="1.0" encoding="UTF-8"?>\n';
12
+ const XML_NS_URL = 'http://soap.sforce.com/2006/04/metadata';
13
+ const XML_NS_KEY = '@_xmlns';
14
+ function parseManifest(xmlData) {
15
+ const parser = new fast_xml_parser_1.XMLParser({
16
+ stopNodes: ['version'],
17
+ parseTagValue: false,
18
+ });
19
+ return parser.parse(xmlData);
20
+ }
21
+ exports.parseManifest = parseManifest;
22
+ function js2Manifest(jsData) {
23
+ const js2Xml = new fast_xml_parser_1.XMLBuilder({ format: true, indentBy: ' ', ignoreAttributes: false });
24
+ jsData.Package[XML_NS_KEY] = XML_NS_URL;
25
+ return XML_DECL.concat(js2Xml.build(jsData));
26
+ }
27
+ exports.js2Manifest = js2Manifest;
28
+ const XML_DECL_KEY = '?xml';
29
+ function js2SourceComponent(jsData) {
30
+ const js2Xml = new fast_xml_parser_1.XMLBuilder({ format: true, indentBy: ' ', ignoreAttributes: false });
31
+ delete jsData[XML_DECL_KEY];
32
+ return XML_DECL.concat(js2Xml.build(jsData));
33
+ }
34
+ exports.js2SourceComponent = js2SourceComponent;
35
+ function parseSourceComponent(xmlData) {
36
+ const parser = new fast_xml_parser_1.XMLParser({
37
+ ignoreAttributes: false,
38
+ parseTagValue: false,
39
+ });
40
+ return parser.parse(xmlData);
41
+ }
42
+ exports.parseSourceComponent = parseSourceComponent;
43
+ function normalizeToArray(entryOrArray) {
44
+ if (entryOrArray) {
45
+ return Array.isArray(entryOrArray) ? entryOrArray : [entryOrArray];
46
+ }
47
+ return [];
48
+ }
49
+ exports.normalizeTo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B,CAAC,OAAe;IAClD,MAAM,MAAM,GAAG,IAAI,2BAAS,CAAC;QAC3B,gBAAgB,EAAE,KAAK;QACvB,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAND,oDAMC;AAED,SAAgB,gBAAgB,CAAI,YAAiC;IACnE,IAAI,YAAY,EAAE;QAChB,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;KACpE;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AALD,4CAKC"}
@@ -0,0 +1,5 @@
1
+ {
2
+ "commandDescription": "creates an empty package with the description",
3
+ "fileFlagDescription": "file to create",
4
+ "descriptionFlagDescription": "new description value"
5
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "commandDescription": "deploy incomming change set to an org (beta)",
3
+ "changesetFlagDescription": "name of changeset to deploy",
4
+ "runtestsFlagDescription": "tests to run if --testlevel RunSpecifiedTests",
5
+ "testlevelFlagDescription": "deployment testing level (Default,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)",
6
+ "checkonlyFlagDescription": "validate deploy but don’t save to the org (default:false)",
7
+ "nodialogFlagDescription": "don't show the dialog wizard"
8
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "commandDescription": "get the description within a package",
3
+ "fileFlagDescription": "file to read"
4
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "commandDescription": "list incomming change sets of an org (beta)"
3
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "commandDescription": "check the Lightning Sync User Sync Status and reset sync if needed (beta)",
3
+ "UserFlagDescription": "'name' (firstname lastname) of the SF user",
4
+ "StatusFlagDescription": "get Lightning Sync status of the SF user, only",
5
+ "waitFlagDescription": "wait time for command to wait for status change in minutes (default: infinitely)"
6
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "commandDescription": "remove the description within a package",
3
+ "fileFlagDescription": "file to read"
4
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "commandDescription": "set the description within a package",
3
+ "fileFlagDescription": "file to read",
4
+ "descriptionFlagDescription": "new description value"
5
+ }
@@ -0,0 +1 @@
1
+ {"version":"1.0.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}}}
package/package.json ADDED
@@ -0,0 +1,160 @@
1
+ {
2
+ "name": "@jayree/sfdx-plugin-legacy",
3
+ "description": "jayree sfdx legacy commands",
4
+ "version": "1.0.0",
5
+ "author": "jayree",
6
+ "bugs": "https://github.com/jayree/sfdx-plugin-legacy/issues",
7
+ "dependencies": {
8
+ "@oclif/core": "^1.9.0",
9
+ "@salesforce/command": "^5.1.3",
10
+ "@salesforce/core": "^3.19.1",
11
+ "adm-zip": "^0.5.9",
12
+ "debug": "^4.3.4",
13
+ "fast-xml-parser": "^4.0.8",
14
+ "fs-extra": "^10.1.0",
15
+ "inquirer": "^8.2.4",
16
+ "marked": "^4.0.16",
17
+ "marked-terminal": "^4.2.0",
18
+ "puppeteer": "^14.2.1",
19
+ "semver": "^7.3.7",
20
+ "tslib": "^2.4.0"
21
+ },
22
+ "devDependencies": {
23
+ "@commitlint/cli": "^17.0.2",
24
+ "@commitlint/config-conventional": "^17.0.2",
25
+ "@oclif/plugin-command-snapshot": "^3",
26
+ "@oclif/plugin-help": "^5.1.12",
27
+ "@salesforce/dev-config": "^3.0.1",
28
+ "@salesforce/dev-scripts": "2.0.2",
29
+ "@salesforce/prettier-config": "^0.0.2",
30
+ "@salesforce/ts-sinon": "^1.3.21",
31
+ "@types/adm-zip": "^0.5.0",
32
+ "@types/chai": "^4.3.1",
33
+ "@types/fs-extra": "^9.0.13",
34
+ "@types/inquirer": "^8.2.1",
35
+ "@types/marked": "^4.0.3",
36
+ "@types/marked-terminal": "^3.1.3",
37
+ "@types/mocha": "^9.1.1",
38
+ "@types/node": "^17.0.39",
39
+ "@types/semver": "^7.3.9",
40
+ "@types/sinon": "^10.0.11",
41
+ "@typescript-eslint/eslint-plugin": "^5.27.0",
42
+ "@typescript-eslint/parser": "^5.27.0",
43
+ "chai": "^4.3.6",
44
+ "codecov": "^3.8.3",
45
+ "deepmerge": "^4.2.2",
46
+ "eslint": "^8.17.0",
47
+ "eslint-config-prettier": "^8.5.0",
48
+ "eslint-config-salesforce": "^0.1.6",
49
+ "eslint-config-salesforce-typescript": "^0.2.8",
50
+ "eslint-plugin-header": "^3.1.1",
51
+ "eslint-plugin-import": "^2.26.0",
52
+ "eslint-plugin-jsdoc": "^39.3.2",
53
+ "eslint-plugin-prettier": "^4.0.0",
54
+ "husky": "^8.0.1",
55
+ "is-ci": "^3.0.1",
56
+ "mocha": "^10.0.0",
57
+ "nock": "^13.2.6",
58
+ "nyc": "^15.1.0",
59
+ "oclif": "^3.0.1",
60
+ "patch-package": "^6.4.7",
61
+ "pinst": "^3.0.0",
62
+ "prettier": "^2.6.2",
63
+ "pretty-quick": "^3.1.3",
64
+ "shx": "^0.3.4",
65
+ "sinon": "^14.0.0",
66
+ "source-map-support": "^0.5.21",
67
+ "ts-node": "^10.8.1",
68
+ "typescript": "^4.7.3"
69
+ },
70
+ "engines": {
71
+ "node": ">=14.17.1"
72
+ },
73
+ "files": [
74
+ "/lib",
75
+ "/messages",
76
+ "/oclif.manifest.json",
77
+ "/CHANGELOG.md"
78
+ ],
79
+ "homepage": "https://github.com/jayree/sfdx-plugin-legacy",
80
+ "keywords": [
81
+ "deployment",
82
+ "automation",
83
+ "change set",
84
+ "package description",
85
+ "lightning sync status",
86
+ "sfdx",
87
+ "sfdx-plugin"
88
+ ],
89
+ "license": "BSD-3-Clause",
90
+ "oclif": {
91
+ "commands": "./lib/commands",
92
+ "bin": "sfdx",
93
+ "hooks": {
94
+ "update": "./lib/hooks/changelog"
95
+ },
96
+ "topics": {
97
+ "jayree": {
98
+ "name": "jayree",
99
+ "description": "manifest, source, and org automation toolset",
100
+ "subtopics": {
101
+ "packagedescription": {
102
+ "description": "add/modify/remove the description of a package"
103
+ },
104
+ "automation": {
105
+ "description": "headless browser automation tools"
106
+ },
107
+ "automation:changeset": {
108
+ "description": "deploy/list incomming change sets (beta)"
109
+ },
110
+ "automation:ltngsync": {
111
+ "description": "check the Lightning Sync User Sync Status and reset sync if needed (beta)"
112
+ }
113
+ }
114
+ }
115
+ },
116
+ "devPlugins": [
117
+ "@oclif/plugin-help",
118
+ "@oclif/plugin-command-snapshot"
119
+ ],
120
+ "info": {
121
+ "releasenotes": {
122
+ "distTagUrl": "https://registry.npmjs.org/-/package/@jayree/sfdx-plugin-legacy/dist-tags",
123
+ "releaseNotesPath": "https://github.com/jayree/sfdx-plugin-legacy/tree/main",
124
+ "releaseNotesFilename": "CHANGELOG.md"
125
+ }
126
+ }
127
+ },
128
+ "repository": "jayree/sfdx-plugin-legacy",
129
+ "scripts": {
130
+ "build": "sf-build",
131
+ "clean": "sf-clean",
132
+ "clean-all": "sf-clean all",
133
+ "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
134
+ "compile": "sf-compile",
135
+ "format": "sf-format",
136
+ "lint": "sf-lint",
137
+ "lint-fix": "sf-lint --fix",
138
+ "postcompile": "oclif readme",
139
+ "_postinstall": "patch-package",
140
+ "postpack": "shx rm -f oclif.manifest.json",
141
+ "postpublish": "pinst --enable",
142
+ "posttest": "yarn lint && yarn test:deprecation-policy",
143
+ "prepack": "sf-prepack",
144
+ "prepare": "is-ci || husky install",
145
+ "prepublishOnly": "pinst --disable",
146
+ "pretest": "sf-compile-test",
147
+ "test": "sf-test",
148
+ "test:deprecation-policy": "./bin/run snapshot:compare",
149
+ "version": "oclif readme"
150
+ },
151
+ "publishConfig": {
152
+ "access": "public"
153
+ },
154
+ "release": {
155
+ "branches": [
156
+ "main",
157
+ "next"
158
+ ]
159
+ }
160
+ }