Skip to content

Commit

Permalink
Merge pull request #4 from Lightning-Flow-Scanner/feature/deploy-to-s…
Browse files Browse the repository at this point in the history
…alesforce-button

feat: support for deploy to salesforce button
  • Loading branch information
junners authored Jul 20, 2024
2 parents e137078 + a262417 commit 26fc4e1
Show file tree
Hide file tree
Showing 42 changed files with 12,904 additions and 1,027 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ $RECYCLE.BIN/
**/__pycache__/
**/.venv/
**/venv/

# Staging area
force-app/
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run precommit
51 changes: 23 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,55 @@
[![Lightning Flow Scanner](media/banner.png)](https://github.com/Lightning-Flow-Scanner)
[![Lightning Flow Scanner](media/banner.png)](https://github.com/Lightning-Flow-Scanner)

[![Demo](media/lfsapp.gif)](https://github.com/Lightning-Flow-Scanner)
[![Demo](media/lfsapp.gif)](https://github.com/Lightning-Flow-Scanner)

#### Pinpoint deviations from Industry Best Practices in Salesforce Flows and ensure standards of business automation excellence.

## Quickstart

<a href="https://githubsfdeploy.herokuapp.com?owner=Lightning-Flow-Scanner&repo=lightning-flow-scanner-app&ref=master">
<img alt="Deploy to Salesforce"
src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/deploy.png">
</a>

- **Assign Permissions**: Setup -> Permission Sets -> Find `Lightning Flow Scanner Admin` permission set -> Manage assignments -> Assign to your awesome admin

## Features

- **Flow Overview**: Displays a list of all flows in your Salesforce org and allows users to scan the metadata of a selected flow.
- **Flow Analysis**: Provides detailed metadata analysis of the selected flow.

## Using the Lightning Flow Scanner

1) Open the App Launcher:
1. Open the App Launcher:

- Click on the App Launcher icon in the top-left corner of your Salesforce interface.
- Search for "Flow Scanner" in the App Launcher search bar.
- Click on the "Flow Scanner" app to open it.

2) Scan a Flow:
2. Scan a Flow:

- To scan a flow, click the "Scan" button next to the flow you want to analyze.

## Project Structure

The project is organized into two main directories:

1) force-app: The main application(tab, page etc)
2) lfs_component: Contains the Lightning Flow Scanner Component, used by the main application.
The project is organized into app directories:

This structure allows for clear separation of the core scanning functionality and the main application logic. By modularizing the core scanning functionality, we ensure easier maintenance and updates. Additionally, this setup encourages other Salesforce apps to integrate our functionality, promoting collaboration and expanding the potential use cases for the Lightning Flow Scanner.
1. force-app: staging area
2. lfs-app: Contains the Lightning Flow Scanner main application.

## Development

### Development Flow

1) Authorize Your Salesforce Org:
Authorize your Salesforce org to set up a connection between your local development environment and the Salesforce org:

```sh
sfdx force:auth:web:login -d -a <YourOrgAlias>
```

2) Install dependency

Install the Lightning Flow Scanner Component required for core functionality:
1. Authorize Your Salesforce Org:
Authorize your Salesforce org to set up a connection between your local development environment and the Salesforce org:

```sh
sfdx force:package:install --package 04tDn0000011NpvIAE --wait 10 -u <YourOrgAlias>
sf org login web --alias <YourOrgAlias> --set-default
```

3) Push Source to Your Org:
Push the latest source to your og:

```sh
sfdx force:source:push
```
2. Push Source to Your Org:

3) Pull Source from Your Org:
```sh
sfdx force:source:pull
sf project deploy start --source-dir lfs-app
```

This file was deleted.

14 changes: 0 additions & 14 deletions force-app/main/default/lwc/.eslintrc.json

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions force-app/main/default/lwc/flowOverview/flowOverview.html

This file was deleted.

43 changes: 0 additions & 43 deletions force-app/main/default/lwc/flowOverview/flowOverview.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions force-app/main/default/pages/LFS_VF_Launcher.page

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<brand>
<headerColor>#203271</headerColor>
Expand All @@ -11,6 +11,8 @@
<formFactors>Large</formFactors>
<isNavAutoTempTabsDisabled>true</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>true</isNavPersonalizationDisabled>
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
<label>Flow Scanner</label>
<navType>Standard</navType>
<tabs>Lightning_Flow_Scanner</tabs>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>58.0</apiVersion>
<apiVersion>61.0</apiVersion>
<description>A Lightning Application Bundle</description>
</AuraDefinitionBundle>
</AuraDefinitionBundle>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<ContentAsset xmlns="http://soap.sforce.com/2006/04/metadata">
<isVisibleByExternalUsers>false</isVisibleByExternalUsers>
<language>en_US</language>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<DocumentFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<accessType>Public</accessType>
<name>LFS</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<Document xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Lightning Flow Scanner Icon</description>
<internalUseOnly>false</internalUseOnly>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { createElement } from "lwc";
import FlowOverview from "c/flowOverview";

describe("c-flow-overview", () => {
afterEach(() => {
// The jsdom instance is shared across test cases in a single file so reset the DOM
while (document.body.firstChild) {
document.body.removeChild(document.body.firstChild);
}
});

it("TODO: test case generated by CLI command, please fill in test logic", () => {
// Arrange
const element = createElement("c-flow-overview", {
is: FlowOverview
});

// Act
document.body.appendChild(element);

// Assert
// const div = element.shadowRoot.querySelector('div');
expect(1).toBe(1);
});
});
Loading

0 comments on commit 26fc4e1

Please sign in to comment.