sf-delta-tests 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,101 +1,31 @@
1
1
  # sf-delta-tests
2
2
 
3
- [![NPM](https://img.shields.io/npm/v/focus-tests.svg?label=focus-tests)](https://www.npmjs.com/package/focus-tests) [![Downloads/week](https://img.shields.io/npm/dw/focus-tests.svg)](https://npmjs.org/package/focus-tests) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/focus-tests/main/LICENSE.txt)
3
+ Calculate dependencies and scope to relevant tests.
4
4
 
5
- ## Using the template
5
+ [![NPM](https://img.shields.io/npm/v/sf-delta-tests.svg?label=sf-delta-tests)](https://www.npmjs.com/package/sf-delta-tests) [![Downloads/week](https://img.shields.io/npm/dw/sf-delta-tests.svg)](https://npmjs.org/package/sf-delta-tests) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/matthew-gladman/sf-delta-tests/main/LICENSE.txt)
6
6
 
7
- This repository provides a template for creating a plugin for the Salesforce CLI. To convert this template to a working plugin:
8
-
9
- 1. Please get in touch with the Platform CLI team. We want to help you develop your plugin.
10
- 2. Generate your plugin:
11
-
12
- ```
13
- sf plugins install dev
14
- sf dev generate plugin
15
-
16
- git init -b main
17
- git add . && git commit -m "chore: initial commit"
18
- ```
19
-
20
- 3. Create your plugin's repo in the salesforcecli github org
21
- 4. When you're ready, replace the contents of this README with the information you want.
22
-
23
- ## Learn about `sf` plugins
24
-
25
- Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
26
-
27
- This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](#tooling) used by Salesforce.
28
-
29
- Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is required to keep these tests active in your plugin if you plan to have it bundled.
30
-
31
- ### Tooling
32
-
33
- - [@salesforce/core](https://github.com/forcedotcom/sfdx-core)
34
- - [@salesforce/kit](https://github.com/forcedotcom/kit)
35
- - [@salesforce/sf-plugins-core](https://github.com/salesforcecli/sf-plugins-core)
36
- - [@salesforce/ts-types](https://github.com/forcedotcom/ts-types)
37
- - [@salesforce/ts-sinon](https://github.com/forcedotcom/ts-sinon)
38
- - [@salesforce/dev-config](https://github.com/forcedotcom/dev-config)
39
- - [@salesforce/dev-scripts](https://github.com/forcedotcom/dev-scripts)
40
-
41
- ### Hooks
42
-
43
- For cross clouds commands, e.g. `sf env list`, we utilize [oclif hooks](https://oclif.io/docs/hooks) to get the relevant information from installed plugins.
44
-
45
- This plugin includes sample hooks in the [src/hooks directory](src/hooks). You'll just need to add the appropriate logic. You can also delete any of the hooks if they aren't required for your plugin.
46
-
47
- # Everything past here is only a suggestion as to what should be in your specific plugin's description
48
-
49
- This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
50
-
51
- We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
7
+ This plugin is designed to optimize your Salesforce CI/CD pipeline by calculating only the relevant test classes that need to be run based on the metadata changes in your package. It uses the Salesforce Dependency API to determine these relationships.
52
8
 
53
9
  ## Install
54
10
 
55
11
  ```bash
56
- sf plugins install focus-tests@x.y.z
12
+ sf plugins install sf-delta-tests
57
13
  ```
58
14
 
59
- ## Issues
60
-
61
- Please report any issues at https://github.com/forcedotcom/cli/issues
62
-
63
- ## Contributing
64
-
65
- 1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
66
- 2. Create a new issue before starting your project so that we can keep track of
67
- what you are trying to add/fix. That way, we can also offer suggestions or
68
- let you know if there is already an effort in progress.
69
- 3. Fork this repository.
70
- 4. [Build the plugin locally](#build)
71
- 5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
72
- 6. Edit the code in your fork.
73
- 7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
74
- 8. Sign CLA (see [CLA](#cla) below).
75
- 9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
76
-
77
- ### CLA
78
-
79
- External contributors will be required to sign a Contributor's License
80
- Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
81
-
82
15
  ### Build
83
16
 
84
17
  To build the plugin locally, make sure to have yarn installed and run the following commands:
85
18
 
86
19
  ```bash
87
- # Clone the repository
88
- git clone git@github.com:salesforcecli/focus-tests
89
-
90
20
  # Install the dependencies and compile
91
21
  yarn && yarn build
92
22
  ```
93
23
 
94
- To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.
24
+ To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file.
95
25
 
96
26
  ```bash
97
27
  # Run using local run file.
98
- ./bin/dev hello world
28
+ ./bin/dev.js delta test-classes -o <alias name> --package-path=test/fixtures/manifest/package.xml
99
29
  ```
100
30
 
101
31
  There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
@@ -115,32 +45,35 @@ sf plugins
115
45
 
116
46
  ## `sf delta test-classes`
117
47
 
118
- Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
48
+ Calculates the tests needed to be run based on the changed metadata given using the Salesforce Dependency API
119
49
 
120
50
  ```
51
+ Run only related tests
52
+
121
53
  USAGE
122
- $ sf delta test-classes -o <value> -c <value> [--json] [-n <value>]
54
+ $ sf delta test-classes -o <value> [--json] [--flags-dir <value>] [-p <value>] [--always-run-test <value>...] [--include-all-flows]
123
55
 
124
56
  FLAGS
125
- -c, --changed-metadata=<value> (required) Comma seperated list of changed metadata.
126
- -n, --name=<value> Description of a flag.
127
- -o, --target-org=<value> (required) The org you want to check the dependencies against.
57
+ -o, --target-org=<value> (required) The org you want to check the dependencies against.
58
+ -p, --package-path=<value> [default: manifest/package.xml] Path to the package.xml that will be deployed.
59
+ --always-run-test=<value>... A test class to run when no tests need to be ran.
60
+ --[no-]include-all-flows When enabled, if any Flow is changed, include all Flows that require test coverage based on their trigger type
61
+ or process type. This ensures proper test coverage validation since Salesforce checks coverage for all such
62
+ Flows during deployment, not just the changed ones. Use --no-include-all-flows to disable.
128
63
 
129
64
  GLOBAL FLAGS
130
- --json Format output as json.
65
+ --flags-dir=<value> Import flag values from a directory.
66
+ --json Format output as json.
131
67
 
132
68
  DESCRIPTION
133
- Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
69
+ Run only related tests
134
70
 
135
71
  Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
136
72
 
137
73
  EXAMPLES
138
- $ sf delta test-classes
139
-
140
- FLAG DESCRIPTIONS
141
- -n, --name=<value> Description of a flag.
74
+ testCmd=$(sf delta test-classes --target-org matt@never.io.dev)
142
75
 
143
- More information about a flag. Don't repeat the summary.
76
+ $ sf project deploy validate ${testCmd}
144
77
  ```
145
78
 
146
79
  <!-- commandsstop -->
@@ -1,11 +1,11 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
2
  import { Config } from '@oclif/core';
3
- import { DependencyService } from '../../services/dependency-service';
4
- import { ApexClassService } from '../../services/apex-class-service';
5
- import { ManifestService } from '../../services/manifest-service';
6
- import { OutputService } from '../../services/output-service';
7
- import { CliService } from '../../services/cli-service';
8
- import { FlowService } from '../../services/flow-service';
3
+ import { DependencyService } from '../../services/dependency-service.js';
4
+ import { ApexClassService } from '../../services/apex-class-service.js';
5
+ import { ManifestService } from '../../services/manifest-service.js';
6
+ import { OutputService } from '../../services/output-service.js';
7
+ import { CliService } from '../../services/cli-service.js';
8
+ import { FlowService } from '../../services/flow-service.js';
9
9
  export type DeltaTestClassesResult = {
10
10
  testNames: string[];
11
11
  cli: string;
@@ -15,10 +15,10 @@ export default class TestClasses extends SfCommand<DeltaTestClassesResult> {
15
15
  static readonly description: string;
16
16
  static readonly examples: string[];
17
17
  static readonly flags: {
18
- 'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
19
- 'package-path': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
20
- 'always-run-test': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
21
- 'include-all-flows': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'package-path': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
20
+ 'always-run-test': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ 'include-all-flows': import("@oclif/core/interfaces").BooleanFlag<boolean>;
22
22
  };
23
23
  private dependencyService;
24
24
  private apexClassService;
@@ -1,18 +1,52 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
4
- const core_1 = require("@salesforce/core");
5
- const lodash_1 = require("lodash");
6
- const dependency_service_1 = require("../../services/dependency-service");
7
- const apex_class_service_1 = require("../../services/apex-class-service");
8
- const manifest_service_1 = require("../../services/manifest-service");
9
- const output_service_1 = require("../../services/output-service");
10
- const cli_service_1 = require("../../services/cli-service");
11
- const flow_service_1 = require("../../services/flow-service");
12
- core_1.Messages.importMessagesDirectory(__dirname);
13
- const messages = core_1.Messages.loadMessages('sf-delta-tests', 'delta.test-classes');
14
- class TestClasses extends sf_plugins_core_1.SfCommand {
15
- constructor(argv, config, dependencyService = new dependency_service_1.DependencyService(), apexClassService = new apex_class_service_1.ApexClassService(), outputService = new output_service_1.OutputService(), manifestService = new manifest_service_1.ManifestService(), cliService = new cli_service_1.CliService(), flowService = new flow_service_1.FlowService()) {
1
+ import { fileURLToPath } from 'node:url';
2
+ import { dirname } from 'node:path';
3
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
4
+ import { Messages } from '@salesforce/core';
5
+ import lodash from 'lodash';
6
+ import { DependencyService } from '../../services/dependency-service.js';
7
+ import { ApexClassService } from '../../services/apex-class-service.js';
8
+ import { ManifestService } from '../../services/manifest-service.js';
9
+ import { OutputService } from '../../services/output-service.js';
10
+ import { CliService } from '../../services/cli-service.js';
11
+ import { FlowService } from '../../services/flow-service.js';
12
+ const currentFileName = fileURLToPath(import.meta.url);
13
+ const currentDirectory = dirname(currentFileName);
14
+ Messages.importMessagesDirectory(currentDirectory);
15
+ const messages = Messages.loadMessages('sf-delta-tests', 'delta.test-classes');
16
+ export default class TestClasses extends SfCommand {
17
+ static summary = messages.getMessage('summary');
18
+ static description = messages.getMessage('description');
19
+ static examples = messages.getMessages('examples');
20
+ // TODO: Add in parameters to tune the max revision depth, max changed metadata
21
+ // TODO: Add in parameters to allow fetching other object types for dependencies and meaningful types
22
+ static flags = {
23
+ 'target-org': Flags.requiredOrg({
24
+ summary: messages.getMessage('flags.target-org.summary'),
25
+ char: 'o',
26
+ required: true,
27
+ }),
28
+ 'package-path': Flags.directory({
29
+ summary: messages.getMessage('flags.package-path.summary'),
30
+ char: 'p',
31
+ default: 'manifest/package.xml',
32
+ }),
33
+ 'always-run-test': Flags.string({
34
+ summary: messages.getMessage('flags.always-run-test.summary'),
35
+ multiple: true,
36
+ }),
37
+ 'include-all-flows': Flags.boolean({
38
+ summary: messages.getMessage('flags.include-all-flows.summary'),
39
+ default: true,
40
+ allowNo: true,
41
+ }),
42
+ };
43
+ dependencyService;
44
+ apexClassService;
45
+ outputService;
46
+ manifestService;
47
+ cliService;
48
+ flowService;
49
+ constructor(argv, config, dependencyService = new DependencyService(), apexClassService = new ApexClassService(), outputService = new OutputService(), manifestService = new ManifestService(), cliService = new CliService(), flowService = new FlowService()) {
16
50
  super(argv, config);
17
51
  this.dependencyService = dependencyService;
18
52
  this.apexClassService = apexClassService;
@@ -40,7 +74,7 @@ class TestClasses extends sf_plugins_core_1.SfCommand {
40
74
  const changedMetadataWithType = this.manifestService.extractMetadataComponentsWithType(manifestData);
41
75
  const flowNames = await this.flowService.getFlowNames(changedMetadataWithType, flags['include-all-flows']);
42
76
  const flowTriggerObjectNames = await this.flowService.getTriggerObjectsFromFlows(flowNames);
43
- const changedMetadata = (0, lodash_1.uniq)([
77
+ const changedMetadata = lodash.uniq([
44
78
  ...flowNames,
45
79
  ...flowTriggerObjectNames,
46
80
  ...changedMetadataWithType.map((c) => c.name),
@@ -92,31 +126,4 @@ class TestClasses extends sf_plugins_core_1.SfCommand {
92
126
  }
93
127
  }
94
128
  }
95
- TestClasses.summary = messages.getMessage('summary');
96
- TestClasses.description = messages.getMessage('description');
97
- TestClasses.examples = messages.getMessages('examples');
98
- // TODO: Add in parameters to tune the max revision depth, max changed metadata
99
- // TODO: Add in parameters to allow fetching other object types for dependencies and meaningful types
100
- TestClasses.flags = {
101
- 'target-org': sf_plugins_core_1.Flags.requiredOrg({
102
- summary: messages.getMessage('flags.target-org.summary'),
103
- char: 'o',
104
- required: true,
105
- }),
106
- 'package-path': sf_plugins_core_1.Flags.directory({
107
- summary: messages.getMessage('flags.package-path.summary'),
108
- char: 'p',
109
- default: 'manifest/package.xml',
110
- }),
111
- 'always-run-test': sf_plugins_core_1.Flags.string({
112
- summary: messages.getMessage('flags.always-run-test.summary'),
113
- multiple: true,
114
- }),
115
- 'include-all-flows': sf_plugins_core_1.Flags.boolean({
116
- summary: messages.getMessage('flags.include-all-flows.summary'),
117
- default: true,
118
- allowNo: true,
119
- }),
120
- };
121
- exports.default = TestClasses;
122
129
  //# sourceMappingURL=test-classes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-classes.js","sourceRoot":"","sources":["../../../src/commands/delta/test-classes.ts"],"names":[],"mappings":";;AAAA,iEAA+D;AAC/D,2CAA4C;AAE5C,mCAA8B;AAC9B,0EAAsE;AACtE,0EAAqE;AACrE,sEAAkE;AAClE,kEAA8D;AAC9D,4DAAwD;AACxD,8DAA0D;AAE1D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC;AAO/E,MAAqB,WAAY,SAAQ,2BAAiC;IAoCxE,YACE,IAAc,EACd,MAAc,EACd,iBAAiB,GAAG,IAAI,sCAAiB,EAAE,EAC3C,gBAAgB,GAAG,IAAI,qCAAgB,EAAE,EACzC,aAAa,GAAG,IAAI,8BAAa,EAAE,EACnC,eAAe,GAAG,IAAI,kCAAe,EAAE,EACvC,UAAU,GAAG,IAAI,wBAAU,EAAE,EAC7B,WAAW,GAAG,IAAI,0BAAW,EAAE;QAE/B,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,GAAG;QACd,IAAI;YACF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAEhD,oBAAoB;YACpB,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY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,CAAC,SAAS,CAAC,CAAC,CAAC;YAEnD,OAAO;gBACL,SAAS;gBACT,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;aAC9C,CAAC;QACJ,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;gBACvB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC1E,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC5D,CAAC;IACH,CAAC"}
@@ -1,31 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.meaningfulMetadataChanges = exports.defaultTypesToFetchFromDependencyServer = exports.CUSTOM_METADATA = exports.AURA_DEFINITION_BUNDLE = exports.LIGHTNING_COMPONENT_BUNDLE = exports.FLOW = exports.CUSTOM_OBJECT = exports.APEX_TRIGGER = exports.APEX_CLASS = void 0;
4
- exports.APEX_CLASS = 'ApexClass';
5
- exports.APEX_TRIGGER = 'ApexTrigger';
6
- exports.CUSTOM_OBJECT = 'CustomObject';
7
- exports.FLOW = 'Flow';
8
- exports.LIGHTNING_COMPONENT_BUNDLE = 'LightningComponentBundle';
9
- exports.AURA_DEFINITION_BUNDLE = 'AuraDefinitionBundle';
10
- exports.CUSTOM_METADATA = 'CustomMetadata';
1
+ export const APEX_CLASS = 'ApexClass';
2
+ export const APEX_TRIGGER = 'ApexTrigger';
3
+ export const CUSTOM_OBJECT = 'CustomObject';
4
+ export const FLOW = 'Flow';
5
+ export const LIGHTNING_COMPONENT_BUNDLE = 'LightningComponentBundle';
6
+ export const AURA_DEFINITION_BUNDLE = 'AuraDefinitionBundle';
7
+ export const CUSTOM_METADATA = 'CustomMetadata';
11
8
  // TODO: Consider Setting
12
- exports.defaultTypesToFetchFromDependencyServer = [
13
- exports.APEX_CLASS,
14
- exports.APEX_TRIGGER,
15
- exports.CUSTOM_OBJECT,
16
- exports.FLOW,
17
- exports.LIGHTNING_COMPONENT_BUNDLE,
18
- exports.AURA_DEFINITION_BUNDLE,
19
- exports.CUSTOM_METADATA,
9
+ export const defaultTypesToFetchFromDependencyServer = [
10
+ APEX_CLASS,
11
+ APEX_TRIGGER,
12
+ CUSTOM_OBJECT,
13
+ FLOW,
14
+ LIGHTNING_COMPONENT_BUNDLE,
15
+ AURA_DEFINITION_BUNDLE,
16
+ CUSTOM_METADATA,
20
17
  ];
21
18
  // TODO: Review
22
- exports.meaningfulMetadataChanges = [
23
- exports.APEX_CLASS,
24
- exports.APEX_TRIGGER,
25
- exports.CUSTOM_OBJECT,
26
- exports.FLOW,
27
- exports.LIGHTNING_COMPONENT_BUNDLE,
28
- exports.AURA_DEFINITION_BUNDLE,
29
- exports.CUSTOM_METADATA,
19
+ export const meaningfulMetadataChanges = [
20
+ APEX_CLASS,
21
+ APEX_TRIGGER,
22
+ CUSTOM_OBJECT,
23
+ FLOW,
24
+ LIGHTNING_COMPONENT_BUNDLE,
25
+ AURA_DEFINITION_BUNDLE,
26
+ CUSTOM_METADATA,
30
27
  ];
31
28
  //# sourceMappingURL=object-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"object-types.js","sourceRoot":"","sources":["../../src/elements/object-types.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,YAAY,GAAG,aAAa,CAAC;AAC7B,QAAA,aAAa,GAAG,cAAc,CAAC;AAC/B,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,0BAA0B,GAAG,0BAA0B,CAAC;AACxD,QAAA,sBAAsB,GAAG,sBAAsB,CAAC;AAChD,QAAA,eAAe,GAAG,gBAAgB,CAAC;AAChD,yBAAyB;AACZ,QAAA,uCAAuC,GAAG;IACrD,kBAAU;IACV,oBAAY;IACZ,qBAAa;IACb,YAAI;IACJ,kCAA0B;IAC1B,8BAAsB;IACtB,uBAAe;CAChB,CAAC;AAEF,eAAe;AACF,QAAA,yBAAyB,GAAG;IACvC,kBAAU;IACV,oBAAY;IACZ,qBAAa;IACb,YAAI;IACJ,kCAA0B;IAC1B,8BAAsB;IACtB,uBAAe;CAChB,CAAC"}
1
+ {"version":3,"file":"object-types.js","sourceRoot":"","sources":["../../src/elements/object-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AACtC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAC5C,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC;AAC3B,MAAM,CAAC,MAAM,0BAA0B,GAAG,0BAA0B,CAAC;AACrE,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAChD,yBAAyB;AACzB,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACrD,UAAU;IACV,YAAY;IACZ,aAAa;IACb,IAAI;IACJ,0BAA0B;IAC1B,sBAAsB;IACtB,eAAe;CAChB,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,UAAU;IACV,YAAY;IACZ,aAAa;IACb,IAAI;IACJ,0BAA0B;IAC1B,sBAAsB;IACtB,eAAe;CAChB,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  declare const _default: {};
2
- export = _default;
2
+ export default _default;
package/lib/index.js CHANGED
@@ -1,3 +1,2 @@
1
- "use strict";
2
- module.exports = {};
1
+ export default {};
3
2
  //# 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":";AAAA,iBAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAC"}
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApexClassService = void 0;
4
- const path_1 = require("path");
5
- const promises_1 = require("fs/promises");
6
- const glob_1 = require("glob");
7
- class ApexClassService {
1
+ import { parse as parsePath, join as joinPath } from 'path';
2
+ import { readFile } from 'fs/promises';
3
+ import { glob } from 'glob';
4
+ export class ApexClassService {
8
5
  // eslint-disable-next-line class-methods-use-this
9
6
  filterApexTestSimple(classList) {
10
7
  return classList.filter((className) => className.toLowerCase().includes('test'));
@@ -14,15 +11,15 @@ class ApexClassService {
14
11
  async filterApexTest(classList, rootPath = 'force-app/main/default/classes') {
15
12
  // Get all Apex Classes with the filenames `${className}.cls` in the root directory and all subdirectories
16
13
  const globPattern = `**/{,${classList.join(',')}}.cls`;
17
- const apexClassPaths = await (0, glob_1.glob)(globPattern, { cwd: rootPath });
14
+ const apexClassPaths = await glob(globPattern, { cwd: rootPath });
18
15
  const apexClassTests = [];
19
16
  const regexIsTest = /@istest/i;
20
17
  // Open each file, check to see if it is a test and add to apexClassTests
21
18
  for (const apexClassPath of apexClassPaths) {
22
- const joinedPath = (0, path_1.join)(rootPath, apexClassPath);
23
- const parsedPath = (0, path_1.parse)(joinedPath);
19
+ const joinedPath = joinPath(rootPath, apexClassPath);
20
+ const parsedPath = parsePath(joinedPath);
24
21
  // eslint-disable-next-line no-await-in-loop
25
- const fileContent = (await (0, promises_1.readFile)(joinedPath)).toString();
22
+ const fileContent = (await readFile(joinedPath)).toString();
26
23
  if (fileContent.search(regexIsTest) !== -1) {
27
24
  apexClassTests.push(parsedPath.name.replace('.cls', ''));
28
25
  }
@@ -30,5 +27,4 @@ class ApexClassService {
30
27
  return apexClassTests;
31
28
  }
32
29
  }
33
- exports.ApexClassService = ApexClassService;
34
30
  //# sourceMappingURL=apex-class-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apex-class-service.js","sourceRoot":"","sources":["../../src/services/apex-class-service.ts"],"names":[],"mappings":";;;AAAA,+BAA4D;AAC5D,0CAAuC;AACvC,+BAA4B;AAE5B,MAAa,gBAAgB;IAC3B,kDAAkD;IAC3C,oBAAoB,CAAC,SAAmB;QAC7C,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,8CAA8C;IAC9C,kDAAkD;IAC3C,KAAK,CAAC,cAAc,CAAC,SAAmB,EAAE,QAAQ,GAAG,gCAAgC;QAC1F,0GAA0G;QAC1G,MAAM,WAAW,GAAG,QAAQ,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;QACvD,MAAM,cAAc,GAAG,MAAM,IAAA,WAAI,EAAC,WAAW,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;QAElE,MAAM,cAAc,GAAa,EAAE,CAAC;QACpC,MAAM,WAAW,GAAG,UAAU,CAAC;QAE/B,yEAAyE;QACzE,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE;YAC1C,MAAM,UAAU,GAAG,IAAA,WAAQ,EAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;YACrD,MAAM,UAAU,GAAG,IAAA,YAAS,EAAC,UAAU,CAAC,CAAC;YACzC,4CAA4C;YAC5C,MAAM,WAAW,GAAG,CAAC,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YAC5D,IA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AAG,SAAS,CAAC,UAAU,CAAC,CAAC;YACzC,4CAA4C;YAC5C,MAAM,WAAW,GAAG,CAAC,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YAC5D,IAAI,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBAC3C,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CliService = void 0;
4
1
  /* eslint-disable class-methods-use-this */
5
- class CliService {
2
+ export class CliService {
6
3
  specificTests(tests) {
7
4
  const testList = tests.map((test) => (test.includes(' ') ? `"${test}"` : test));
8
5
  return `--test-level=RunSpecifiedTests --tests=${testList.join(' ')}`;
@@ -15,5 +12,4 @@ class CliService {
15
12
  return `--test-level=RunSpecifiedTests --tests=SFDeltaTests-NoTest ${testList.join(' ')}`.trimEnd();
16
13
  }
17
14
  }
18
- exports.CliService = CliService;
19
15
  //# sourceMappingURL=cli-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-service.js","sourceRoot":"","sources":["../../src/services/cli-service.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC3C,MAAa,UAAU;IACd,aAAa,CAAC,KAAe;QAClC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,OAAO,0CAA0C,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACxE,CAAC;IAEM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,19 @@
1
- "use strict";
2
1
  /* eslint-disable class-methods-use-this */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DependencyService = void 0;
5
- const kit_1 = require("@salesforce/kit");
6
- const lodash_1 = require("lodash");
7
- const object_types_1 = require("../elements/object-types");
8
- class DependencyService {
2
+ import { sortBy } from '@salesforce/kit';
3
+ import lodash from 'lodash';
4
+ import { APEX_CLASS, defaultTypesToFetchFromDependencyServer } from '../elements/object-types.js';
5
+ export class DependencyService {
6
+ connection;
9
7
  connect(connection) {
10
8
  this.connection = connection;
11
9
  }
12
10
  async getDependenciesByObjects(additionalObjects = []) {
13
- const objects = new Set([...object_types_1.defaultTypesToFetchFromDependencyServer, ...additionalObjects]);
11
+ const objects = new Set([...defaultTypesToFetchFromDependencyServer, ...additionalObjects]);
14
12
  const promises = [];
15
13
  objects.forEach((object) => promises.push(this.getDependencyByObject(object)));
16
14
  const results = await Promise.all(promises);
17
15
  // return oua;
18
- return (0, lodash_1.uniqBy)(results.flat(), (result) => result.MetadataComponentName +
16
+ return lodash.uniqBy(results.flat(), (result) => result.MetadataComponentName +
19
17
  result.MetadataComponentType +
20
18
  result.RefMetadataComponentName +
21
19
  result.RefMetadataComponentType);
@@ -28,9 +26,9 @@ class DependencyService {
28
26
  directDependencies.add(depData);
29
27
  }
30
28
  }
31
- const dependencies = Array.from(this.getRelations(dependencyList.filter((depData) => depData.RefMetadataComponentType === object_types_1.APEX_CLASS), directDependencies));
32
- return (0, lodash_1.uniq)(dependencies
33
- .filter((dependency) => dependency.MetadataComponentType === object_types_1.APEX_CLASS)
29
+ const dependencies = Array.from(this.getRelations(dependencyList.filter((depData) => depData.RefMetadataComponentType === APEX_CLASS), directDependencies));
30
+ return lodash.uniq(dependencies
31
+ .filter((dependency) => dependency.MetadataComponentType === APEX_CLASS)
34
32
  .map((dependency) => dependency.MetadataComponentName));
35
33
  }
36
34
  getRelations(dependenciesRelatingToApex, relatedDependencies, relationCounter = 0) {
@@ -60,22 +58,21 @@ class DependencyService {
60
58
  }
61
59
  const dependencies = await this.connection.tooling.query(this.getDependencySoql(objectType));
62
60
  const refDependencies = await this.connection.tooling.query(this.getRefDependencySoql(objectType));
63
- return (0, kit_1.sortBy)([...dependencies.records, ...refDependencies.records], ['MetadataComponentType', 'RefMetadataComponentType']);
61
+ return sortBy([...dependencies.records, ...refDependencies.records], ['MetadataComponentType', 'RefMetadataComponentType']);
64
62
  }
65
63
  getDependencySoql(objectType) {
66
- return `SELECT MetadataComponentName, MetadataComponentType, RefMetadataComponentName, RefMetadataComponentType
67
- FROM MetadataComponentDependency
68
- WHERE MetadataComponentType = '${objectType}'
69
- AND MetadataComponentNamespace = NULL
64
+ return `SELECT MetadataComponentName, MetadataComponentType, RefMetadataComponentName, RefMetadataComponentType
65
+ FROM MetadataComponentDependency
66
+ WHERE MetadataComponentType = '${objectType}'
67
+ AND MetadataComponentNamespace = NULL
70
68
  AND RefMetadataComponentNamespace = NULL`;
71
69
  }
72
70
  getRefDependencySoql(objectType) {
73
- return `SELECT MetadataComponentName, MetadataComponentType, RefMetadataComponentName, RefMetadataComponentType
74
- FROM MetadataComponentDependency
75
- WHERE RefMetadataComponentType = '${objectType}'
76
- AND MetadataComponentNamespace = NULL
71
+ return `SELECT MetadataComponentName, MetadataComponentType, RefMetadataComponentName, RefMetadataComponentType
72
+ FROM MetadataComponentDependency
73
+ WHERE RefMetadataComponentType = '${objectType}'
74
+ AND MetadataComponentNamespace = NULL
77
75
  AND RefMetadataComponentNamespace = NULL`;
78
76
  }
79
77
  }
80
- exports.DependencyService = DependencyService;
81
78
  //# sourceMappingURL=dependency-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-service.js","sourceRoot":"","sources":["../../src/services/dependency-service.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAG3C,yCAAyC;AACzC,mCAAsC;AACtC,2DAA+F;AAU/F,MAAa,iBAAiB;IAGrB,OAAO,CAAC,UAAsB;QACnC,IAAI,CAAC,UAAU,GAAG,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D,CAAC;IAEO,oBAAoB,CAAC,UAAkB;QAC7C,OAAO;;0CAE+B,UAAU;;iDAEH,CAAC;IAChD,CAAC;CACF"}
@@ -1,23 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // import { TestContext } from '@salesforce/core/lib/testSetup';
4
2
  // import { stubSfCommandUx } from '@salesforce/sf-plugins-core';
5
- const fs_1 = require("fs");
6
- const chai_1 = require("chai");
7
- const dependency_service_1 = require("./dependency-service");
3
+ import { readFileSync } from 'fs';
4
+ import { expect } from 'chai';
5
+ import { DependencyService } from './dependency-service.js';
8
6
  describe('dependency-services', () => {
9
7
  let dependencyService;
10
8
  let dependencyList;
11
9
  before(() => {
12
- dependencyList = JSON.parse((0, fs_1.readFileSync)('test/fixtures/dependency-exploration-sf.json').toString());
10
+ dependencyList = JSON.parse(readFileSync('test/fixtures/dependency-exploration-sf.json').toString());
13
11
  });
14
12
  beforeEach(() => {
15
- dependencyService = new dependency_service_1.DependencyService();
13
+ dependencyService = new DependencyService();
16
14
  });
17
15
  describe('getRelatedApexClasses', () => {
18
16
  it('test', () => {
19
17
  const results = dependencyService.getRelatedApexClasses(dependencyList, ['APIUsers']);
20
- (0, chai_1.expect)(results).to.deep.eq(['APIUsers', 'APIUsersTest']);
18
+ expect(results).to.deep.eq(['APIUsers', 'APIUsersTest']);
21
19
  });
22
20
  });
23
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-services.test.js","sourceRoot":"","sources":["../../src/services/dependency-services.test.ts"],"names":[],"mappings":";;AAAA,gEAAgE;AAChE,iEAAiE;AACjE,2BAAkC;AAClC,+BAA8B;AAC9B,6DAAsF;AAEtF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,IAAI,iBAAoC,CAAC;IACzC,IAAI,cAA6C,CAAC;IAElD,MAAM,CAAC,GAAG,EAAE;QACV,cAAc,GAAG,IAAI,CAAC,KAAK,CACzB,IAAA,iBAAY,EAAC,8CAA8C,CAAC,CAAC,QAAQ,EAAE,CACvC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,GAAG,EAAE;QACd,iBAAiB,GAAG,IAAI,sCAAiB,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;QACrC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YACd,MAAM,OAAO,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YACtF,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"dependency-services.test.js","sourceRoot":"","sources":["../../src/services/dependency-services.test.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,iEAAiE;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAA+B,MAAM,yBAAyB,CAAC;AAEzF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,IAAI,iBAAoC,CAAC;IACzC,IAAI,cAA6C,CAAC;IAElD,MAAM,CAAC,GAAG,EAAE;QACV,cAAc,GAAG,IAAI,CAAC,KAAK,CACzB,YAAY,CAAC,8CAA8C,CAAC,CAAC,QAAQ,EAAE,CACvC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,GAAG,EAAE;QACd,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;QACrC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YACd,MAAM,OAAO,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YACtF,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { MetadataComponent } from './manifest-service';
1
+ import { MetadataComponent } from './manifest-service.js';
2
2
  export type FlowMetadata = {
3
3
  apiName: string;
4
4
  triggerType?: string;
@@ -1,33 +1,27 @@
1
- "use strict";
2
1
  /* eslint-disable class-methods-use-this */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.FlowService = void 0;
5
- const path_1 = require("path");
6
- const promises_1 = require("fs/promises");
7
- const glob_1 = require("glob");
8
- const fast_xml_parser_1 = require("fast-xml-parser");
9
- const core_1 = require("@salesforce/core");
10
- const lodash_1 = require("lodash");
11
- const object_types_1 = require("../elements/object-types");
12
- class FlowService {
13
- constructor() {
14
- this.alwaysArray = ['Flow.processMetadataValues'];
15
- this.xmlParser = new fast_xml_parser_1.XMLParser({
16
- ignoreAttributes: false,
17
- parseAttributeValue: false,
18
- trimValues: true,
19
- isArray: (_, jpath) => this.alwaysArray.includes(jpath),
20
- });
21
- this.logger = new core_1.Logger('FlowService');
22
- this.isNotNullOrUndefined = (value) => value !== undefined && value !== null;
23
- }
2
+ import { parse as parsePath } from 'path';
3
+ import { readFile } from 'fs/promises';
4
+ import { glob } from 'glob';
5
+ import { XMLParser } from 'fast-xml-parser';
6
+ import { Logger } from '@salesforce/core';
7
+ import loadsh from 'lodash';
8
+ import { FLOW } from '../elements/object-types.js';
9
+ export class FlowService {
10
+ alwaysArray = ['Flow.processMetadataValues'];
11
+ xmlParser = new XMLParser({
12
+ ignoreAttributes: false,
13
+ parseAttributeValue: false,
14
+ trimValues: true,
15
+ isArray: (_, jpath) => this.alwaysArray.includes(jpath),
16
+ });
17
+ logger = new Logger('FlowService');
24
18
  /**
25
19
  * Gets Flow names that require test coverage.
26
20
  * If includeAllFlows is true, and any changed flow requires tests, return changed flows plus all flows that require tests.
27
21
  * Otherwise, returns only the changed flows.
28
22
  */
29
23
  async getFlowNames(changedMetadataWithType, includeAllFlows) {
30
- const changedFlows = changedMetadataWithType.filter((m) => m.type === object_types_1.FLOW).map((m) => m.name);
24
+ const changedFlows = changedMetadataWithType.filter((m) => m.type === FLOW).map((m) => m.name);
31
25
  if (changedFlows.length === 0) {
32
26
  return [];
33
27
  }
@@ -45,7 +39,7 @@ class FlowService {
45
39
  this.logger.info('changedFlows', changedFlows);
46
40
  this.logger.info('allFlowNames', allFlowNames);
47
41
  this.logger.info('allFlowsRequiringTests', allFlowsRequiringTests);
48
- return (0, lodash_1.uniq)([...changedFlows, ...allFlowsRequiringTests]);
42
+ return loadsh.uniq([...changedFlows, ...allFlowsRequiringTests]);
49
43
  }
50
44
  return changedFlows;
51
45
  }
@@ -59,14 +53,14 @@ class FlowService {
59
53
  }
60
54
  const flowPaths = await Promise.all(flowNames.map(async (flowName) => {
61
55
  const globPattern = `**/${flowName}.flow-meta.xml`;
62
- return (0, glob_1.glob)(globPattern, { cwd: rootPath });
56
+ return glob(globPattern, { cwd: rootPath });
63
57
  }));
64
58
  const flowMetadataPromises = flowPaths.flat().map(async (flowPath) => {
65
59
  const fullPath = `${rootPath}/${flowPath}`;
66
- const parsedPath = (0, path_1.parse)(fullPath);
60
+ const parsedPath = parsePath(fullPath);
67
61
  const apiName = parsedPath.name.replace('.flow-meta', '');
68
62
  try {
69
- const fileContent = await (0, promises_1.readFile)(fullPath, 'utf8');
63
+ const fileContent = await readFile(fullPath, 'utf8');
70
64
  const flowDef = this.parseFlowXml(fileContent);
71
65
  return {
72
66
  apiName,
@@ -96,9 +90,9 @@ class FlowService {
96
90
  * Gets all Flow API names from local Flow definition files.
97
91
  */
98
92
  async getAllFlowNames(rootPath = 'force-app/main/default/flows') {
99
- const flowPaths = await (0, glob_1.glob)('**/*.flow-meta.xml', { cwd: rootPath });
93
+ const flowPaths = await glob('**/*.flow-meta.xml', { cwd: rootPath });
100
94
  return flowPaths.map((flowPath) => {
101
- const parsedPath = (0, path_1.parse)(flowPath);
95
+ const parsedPath = parsePath(flowPath);
102
96
  return parsedPath.name.replace('.flow-meta', '');
103
97
  });
104
98
  }
@@ -137,6 +131,6 @@ class FlowService {
137
131
  triggerObjectOrEvent,
138
132
  };
139
133
  }
134
+ isNotNullOrUndefined = (value) => value !== undefined && value !== null;
140
135
  }
141
- exports.FlowService = FlowService;
142
136
  //# sourceMappingURL=flow-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow-service.js","sourceRoot":"","sources":["../../src/services/flow-service.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAE3C,+BAA0C;AAC1C,0CAAuC;AACvC,+BAA4B;AAC5B,qDAA4C;AAC5C,2CAA0C;AAC1C,mCAA8B;AAC9B,2DAAgD;AAkChD,MAAa,WAAW;IAAxB;QACU,gBAAW,GAAG,CAAC,4BAA4B,CAAC,CAAC;QAC7C,cAAS,GAAG,IAAI,2BAAS,CAAC;YAChC,gBAAgB,EAAE,KAAK;YACvB,mBAAmB,EAAE,KAAK;YAC1B,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;SACjE,CAAC,CAAC;QAEK,WAAM,GAAG,IAAI,aAAM,CAAC,aAAa,CAAC,CAAC;QA6JnC,yBAAoB,GAAG,CAAI,KAA2B,EAAc,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;IACvH,CAAC;IA5JC;;;;OAIG;IACI,KAAK,CAAC,YAAY,CAAC,uBAA4C,EAAE,eAAwB;QAC9F,MAAM,YAAY,GA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,YAAY,IAAI,QAAQ,CAAC,KAAK,EAAE,WAAW,CAC5E,CAAC;YAEF,IAAI,kBAAkB,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;gBAC3C,oBAAoB,GAAG,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC;YAC9D,CAAC;QACH,CAAC;QAED,OAAO;YACL,WAAW;YACX,WAAW;YACX,oBAAoB;SACrB,CAAC;IACJ,CAAC;IAEO,oBAAoB,GAAG,CAAI,KAA2B,EAAc,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;CACtH"}
@@ -1,4 +1,4 @@
1
- import { ResolveManifestResult } from '@salesforce/source-deploy-retrieve/lib/src/resolve/manifestResolver';
1
+ import { ResolveManifestResult } from '@salesforce/source-deploy-retrieve/lib/src/resolve/manifestResolver.js';
2
2
  export type MetadataComponent = {
3
3
  name: string;
4
4
  type: string;
@@ -1,12 +1,9 @@
1
- "use strict";
2
1
  /* eslint-disable class-methods-use-this */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ManifestService = void 0;
5
- const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
6
- const object_types_1 = require("../elements/object-types");
7
- class ManifestService {
2
+ import { ManifestResolver } from '@salesforce/source-deploy-retrieve';
3
+ import { meaningfulMetadataChanges } from '../elements/object-types.js';
4
+ export class ManifestService {
8
5
  async parseManifest(path = 'manifest/package.xml') {
9
- const manifestResolver = new source_deploy_retrieve_1.ManifestResolver();
6
+ const manifestResolver = new ManifestResolver();
10
7
  return manifestResolver.resolve(path);
11
8
  }
12
9
  extractMetadataComponentsWithType(manifestData) {
@@ -17,7 +14,7 @@ class ManifestService {
17
14
  continue;
18
15
  }
19
16
  // Only include metadata that we care about. Aka: meaningful
20
- if (!object_types_1.meaningfulMetadataChanges.includes(component.type.name)) {
17
+ if (!meaningfulMetadataChanges.includes(component.type.name)) {
21
18
  continue;
22
19
  }
23
20
  // Children components, we want to get the parent. Example: `Account.Name` -> `Account`
@@ -34,5 +31,4 @@ class ManifestService {
34
31
  return Array.from(componentMap.values());
35
32
  }
36
33
  }
37
- exports.ManifestService = ManifestService;
38
34
  //# sourceMappingURL=manifest-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-service.js","sourceRoot":"","sources":["../../src/services/manifest-service.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;AAE3C,+EAAsE;AAEtE,2DAAqE;AAOrE,MAAa,eAAe;IACnB,KAAK,CAAC,aAAa,CAAC,IAAI,GAAG,sBAAsB;QACtD,MAAM,gBAAgB,GAAG,IAAI,yCAAgB,EAAE,CAAC;QAChD,OAAO,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAEM,iCAAiC,CAAC,YAAmC;QAC1E,MAAM,YAAY,GAAG,IAAI,GAAG,EAA6B,CAAC;QAC1D,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,UAAU,EAAE;YAC/C,4DAA4D;YAC5D,IAAI,SAAS,CAAC,QAAQ,KAAK,GAAG,EAAE;gBAC9B,SAAS;aACV;YAED,4DAA4D;YAC5D,IAAI,CAAC,wCAAyB,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBAC5D,SAAS;aACV;YAED,uFAAuF;YACvF,IAAI,IAAY,CAAC;YACjB,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACpC,MAAM,kBAAkB,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACzD,IAAI,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;aAC9B;iBAAM;gBACL,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC;aAC3B;YAED,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SA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C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import { MetadataComponentDependency } from './dependency-service';
1
+ import { MetadataComponentDependency } from './dependency-service.js';
2
2
  export declare class OutputService {
3
3
  private readonly outputFolder;
4
4
  constructor(outputFolder?: string);
@@ -1,26 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OutputService = void 0;
4
- const path_1 = require("path");
5
- const promises_1 = require("fs/promises");
6
- const fs_1 = require("fs");
7
- class OutputService {
1
+ import { resolve, join } from 'path';
2
+ import { writeFile, access, mkdir } from 'fs/promises';
3
+ import { constants } from 'fs';
4
+ export class OutputService {
5
+ outputFolder;
8
6
  constructor(outputFolder = '.sf-delta-tests') {
9
- this.outputFolder = (0, path_1.resolve)(outputFolder);
7
+ this.outputFolder = resolve(outputFolder);
10
8
  }
11
9
  async dependencyData(dependencyData) {
12
10
  return this.write('dependency-graph.json', JSON.stringify(dependencyData));
13
11
  }
14
12
  async write(fileName, data) {
15
- const path = (0, path_1.join)(this.outputFolder, fileName);
13
+ const path = join(this.outputFolder, fileName);
16
14
  try {
17
- await (0, promises_1.access)(this.outputFolder, fs_1.constants.W_OK);
15
+ await access(this.outputFolder, constants.W_OK);
18
16
  }
19
17
  catch {
20
- await (0, promises_1.mkdir)(this.outputFolder);
18
+ await mkdir(this.outputFolder);
21
19
  }
22
- return (0, promises_1.writeFile)(path, data);
20
+ return writeFile(path, data);
23
21
  }
24
22
  }
25
- exports.OutputService = OutputService;
26
23
  //# sourceMappingURL=output-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"output-service.js","sourceRoot":"","sources":["../../src/services/output-service.ts"],"names":[],"mappings":";;;AAAA,+BAAqC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cAAc,CAAC,CAAC,CAAC;IAC7E,CAAC;IAEO,KAAK,CAAC,KAAK,CAAC,QAAgB,EAAE,IAAY;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QAE/C,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACjC,CAAC;QAED,OAAO,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -1,57 +1,78 @@
1
1
  {
2
- "version": "0.0.26",
3
2
  "commands": {
4
3
  "delta:test-classes": {
5
- "id": "delta:test-classes",
6
- "summary": "Run only related tests",
7
- "description": "Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API",
8
- "strict": true,
9
- "pluginName": "sf-delta-tests",
10
- "pluginAlias": "sf-delta-tests",
11
- "pluginType": "core",
12
4
  "aliases": [],
5
+ "args": {},
6
+ "description": "Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API",
13
7
  "examples": [
14
8
  "testCmd=$(sf delta test-classes --target-org matt@never.io.dev)\r\nsf project deploy validate ${testCmd}"
15
9
  ],
16
10
  "flags": {
17
11
  "json": {
18
- "name": "json",
19
- "type": "boolean",
20
12
  "description": "Format output as json.",
21
13
  "helpGroup": "GLOBAL",
22
- "allowNo": false
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "flags-dir": {
19
+ "helpGroup": "GLOBAL",
20
+ "name": "flags-dir",
21
+ "summary": "Import flag values from a directory.",
22
+ "hasDynamicHelp": false,
23
+ "multiple": false,
24
+ "type": "option"
23
25
  },
24
26
  "target-org": {
25
- "name": "target-org",
26
- "type": "option",
27
27
  "char": "o",
28
- "summary": "The org you want to check the dependencies against.",
28
+ "name": "target-org",
29
+ "noCacheDefault": true,
29
30
  "required": true,
30
- "multiple": false
31
+ "summary": "The org you want to check the dependencies against.",
32
+ "hasDynamicHelp": true,
33
+ "multiple": false,
34
+ "type": "option"
31
35
  },
32
36
  "package-path": {
33
- "name": "package-path",
34
- "type": "option",
35
37
  "char": "p",
38
+ "name": "package-path",
36
39
  "summary": "Path to the package.xml that will be deployed.",
40
+ "default": "manifest/package.xml",
41
+ "hasDynamicHelp": false,
37
42
  "multiple": false,
38
- "default": "manifest/package.xml"
43
+ "type": "option"
39
44
  },
40
45
  "always-run-test": {
41
46
  "name": "always-run-test",
42
- "type": "option",
43
47
  "summary": "A test class to run when no tests need to be ran.",
44
- "multiple": true
48
+ "hasDynamicHelp": false,
49
+ "multiple": true,
50
+ "type": "option"
45
51
  },
46
52
  "include-all-flows": {
47
53
  "name": "include-all-flows",
48
- "type": "boolean",
49
54
  "summary": "When enabled, if any Flow is changed, include all Flows that require test coverage based on their trigger type or process type. This ensures proper test coverage validation since Salesforce checks coverage for all such Flows during deployment, not just the changed ones. Use --no-include-all-flows to disable.",
50
- "allowNo": true
55
+ "allowNo": true,
56
+ "type": "boolean"
51
57
  }
52
58
  },
53
- "args": {},
54
- "hasDynamicHelp": true
59
+ "hasDynamicHelp": true,
60
+ "hiddenAliases": [],
61
+ "id": "delta:test-classes",
62
+ "pluginAlias": "sf-delta-tests",
63
+ "pluginName": "sf-delta-tests",
64
+ "pluginType": "core",
65
+ "strict": true,
66
+ "summary": "Run only related tests",
67
+ "enableJsonFlag": true,
68
+ "isESM": true,
69
+ "relativePath": [
70
+ "lib",
71
+ "commands",
72
+ "delta",
73
+ "test-classes.js"
74
+ ]
55
75
  }
56
- }
76
+ },
77
+ "version": "0.1.0"
57
78
  }
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "sf-delta-tests",
3
3
  "description": "Calculate dependencies and scope to relevant tests",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
+ "type": "module",
5
6
  "dependencies": {
6
- "@oclif/core": "^2.11.8",
7
- "@salesforce/core": "^5.2.0",
8
- "@salesforce/kit": "^3.0.8",
9
- "@salesforce/sf-plugins-core": "^3.1.14",
10
- "@salesforce/source-deploy-retrieve": "^9.7.8",
7
+ "@oclif/core": "^4.8.0",
8
+ "@salesforce/core": "^8.24.0",
9
+ "@salesforce/kit": "^3.2.4",
10
+ "@salesforce/sf-plugins-core": "^12.2.6",
11
+ "@salesforce/source-deploy-retrieve": "^12.31.4",
11
12
  "fast-xml-parser": "^5.3.3",
12
- "glob": "^11.1.0",
13
+ "glob": "^13.0.0",
13
14
  "lodash": "^4.17.21",
14
- "tslib": "^2"
15
+ "tslib": "^2.8.1"
15
16
  },
16
17
  "engines": {
17
18
  "node": ">=14.0.0"
@@ -152,7 +153,7 @@
152
153
  },
153
154
  "author": "matthew-gladman",
154
155
  "volta": {
155
- "node": "20.19.6",
156
- "yarn": "1.22.19"
156
+ "node": "24.12.0",
157
+ "yarn": "1.22.22"
157
158
  }
158
159
  }