@flow-scanner/lightning-flow-scanner-core 6.1.1 → 6.1.2

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 (2) hide show
  1. package/README.md +13 -17
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
- <p align="center"><i>UMD-compatible Flow metadata engine for Node.js & browsers—20+ rules to catch common issues.</i></p>
7
+ <p align="center"><i>UMD-compatible Flow metadata engine for Node.js & browsers—20+ rules to catch issues.</i></p>
8
8
 
9
9
  ---
10
10
 
@@ -143,7 +143,7 @@ It is recommended to set up configuration and define:
143
143
  }
144
144
  ```
145
145
 
146
- Using the rules section of your configurations, you can specify the list of rules to be run. Furthermore, you can define the severity and configure expressions of rules. To include rules currently that are currently in beta, set `betarules` to true. Below is a breakdown of the available attributes of rule configuration:
146
+ Using the rules section of your configurations, you can specify the list of rules to be run. Furthermore, you can define the severity and configure expressions of rules. Below is a breakdown of the available attributes of rule configuration:
147
147
 
148
148
  ```json
149
149
  {
@@ -182,11 +182,11 @@ Some rules have additional attributes to configure, such as the expression, that
182
182
  "rules": {
183
183
  "APIVersion": {
184
184
  "severity": "error",
185
- "expression": "===58"
185
+ "expression": "===58" // comparison operator
186
186
  },
187
187
  "FlowName": {
188
188
  "severity": "note",
189
- "expression": "[A-Za-z0-9]"
189
+ "expression": "[A-Za-z0-9]" // regular expression
190
190
  }
191
191
  }
192
192
  }
@@ -231,7 +231,7 @@ New rules are introduced in Beta mode before being added to the default ruleset.
231
231
 
232
232
  ## Usage
233
233
 
234
- The Lightning Flow Scanner Core can be used as a dependency in Node.js and browser environments, or used as a standalone UMD module.
234
+ `lightning-flow-scanner-core` can be used as a dependency in Node.js and browser environments, or as a standalone UMD module.
235
235
 
236
236
  ### Examples
237
237
 
@@ -240,16 +240,13 @@ The Lightning Flow Scanner Core can be used as a dependency in Node.js and brows
240
240
  import { parse, scan } from "@flow-scanner/lightning-flow-scanner-core";
241
241
  parse("flows/*.xml").then(scan);
242
242
 
243
- // Apply fixes automatically
243
+ // Apply available patches
244
244
  import { parse, scan, fix } from "@flow-scanner/lightning-flow-scanner-core";
245
245
  parse("flows/*.xml").then(scan).then(fix);
246
246
 
247
247
  // Get SARIF output
248
248
  import { parse, scan, exportSarif } from "@flow-scanner/lightning-flow-scanner-core";
249
- parse("flows/*.xml")
250
- .then(scan)
251
- .then(exportSarif)
252
- .then((sarif) => save("results.sarif", sarif));
249
+ parse("flows/*.xml").then(scan).then(exportSarif); //.then((sarif) => save("results.sarif", sarif));
253
250
 
254
251
  // Browser Usage (Tooling API)
255
252
  const { Flow, scan } = window.lightningflowscanner;
@@ -258,8 +255,7 @@ const results = scan(
258
255
  metadataRes.records.map((r) => ({
259
256
  uri: `/services/data/v60.0/tooling/sobjects/Flow/${r.Id}`,
260
257
  flow: new Flow(r.FullName, r.Metadata),
261
- })),
262
- optionsForScan
258
+ })) //, optionsForScan
263
259
  );
264
260
  ```
265
261
 
@@ -336,26 +332,26 @@ npm install @flow-scanner/lightning-flow-scanner-core
336
332
  ```
337
333
 
338
334
  5. Test as local dependency(Optional):
339
- To test changes to the core module in the VS Code extension or SF CLI plugin locally, run:
335
+ To test changes to the core module locally, run:
340
336
 
341
337
  ```bash
342
338
  npm run link
343
339
  ```
344
340
 
345
- b) Go to the dependent project (VSX or SF CLI) and use:
341
+ b) Go to the dependent project (e.g. VSX or CLI) and use:
346
342
 
347
343
  ```bash
348
344
  npm link @flow-scanner/lightning-flow-scanner-core
349
345
  ```
350
346
 
351
- Your local core module will now replace the installed dependency and update automatically on rebuild.
347
+ Your local module will now replace any installed version and update on rebuild.
352
348
 
353
349
  6. Create a standalone UMD Module(Optional):
354
350
 
355
351
  ```bash
356
- npm run vite:dist
352
+ npm run vite:dist
357
353
  ```
358
354
 
359
- The resulting file will be available in the `dist` directory as `lightning-flow-scanner-core.umd.js`.
355
+ The UMD module will be created at`dist/lightning-flow-scanner-core.umd.js`.
360
356
 
361
357
  ###### Want to help improve Lightning Flow Scanner? See our [Contributing Guidelines](https://github.com/Flow-Scanner/lightning-flow-scanner-core/blob/main/CONTRIBUTING.md).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flow-scanner/lightning-flow-scanner-core",
3
3
  "description": "A lightweight, purpose-built engine for parsing and analyzing Salesforce Flow metadata in Node.js or browser environments. Scan, validate, and optimize Flow automations for security risks, best practices, governor limits, and performance bottlenecks.",
4
- "version": "6.1.1",
4
+ "version": "6.1.2",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "engines": {