@salesforce/plugin-deploy-retrieve 1.1.2 → 1.2.1

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 (48) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +35 -7
  3. package/lib/commands/deploy/metadata.d.ts +14 -12
  4. package/lib/commands/deploy/metadata.js +78 -70
  5. package/lib/commands/deploy/metadata.js.map +1 -1
  6. package/lib/commands/retrieve/metadata.d.ts +4 -3
  7. package/lib/commands/retrieve/metadata.js +48 -47
  8. package/lib/commands/retrieve/metadata.js.map +1 -1
  9. package/lib/hooks/deploy.js +1 -1
  10. package/lib/hooks/deploy.js.map +1 -1
  11. package/lib/utils/deploy.d.ts +29 -0
  12. package/lib/utils/deploy.js +81 -0
  13. package/lib/utils/deploy.js.map +1 -0
  14. package/lib/utils/metadataDeployer.d.ts +1 -1
  15. package/lib/utils/metadataDeployer.js +50 -17
  16. package/lib/utils/metadataDeployer.js.map +1 -1
  17. package/lib/utils/output.d.ts +8 -9
  18. package/lib/utils/output.js +127 -29
  19. package/lib/utils/output.js.map +1 -1
  20. package/lib/utils/progressBar.d.ts +1 -1
  21. package/lib/utils/progressBar.js +4 -4
  22. package/lib/utils/progressBar.js.map +1 -1
  23. package/lib/utils/project.d.ts +3 -0
  24. package/lib/utils/project.js +22 -0
  25. package/lib/utils/project.js.map +1 -0
  26. package/lib/utils/{testLevel.d.ts → types.d.ts} +10 -0
  27. package/lib/utils/{testLevel.js → types.js} +7 -2
  28. package/lib/utils/types.js.map +1 -0
  29. package/messages/deploy.md +8 -3
  30. package/messages/deploy.metadata.md +54 -2
  31. package/messages/retrieve.metadata.md +10 -2
  32. package/oclif.manifest.json +1 -1
  33. package/package.json +31 -16
  34. package/schemas/deploy-metadata.json +5 -2
  35. package/lib/utils/componentSetBuilder.d.ts +0 -28
  36. package/lib/utils/componentSetBuilder.js +0 -124
  37. package/lib/utils/componentSetBuilder.js.map +0 -1
  38. package/lib/utils/config.d.ts +0 -1
  39. package/lib/utils/config.js +0 -18
  40. package/lib/utils/config.js.map +0 -1
  41. package/lib/utils/orgs.d.ts +0 -4
  42. package/lib/utils/orgs.js +0 -39
  43. package/lib/utils/orgs.js.map +0 -1
  44. package/lib/utils/requiredFlagValidator.d.ts +0 -3
  45. package/lib/utils/requiredFlagValidator.js +0 -19
  46. package/lib/utils/requiredFlagValidator.js.map +0 -1
  47. package/lib/utils/testLevel.js.map +0 -1
  48. package/messages/required.flag.md +0 -3
package/lib/utils/orgs.js DELETED
@@ -1,39 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * Licensed under the BSD 3-Clause license.
6
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.getSourceApiVersion = exports.getPackageDirs = exports.resolveTargetOrg = void 0;
10
- const core_1 = require("@salesforce/core");
11
- const ts_types_1 = require("@salesforce/ts-types");
12
- const resolveTargetOrg = async (targetOrg) => {
13
- const configuredTargetOrg = getConfigValue(core_1.OrgConfigProperties.TARGET_ORG);
14
- const aliasOrUsername = targetOrg || configuredTargetOrg;
15
- if (!aliasOrUsername) {
16
- throw new core_1.SfdxError('no target environment specified', 'NoTargetEnv', [
17
- 'specify target environment with the --target-org flag',
18
- 'set the default environment with "sf config set target-org"',
19
- ]);
20
- }
21
- return (await core_1.GlobalInfo.getInstance()).aliases.resolveUsername(aliasOrUsername);
22
- };
23
- exports.resolveTargetOrg = resolveTargetOrg;
24
- const getPackageDirs = async () => {
25
- const project = await core_1.SfdxProject.resolve();
26
- return project.getUniquePackageDirectories().map((pDir) => pDir.fullPath);
27
- };
28
- exports.getPackageDirs = getPackageDirs;
29
- const getConfigValue = (key) => {
30
- var _a;
31
- return (_a = core_1.ConfigAggregator.getValue(key)) === null || _a === void 0 ? void 0 : _a.value;
32
- };
33
- const getSourceApiVersion = async () => {
34
- const project = await core_1.SfdxProject.resolve();
35
- const projectConfig = await project.resolveProjectConfig();
36
- return (0, ts_types_1.getString)(projectConfig, 'sourceApiVersion');
37
- };
38
- exports.getSourceApiVersion = getSourceApiVersion;
39
- //# sourceMappingURL=orgs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"orgs.js","sourceRoot":"","sources":["../../src/utils/orgs.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA6G;AAC7G,mDAAoE;AAE7D,MAAM,gBAAgB,GAAG,KAAK,EAAE,SAA2B,EAAmB,EAAE;IACrF,MAAM,mBAAmB,GAAG,cAAc,CAAS,0BAAmB,CAAC,UAAU,CAAC,CAAC;IACnF,MAAM,eAAe,GAAG,SAAS,IAAI,mBAAmB,CAAC;IAEzD,IAAI,CAAC,eAAe,EAAE;QACpB,MAAM,IAAI,gBAAS,CAAC,iCAAiC,EAAE,aAAa,EAAE;YACpE,uDAAuD;YACvD,6DAA6D;SAC9D,CAAC,CAAC;KACJ;IACD,OAAO,CAAC,MAAM,iBAAU,CAAC,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;AACnF,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B;AAEK,MAAM,cAAc,GAAG,KAAK,IAAuB,EAAE;IAC1D,MAAM,OAAO,GAAG,MAAM,kBAAW,CAAC,OAAO,EAAE,CAAC;IAC5C,OAAO,OAAO,CAAC,2BAA2B,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC5E,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB;AAEF,MAAM,cAAc,GAAG,CAAoB,GAAW,EAAK,EAAE;;IAC3D,OAAO,MAAA,uBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,0CAAE,KAAU,CAAC;AACpD,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,KAAK,IAAqB,EAAE;IAC7D,MAAM,OAAO,GAAG,MAAM,kBAAW,CAAC,OAAO,EAAE,CAAC;IAC5C,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAC3D,OAAO,IAAA,oBAAS,EAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACtD,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B"}
@@ -1,3 +0,0 @@
1
- export declare function validateOneOfCommandFlags(oneOf: string[], flags: {
2
- [name: string]: unknown;
3
- }): void;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateOneOfCommandFlags = void 0;
4
- /*
5
- * Copyright (c) 2020, salesforce.com, inc.
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 core_1 = require("@salesforce/core");
11
- core_1.Messages.importMessagesDirectory(__dirname);
12
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'required.flag');
13
- function validateOneOfCommandFlags(oneOf, flags) {
14
- if (!Object.keys(flags).some((flag) => oneOf.includes(flag))) {
15
- throw messages.createError('errors.RequiredOneOfFlagsMissing', [oneOf.join(', ')]);
16
- }
17
- }
18
- exports.validateOneOfCommandFlags = validateOneOfCommandFlags;
19
- //# sourceMappingURL=requiredFlagValidator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requiredFlagValidator.js","sourceRoot":"","sources":["../../src/utils/requiredFlagValidator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,eAAe,CAAC,CAAC;AAE9F,SAAgB,yBAAyB,CAAC,KAAe,EAAE,KAAkC;IAC3F,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE;QAC5D,MAAM,QAAQ,CAAC,WAAW,CAAC,kCAAkC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACpF;AACH,CAAC;AAJD,8DAIC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"testLevel.js","sourceRoot":"","sources":["../../src/utils/testLevel.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAuB,CAAA;IACvB,oDAAuC,CAAA;IACvC,4CAA+B,CAAA;IAC/B,kDAAqC,CAAA;AACvC,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"}
@@ -1,3 +0,0 @@
1
- # errors.RequiredOneOfFlagsMissing
2
-
3
- This command expects one of the following flags %s to be provided.