sf-delta-tests 0.0.27 → 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,146 +1,79 @@
1
- # sf-delta-tests
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)
4
-
5
- ## Using the template
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.
52
-
53
- ## Install
54
-
55
- ```bash
56
- sf plugins install focus-tests@x.y.z
57
- ```
58
-
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
- ### Build
83
-
84
- To build the plugin locally, make sure to have yarn installed and run the following commands:
85
-
86
- ```bash
87
- # Clone the repository
88
- git clone git@github.com:salesforcecli/focus-tests
89
-
90
- # Install the dependencies and compile
91
- yarn && yarn build
92
- ```
93
-
94
- To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.
95
-
96
- ```bash
97
- # Run using local run file.
98
- ./bin/dev hello world
99
- ```
100
-
101
- 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.
102
-
103
- ```bash
104
- # Link your plugin to the sf cli
105
- sf plugins link .
106
- # To verify
107
- sf plugins
108
- ```
109
-
110
- ## Commands
111
-
112
- <!-- commands -->
113
-
114
- - [`sf delta test-classes`](#sf-delta-test-classes)
115
-
116
- ## `sf delta test-classes`
117
-
118
- Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
119
-
120
- ```
121
- USAGE
122
- $ sf delta test-classes -o <value> -c <value> [--json] [-n <value>]
123
-
124
- 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.
128
-
129
- GLOBAL FLAGS
130
- --json Format output as json.
131
-
132
- DESCRIPTION
133
- Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
134
-
135
- Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
136
-
137
- EXAMPLES
138
- $ sf delta test-classes
139
-
140
- FLAG DESCRIPTIONS
141
- -n, --name=<value> Description of a flag.
142
-
143
- More information about a flag. Don't repeat the summary.
144
- ```
145
-
146
- <!-- commandsstop -->
1
+ # sf-delta-tests
2
+
3
+ Calculate dependencies and scope to relevant tests.
4
+
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
+
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.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ sf plugins install sf-delta-tests
13
+ ```
14
+
15
+ ### Build
16
+
17
+ To build the plugin locally, make sure to have yarn installed and run the following commands:
18
+
19
+ ```bash
20
+ # Install the dependencies and compile
21
+ yarn && yarn build
22
+ ```
23
+
24
+ To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file.
25
+
26
+ ```bash
27
+ # Run using local run file.
28
+ ./bin/dev.js delta test-classes -o <alias name> --package-path=test/fixtures/manifest/package.xml
29
+ ```
30
+
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.
32
+
33
+ ```bash
34
+ # Link your plugin to the sf cli
35
+ sf plugins link .
36
+ # To verify
37
+ sf plugins
38
+ ```
39
+
40
+ ## Commands
41
+
42
+ <!-- commands -->
43
+
44
+ - [`sf delta test-classes`](#sf-delta-test-classes)
45
+
46
+ ## `sf delta test-classes`
47
+
48
+ Calculates the tests needed to be run based on the changed metadata given using the Salesforce Dependency API
49
+
50
+ ```
51
+ Run only related tests
52
+
53
+ USAGE
54
+ $ sf delta test-classes -o <value> [--json] [--flags-dir <value>] [-p <value>] [--always-run-test <value>...] [--include-all-flows]
55
+
56
+ FLAGS
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.
63
+
64
+ GLOBAL FLAGS
65
+ --flags-dir=<value> Import flag values from a directory.
66
+ --json Format output as json.
67
+
68
+ DESCRIPTION
69
+ Run only related tests
70
+
71
+ Calculates the tests needed to be ran based on the changed metadata given using the Salesforce Dependency API
72
+
73
+ EXAMPLES
74
+ testCmd=$(sf delta test-classes --target-org matt@never.io.dev)
75
+
76
+ $ sf project deploy validate ${testCmd}
77
+ ```
78
+
79
+ <!-- commandsstop -->
@@ -1,10 +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';
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';
8
9
  export type DeltaTestClassesResult = {
9
10
  testNames: string[];
10
11
  cli: string;
@@ -14,15 +15,17 @@ export default class TestClasses extends SfCommand<DeltaTestClassesResult> {
14
15
  static readonly description: string;
15
16
  static readonly examples: string[];
16
17
  static readonly flags: {
17
- 'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
18
- 'package-path': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
19
- 'always-run-test': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
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>;
20
22
  };
21
23
  private dependencyService;
22
24
  private apexClassService;
23
25
  private outputService;
24
26
  private manifestService;
25
27
  private cliService;
26
- constructor(argv: string[], config: Config, dependencyService?: DependencyService, apexClassService?: ApexClassService, outputService?: OutputService, manifestService?: ManifestService, cliService?: CliService);
28
+ private flowService;
29
+ constructor(argv: string[], config: Config, dependencyService?: DependencyService, apexClassService?: ApexClassService, outputService?: OutputService, manifestService?: ManifestService, cliService?: CliService, flowService?: FlowService);
27
30
  run(): Promise<DeltaTestClassesResult>;
28
31
  }
@@ -1,23 +1,59 @@
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
- core_1.Messages.importMessagesDirectory(__dirname);
12
- const messages = core_1.Messages.loadMessages('sf-delta-tests', 'delta.test-classes');
13
- class TestClasses extends sf_plugins_core_1.SfCommand {
14
- 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()) {
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()) {
15
50
  super(argv, config);
16
51
  this.dependencyService = dependencyService;
17
52
  this.apexClassService = apexClassService;
18
53
  this.outputService = outputService;
19
54
  this.manifestService = manifestService;
20
55
  this.cliService = cliService;
56
+ this.flowService = flowService;
21
57
  }
22
58
  async run() {
23
59
  try {
@@ -29,12 +65,20 @@ class TestClasses extends sf_plugins_core_1.SfCommand {
29
65
  this.debug('Getting dependencies from SF');
30
66
  // Download all dependencies from SF
31
67
  const combinedApexClassData = await this.dependencyService.getDependenciesByObjects();
68
+ this.debug('combinedApexClassData', combinedApexClassData);
32
69
  // Write into output folder
33
70
  await this.outputService.dependencyData(combinedApexClassData);
34
71
  this.debug(`Loading metadata from ${flags['package-path']}`);
35
72
  // Get manifest data and transform that into a list of metadata
36
73
  const manifestData = await this.manifestService.parseManifest(flags['package-path']);
37
- const changedMetadata = this.manifestService.extractMetadataComponents(manifestData);
74
+ const changedMetadataWithType = this.manifestService.extractMetadataComponentsWithType(manifestData);
75
+ const flowNames = await this.flowService.getFlowNames(changedMetadataWithType, flags['include-all-flows']);
76
+ const flowTriggerObjectNames = await this.flowService.getTriggerObjectsFromFlows(flowNames);
77
+ const changedMetadata = lodash.uniq([
78
+ ...flowNames,
79
+ ...flowTriggerObjectNames,
80
+ ...changedMetadataWithType.map((c) => c.name),
81
+ ]);
38
82
  this.debug({ manifestData: manifestData.components, changedMetadata });
39
83
  // If no meaningful changed metadata, no need to run tests (layout changes don't need tests!)
40
84
  if (changedMetadata.length === 0) {
@@ -45,22 +89,15 @@ class TestClasses extends sf_plugins_core_1.SfCommand {
45
89
  cli: this.cliService.noTests(flags['always-run-test']),
46
90
  };
47
91
  }
48
- // Too many changes, just run all
49
- if (changedMetadata.length > 40) {
50
- this.debug(`Found over 40 changed metadata items (${changedMetadata.length}), running all tests`);
51
- this.log(this.cliService.allTests());
52
- return { testNames: [], cli: this.cliService.allTests() };
53
- }
54
92
  this.debug('Calculating the related apex classes...');
55
93
  // The magic function. From the changed metadata get all the Apex Classes that could be connected to the changed metadata
56
94
  const classList = this.dependencyService.getRelatedApexClasses(combinedApexClassData, changedMetadata);
57
- const unknownEntities = (0, lodash_1.difference)(changedMetadata, classList);
58
95
  this.debug({ classList });
59
- this.debug({ unknownEntities });
60
96
  this.debug('Filtering the apex classes to only tests...');
61
- // Filter the total class list to only tests. Also include all unknown entities (ie, newly added data)
62
- const testNames = await this.apexClassService.filterApexTest([...classList, ...unknownEntities]);
63
- this.debug({ testNames });
97
+ // Filter the total class list to only tests
98
+ const testNames = await this.apexClassService.filterApexTest(classList);
99
+ const simpleTestNames = this.apexClassService.filterApexTestSimple(classList);
100
+ this.debug({ testNames, simpleTestNames });
64
101
  if (flags['always-run-test']) {
65
102
  testNames.push(...flags['always-run-test']);
66
103
  }
@@ -89,26 +126,4 @@ class TestClasses extends sf_plugins_core_1.SfCommand {
89
126
  }
90
127
  }
91
128
  }
92
- TestClasses.summary = messages.getMessage('summary');
93
- TestClasses.description = messages.getMessage('description');
94
- TestClasses.examples = messages.getMessages('examples');
95
- // TODO: Add in parameters to tune the max revision depth, max changed metadata
96
- // TODO: Add in parameters to allow fetching other object types for dependencies and meaningful types
97
- TestClasses.flags = {
98
- 'target-org': sf_plugins_core_1.Flags.requiredOrg({
99
- summary: messages.getMessage('flags.target-org.summary'),
100
- char: 'o',
101
- required: true,
102
- }),
103
- 'package-path': sf_plugins_core_1.Flags.directory({
104
- summary: messages.getMessage('flags.package-path.summary'),
105
- char: 'p',
106
- default: 'manifest/package.xml',
107
- }),
108
- 'always-run-test': sf_plugins_core_1.Flags.string({
109
- summary: messages.getMessage('flags.always-run-test.summary'),
110
- multiple: true,
111
- }),
112
- };
113
- exports.default = TestClasses;
114
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,mCAAoC;AACpC,0EAAsE;AACtE,0EAAqE;AACrE,sEAAkE;AAClE,kEAA8D;AAC9D,4DAAwD;AAExD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,gBAAgB,EAAE,oBAA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TypesToFetchFromDependencyServer = 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,OAA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C;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,IAAI,CAAC,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,CAAC;YAC3C,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;YACrD,MAAM,UAAU,GAAG,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,QAAQ;QACb,OAAO,4BAA4B,CAAC;IACtC,CAAC;IAEM,OAAO,CAAC,aAAwB;QACrC,MAAM,QAAQ,GAAG,aAAa,EAAE,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,IAAI,EAAE,CAAC;QAC/F,OAAO,8DAA8D,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;IACtG,CAAC;CACF;AAdD,gCAcC"}
1
+ {"version":3,"file":"cli-service.js","sourceRoot":"","sources":["../../src/services/cli-service.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,OAAO,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,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