Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/sfdx-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: SFDX CI
on:
push:
branches:
- main
paths:
- "apps-sfdx/**"
pull_request:
paths:
- "apps-sfdx/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test-managed-package:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v6
name: Checkout

- name: Install Salesforce CLI
run: npm install -g @salesforce/cli

- name: Decode JWT key
run: echo "${{ secrets.SFDX_JWT_KEY_BASE64 }}" | base64 --decode > server.key

- name: Authenticate to Dev Hub
run: |
sf org login jwt \
--client-id ${{ secrets.SFDX_CONSUMER_KEY }} \
--jwt-key-file server.key \
--username ${{ secrets.SFDX_DEVHUB_USERNAME }} \
--set-default-dev-hub \
--alias devhub

- name: Create Scratch Org
run: |
sf org create scratch \
--definition-file apps-sfdx/config/project-scratch-def.json \
--set-default \
--alias ci-scratch \
--no-track-source \
--duration-days 1 \
--wait 10

- name: Deploy Source
working-directory: apps-sfdx
run: sf project deploy start --source-dir canvas-app/jetstream

- name: Run Apex Tests
run: |
sf apex run test \
--test-level RunLocalTests \
--wait 10 \
--result-format human \
--code-coverage

- name: Delete Scratch Org
if: always()
run: sf org delete scratch --no-prompt --target-org ci-scratch || true

- name: Remove key file
if: always()
run: rm -f server.key
1 change: 1 addition & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
apps-sfdx/
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
"sourceMaps": true,
"restart": true,
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Launch Apex Replay Debugger",
"type": "apex-replay",
"request": "launch",
"logFile": "${command:AskForLogFileName}",
"stopOnEntry": true,
"trace": true
}
]
}
9 changes: 7 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"**/node_modules/**": true,
"dist": true,
"logs": true,
"tmp": true
"tmp": true,
"**/node_modules": true,
"**/.sf": true,
"**/.sfdx": true
},
"files.watcherExclude": {
"**/.git": true,
Expand All @@ -30,7 +33,9 @@
"**/.DS_Store": true,
"**/node_modules/**": true,
"**/monaco/vs/**": true,
"apps/api/src/assets/js": true
"apps/api/src/assets/js": true,
"**/.sf": true,
"**/.sfdx": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
24 changes: 24 additions & 0 deletions apps-sfdx/.forceignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
#
package.xml

# LWC configuration files
**/jsconfig.json
**/.eslintrc.json

# LWC Jest
**/__tests__/**

**/*.md
**/.gitignore
**/.gitkeep

**/*PasswordPolicy*
**/*SessionSetting*
**/appMenus/**
**/appSwitcher/**
**/customindex/**
**/objectTranslations/**
**/profiles/**
**/settings/**
11 changes: 11 additions & 0 deletions apps-sfdx/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# List files or directories below to ignore them when running prettier
# More information: https://prettier.io/docs/en/ignore.html
#

**/staticresources/**
.localdevserver
.sfdx
.sf
.vscode

coverage/
16 changes: 16 additions & 0 deletions apps-sfdx/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"trailingComma": "none",
"singleQuote": true,
"printWidth": 140,
"plugins": ["prettier-plugin-apex", "@prettier/plugin-xml"],
"overrides": [
{
"files": "**/lwc/**/*.html",
"options": { "parser": "lwc" }
},
{
"files": "*.{cmp,page,component}",
"options": { "parser": "html" }
}
]
}
89 changes: 89 additions & 0 deletions apps-sfdx/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"editor.rulers": [140],
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"search.exclude": {
"apps/api/src/assets/js": true,
"**/monaco/vs/**": true,
"**/node_modules/**": true,
"dist": true,
"logs": true,
"tmp": true,
"**/node_modules": true,
"**/.sf": true,
"**/.sfdx": true
},
"files.watcherExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/node_modules/**": true,
"**/monaco/vs/**": true,
"apps/api/src/assets/js": true,
"**/.sf": true,
"**/.sfdx": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.tabCompletion": "on",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"git.branchProtection": ["main", "release"],
"eslint.useFlatConfig": true,
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#032D60",
"activityBar.activeBorder": "#1B96FF",
"activityBar.background": "#032D60",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#1B96FF",
"activityBarBadge.foreground": "#ffffff",
"statusBar.background": "#032D60",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#0B5CAB",
"titleBar.activeBackground": "#032D60",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#032D6099",
"titleBar.inactiveForeground": "#e7e7e799",
"sash.hoverBorder": "#1B96FF",
"statusBarItem.remoteBackground": "#0B5CAB",
"statusBarItem.remoteForeground": "#e7e7e7",
"commandCenter.border": "#e7e7e799"
},
"xml.preferences.showSchemaDocumentationType": "none"
}
5 changes: 5 additions & 0 deletions apps-sfdx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Jetstream for Salesforce

Navigating to the full screen version of Jetstream:

`/jetstream/JetstreamApp.app`
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<AppMenu xmlns="http://soap.sforce.com/2006/04/metadata">
<appMenuItems>
<name>standard__Platform</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Sales</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Service</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Marketing</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__ServiceConsole</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__AppLauncher</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Community</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Sites</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Chatter</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Content</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__LightningSales</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__AllTabSet</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>CPQIntegrationUserApp</name>
<type>ConnectedApp</type>
</appMenuItems>
<appMenuItems>
<name>standard__LightningBolt</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__SalesforceCMS</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__SalesCloudMobile</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Approvals</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__Shield</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>standard__MSJApp</name>
<type>CustomApplication</type>
</appMenuItems>
<appMenuItems>
<name>Jetstream_Canvas</name>
<type>ExternalClientApplication</type>
</appMenuItems>
<appMenuItems>
<name>Jetstream</name>
<type>CustomApplication</type>
</appMenuItems>
</AppMenu>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<brand>
<headerColor>#111727</headerColor>
<logo>jetstreamiconpro128</logo>
<logoVersion>1</logoVersion>
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
</brand>
<formFactors>Large</formFactors>
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
<label>Jetstream</label>
<navType>Standard</navType>
<tabs>JetstreamAppTab</tabs>
<uiType>Lightning</uiType>
</CustomApplication>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
public with sharing class JetstreamPageController {
public String getCanvasParameters {
get {
Boolean isFullScreen = true;
// This does not cover all cases, but does cover cases where the VFP is embedded in a Lightning page/tab
String tabId = ApexPages.currentPage().getParameters().get('sfdc.tabName');
if (String.isNotBlank(tabId)) {
isFullScreen = false;
}
Map<String, Object> params = new Map<String, Object>{ 'isFullScreen' => isFullScreen };
return JSON.serialize(params);
}
private set;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Loading
Loading