qfpm 1.1.1 → 1.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.
- package/.forceignore +8 -0
- package/CONTRIBUTING.md +9 -0
- package/README.md +13 -6
- package/SECURITY.md +4 -0
- package/package.json +1 -1
- package/sfdx-project.json +11 -0
- package/src/build.sh +1 -1
- package/src/clean.sh +1 -1
- package/src/deploy.sh +1 -1
- package/src/isscratched.js +1 -1
- package/src/push.sh +1 -1
- package/src/scratch.sh +2 -2
- package/src/test.sh +1 -1
package/.forceignore
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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/
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CONTRIBUTING
|
|
2
|
+
|
|
3
|
+
If I was to update this I'd likely re-write it into javascript and possibly a sfdx plugin, but if one does want to contribute to this in its frankenstien bash javascript form.
|
|
4
|
+
|
|
5
|
+
1. Clone
|
|
6
|
+
2. Edit
|
|
7
|
+
3. Submit Pull Request
|
|
8
|
+
4. Wait untill it is looked at it
|
|
9
|
+
5. Repeat as needed
|
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/qfpm)
|
|
2
|
+
[](https://npmjs.org/package/qfpm)
|
|
3
|
+

|
|
4
|
+
[](https://snyk.io/advisor/npm-package/qfpm)
|
|
5
|
+
[](https://raw.githubusercontent.com/gussamer/qfpm/master/LICENSE)
|
|
1
6
|
# QFPM
|
|
2
7
|
|
|
3
8
|
## QRFDev Package Manager
|
|
@@ -8,6 +13,8 @@ The package mangement methodology intended with qfpm is meant to aid with the de
|
|
|
8
13
|
|
|
9
14
|
## Updates
|
|
10
15
|
|
|
16
|
+
- Updated the commands for the new sf structure
|
|
17
|
+
|
|
11
18
|
- The removal of the bin/qfpm script dependancy complete, automated removal doesn't seem to work so feel free to delete them after upgrading
|
|
12
19
|
|
|
13
20
|
- Conversion to using native npm bin definition seems stable and opens up better linux support
|
|
@@ -20,7 +27,7 @@ The package mangement methodology intended with qfpm is meant to aid with the de
|
|
|
20
27
|
1. Navigate to folder you want your project
|
|
21
28
|
1. Create a SFDX project with
|
|
22
29
|
```bash
|
|
23
|
-
|
|
30
|
+
sf force project create -n newsfdxproject
|
|
24
31
|
```
|
|
25
32
|
1. Move into the project folder with
|
|
26
33
|
```bash
|
|
@@ -35,7 +42,7 @@ The package mangement methodology intended with qfpm is meant to aid with the de
|
|
|
35
42
|
npm run setup
|
|
36
43
|
```
|
|
37
44
|
|
|
38
|
-
\*
|
|
45
|
+
\* all warnings are due to packages salesforce uses in their default project package.json
|
|
39
46
|
|
|
40
47
|
## Use
|
|
41
48
|
|
|
@@ -54,9 +61,9 @@ This example demonstates facilitating two layers of dependancies required to get
|
|
|
54
61
|
```bash
|
|
55
62
|
cd fflib-apex-common-samplecode
|
|
56
63
|
```
|
|
57
|
-
1. init npm
|
|
64
|
+
1. init npm to create package.json
|
|
58
65
|
```bash
|
|
59
|
-
npm init
|
|
66
|
+
npm init -y
|
|
60
67
|
```
|
|
61
68
|
1. install the qfpm tools
|
|
62
69
|
```bash
|
|
@@ -85,9 +92,9 @@ This example expands on the previous fflib sample code to satisfy the requirment
|
|
|
85
92
|
```bash
|
|
86
93
|
cd at4dx-samplecode
|
|
87
94
|
```
|
|
88
|
-
1. init npm
|
|
95
|
+
1. init npm to create package.json
|
|
89
96
|
```bash
|
|
90
|
-
npm init
|
|
97
|
+
npm init -y
|
|
91
98
|
```
|
|
92
99
|
1. install the qfpm tools
|
|
93
100
|
```bash
|
package/SECURITY.md
ADDED
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
|
-
|
|
15
|
+
sf force source convert -d "./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/clean.sh
CHANGED
|
@@ -12,5 +12,5 @@ if [ "$DXPM_SETUP_PACKAGE_NAME" = "" ]; then
|
|
|
12
12
|
DXPM_SETUP_PACKAGE_NAME="$($DXPM_NODE_MOD/.bin/qgetprojectname)"
|
|
13
13
|
fi
|
|
14
14
|
echo "[+] checking if $DXPM_SETUP_PACKAGE_NAME scrach org exists and deleting it"
|
|
15
|
-
$DXPM_NODE_MOD/.bin/qisscratched &&
|
|
15
|
+
$DXPM_NODE_MOD/.bin/qisscratched && sf org delete scratch -o "$DXPM_SETUP_PACKAGE_NAME" -p && wait
|
|
16
16
|
echo "[+] finished cleaning $DXPM_SETUP_PACKAGE_NAME scrach org"
|
package/src/deploy.sh
CHANGED
|
@@ -16,5 +16,5 @@ 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
|
-
|
|
19
|
+
sf force source deploy -p "$($DXPM_NODE_MOD/.bin/qgetsrcfolders)" -w 10 -u "$DXPM_SETUP_PACKAGE_NAME" && wait
|
|
20
20
|
echo "[+] finished deploying $DXPM_CURRENT_PACKAGE_NAME metadata to scratch org $DXPM_SETUP_PACKAGE_NAME"
|
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('
|
|
8
|
+
var orgsJSON = require('child_process').execSync('sf force 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
|
-
|
|
14
|
+
sf force source push -f -w 10 -o "$DXPM_SETUP_PACKAGE_NAME" && wait
|
|
15
15
|
echo "[+] finished pushing source to scratch org $DXPM_SETUP_PACKAGE_NAME"
|
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
|
-
|
|
14
|
+
sf force org create -f $PWD/config/project-scratch-def.json -a "$DXPM_SETUP_PACKAGE_NAME" -d 1 -w 5 && 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
|
-
|
|
17
|
+
sf force 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/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
|
-
|
|
14
|
+
sf force apex test run -l RunLocalTests -d ./test_results -r json -w 10 -o "$DXPM_SETUP_PACKAGE_NAME" && wait
|
|
15
15
|
echo "[+] finished running tests for $DXPM_SETUP_PACKAGE_NAME"
|