qfpm 1.1.2 → 1.1.4
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 +14 -4
- package/package.json +1 -1
- package/src/build.sh +1 -1
- package/src/deploy.sh +2 -1
- package/src/isqfpm.js +4 -1
- package/src/isscratched.js +1 -1
- package/src/push.sh +1 -1
- package/src/removedepends.sh +1 -1
- package/src/scratch.sh +2 -2
- package/src/setup.sh +6 -1
- package/src/test.sh +1 -1
- package/.forceignore +0 -8
- package/sfdx-project.json +0 -11
package/README.md
CHANGED
|
@@ -15,11 +15,9 @@ The package mangement methodology intended with qfpm is meant to aid with the de
|
|
|
15
15
|
|
|
16
16
|
- Updated the commands for the new sf structure
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- Fixed install not deploying dependancies
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
- WSL support seems to be working though with a big salesforce asterisk down in the AT4DX example
|
|
20
|
+
- Updated github workflow for tests
|
|
23
21
|
|
|
24
22
|
## Install
|
|
25
23
|
|
|
@@ -37,6 +35,10 @@ The package mangement methodology intended with qfpm is meant to aid with the de
|
|
|
37
35
|
```bash
|
|
38
36
|
npm install qfpm --save --only=prod
|
|
39
37
|
```
|
|
38
|
+
1. Approve the qfpm tools to use scripts with*
|
|
39
|
+
```bash
|
|
40
|
+
npm approve-scripts qfpm
|
|
41
|
+
```
|
|
40
42
|
1. Run setup to create scratch org and deploy dependancies
|
|
41
43
|
```bash
|
|
42
44
|
npm run setup
|
|
@@ -69,6 +71,10 @@ This example demonstates facilitating two layers of dependancies required to get
|
|
|
69
71
|
```bash
|
|
70
72
|
npm install --save qfpm
|
|
71
73
|
```
|
|
74
|
+
1. Approve the qfpm tools to use scripts with*
|
|
75
|
+
```bash
|
|
76
|
+
npm approve-scripts qfpm
|
|
77
|
+
```
|
|
72
78
|
1. install the the fflib commons
|
|
73
79
|
```bash
|
|
74
80
|
npm install --save npm-fflib-common
|
|
@@ -100,6 +106,10 @@ This example expands on the previous fflib sample code to satisfy the requirment
|
|
|
100
106
|
```bash
|
|
101
107
|
npm install --save qfpm
|
|
102
108
|
```
|
|
109
|
+
1. Approve the qfpm tools to use scripts with*
|
|
110
|
+
```bash
|
|
111
|
+
npm approve-scripts qfpm
|
|
112
|
+
```
|
|
103
113
|
1. install the at4dx libraries
|
|
104
114
|
```bash
|
|
105
115
|
npm install --save npm-at4dx
|
package/package.json
CHANGED
package/src/build.sh
CHANGED
|
@@ -12,5 +12,5 @@ if [ "$DXPM_CURRENT_PACKAGE_NAME" = "" ]; then
|
|
|
12
12
|
DXPM_CURRENT_PACKAGE_NAME="$($DXPM_NODE_MOD/.bin/qgetprojectname)"
|
|
13
13
|
fi
|
|
14
14
|
echo "[+] converting source for $DXPM_CURRENT_PACKAGE_NAME"
|
|
15
|
-
sf
|
|
15
|
+
sf project convert source -x "./manifest" -n "$DXPM_CURRENT_PACKAGE_NAME" -p "$($DXPM_NODE_MOD/.bin/qgetsrcfolders)" && wait
|
|
16
16
|
echo "[+] finished converting source for $DXPM_CURRENT_PACKAGE_NAME"
|
package/src/deploy.sh
CHANGED
|
@@ -16,5 +16,6 @@ if [ "$DXPM_CURRENT_PACKAGE_NAME" = "" ]; then
|
|
|
16
16
|
fi
|
|
17
17
|
echo "[+] deploying $DXPM_CURRENT_PACKAGE_NAME metadata to scratch org $DXPM_SETUP_PACKAGE_NAME"
|
|
18
18
|
#todo: read package.json for all folder locations
|
|
19
|
-
sf
|
|
19
|
+
sf project deploy start -d "$($DXPM_NODE_MOD/.bin/qgetsrcfolders)" -o "$DXPM_SETUP_PACKAGE_NAME" --ignore-conflicts && wait
|
|
20
|
+
sf project reset tracking -0 "$DXPM_SETUP_PACKAGE_NAME" && wait
|
|
20
21
|
echo "[+] finished deploying $DXPM_CURRENT_PACKAGE_NAME metadata to scratch org $DXPM_SETUP_PACKAGE_NAME"
|
package/src/isqfpm.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
2
|
+
var location
|
|
3
|
+
if(process.argv[2]==undefined) location=process.cwd()
|
|
4
|
+
else location=process.argv[2]
|
|
5
|
+
var packageJSON = require('fs').readFileSync(location+'/package.json')
|
|
3
6
|
var pack = JSON.parse(packageJSON)
|
|
4
7
|
if(pack['dependencies']!==undefined){
|
|
5
8
|
if(pack['dependencies'].hasOwnProperty('qfpm')) process.exit()
|
package/src/isscratched.js
CHANGED
|
@@ -5,7 +5,7 @@ if(process.argv[2]==undefined){
|
|
|
5
5
|
var pack = JSON.parse(packageJSON)
|
|
6
6
|
scratchName=pack.name
|
|
7
7
|
}else scratchName=process.argv[2]
|
|
8
|
-
var orgsJSON = require('child_process').execSync('sf
|
|
8
|
+
var orgsJSON = require('child_process').execSync('sf org list --json')
|
|
9
9
|
var orgs = JSON.parse(orgsJSON).result
|
|
10
10
|
orgs.scratchOrgs.forEach(org => {
|
|
11
11
|
if(org.alias==scratchName) process.exit()
|
package/src/push.sh
CHANGED
|
@@ -11,5 +11,5 @@ if [ "$DXPM_SETUP_PACKAGE_NAME" = "" ]; then
|
|
|
11
11
|
DXPM_SETUP_PACKAGE_NAME="$($DXPM_NODE_MOD/.bin/qgetprojectname)"
|
|
12
12
|
fi
|
|
13
13
|
echo "[+] pushing source to scratch org $DXPM_SETUP_PACKAGE_NAME"
|
|
14
|
-
sf
|
|
14
|
+
sf project deploy start -o "$DXPM_SETUP_PACKAGE_NAME" --ignore-conflicts && wait
|
|
15
15
|
echo "[+] finished pushing source to scratch org $DXPM_SETUP_PACKAGE_NAME"
|
package/src/removedepends.sh
CHANGED
|
@@ -9,5 +9,5 @@ fi
|
|
|
9
9
|
folders="$(find $DXPM_NODE_MOD/ -name sfdx-project.json)"
|
|
10
10
|
folders="$(echo $folders | sed 's/\/sfdx-project.json//g')"
|
|
11
11
|
for val in $folders; do
|
|
12
|
-
|
|
12
|
+
$DXPM_NODE_MOD/.bin/qisqfpm "$val" && npm approve-scripts $(basename "$val") && rm -fr $val
|
|
13
13
|
done
|
package/src/scratch.sh
CHANGED
|
@@ -11,8 +11,8 @@ if [ "$DXPM_SETUP_PACKAGE_NAME" = "" ]; then
|
|
|
11
11
|
DXPM_SETUP_PACKAGE_NAME="$($DXPM_NODE_MOD/.bin/qgetprojectname)"
|
|
12
12
|
fi
|
|
13
13
|
echo "[+] setting up scratch org $DXPM_SETUP_PACKAGE_NAME"
|
|
14
|
-
sf
|
|
14
|
+
sf org create scratch -f $PWD/config/project-scratch-def.json -a "$DXPM_SETUP_PACKAGE_NAME" -d -y 1 && wait
|
|
15
15
|
echo "[+] finished setting up scratch org $DXPM_SETUP_PACKAGE_NAME"
|
|
16
16
|
echo "[+] setting scratch org $DXPM_SETUP_PACKAGE_NAME as default locally"
|
|
17
|
-
sf
|
|
17
|
+
sf config set target-org $DXPM_SETUP_PACKAGE_NAME
|
|
18
18
|
echo "[+] finished setting scratch org $DXPM_SETUP_PACKAGE_NAME as default username locally"
|
package/src/setup.sh
CHANGED
|
@@ -5,8 +5,13 @@ export DXPM_SETUP_PACKAGE_NAME="$($DXPM_NODE_MOD/.bin/qgetprojectname)"
|
|
|
5
5
|
export DXPM_CURRENT_PACKAGE_NAME="$DXPM_SETUP_PACKAGE_NAME"
|
|
6
6
|
echo "[+] checking if $DXPM_SETUP_PACKAGE_NAME scrach org exists or creating it"
|
|
7
7
|
$DXPM_NODE_MOD/.bin/qisscratched || $DXPM_NODE_MOD/.bin/qscratch && wait
|
|
8
|
+
if [ "$DXPM_SETUP_PACKAGE_NAME" = "$DXPM_CURRENT_PACKAGE_NAME" ]; then
|
|
9
|
+
echo "[+] removing dependancies for $DXPM_CURRENT_PACKAGE_NAME to force reinstall"
|
|
10
|
+
$DXPM_NODE_MOD/.bin/qremovedepends
|
|
11
|
+
echo "[+] finished removing dependancies for $DXPM_CURRENT_PACKAGE_NAME"
|
|
12
|
+
fi
|
|
8
13
|
echo "[+] installing package $DXPM_SETUP_PACKAGE_NAME"
|
|
9
|
-
npm install --
|
|
14
|
+
npm install --omit=dev && wait
|
|
10
15
|
echo "[+] finished installing package $DXPM_SETUP_PACKAGE_NAME"
|
|
11
16
|
export DXPM_CURRENT_PACKAGE_NAME=""
|
|
12
17
|
export DXPM_SETUP_PACKAGE_NAME=""
|
package/src/test.sh
CHANGED
|
@@ -11,5 +11,5 @@ if [ "$DXPM_SETUP_PACKAGE_NAME" = "" ]; then
|
|
|
11
11
|
DXPM_SETUP_PACKAGE_NAME="$($DXPM_NODE_MOD/.bin/qgetprojectname)"
|
|
12
12
|
fi
|
|
13
13
|
echo "[+] running tests for $DXPM_SETUP_PACKAGE_NAME"
|
|
14
|
-
sf
|
|
14
|
+
sf apex run test -l RunLocalTests -d ./test_results -r json -o "$DXPM_SETUP_PACKAGE_NAME" -w 5 && wait
|
|
15
15
|
echo "[+] finished running tests for $DXPM_SETUP_PACKAGE_NAME"
|
package/.forceignore
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
|
|
2
|
-
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
package.xml
|
|
6
|
-
bin/
|
|
7
|
-
etc/
|
|
8
|
-
src/
|