qfpm 1.1.3 → 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 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
- - The removal of the bin/qfpm script dependancy complete, automated removal doesn't seem to work so feel free to delete them after upgrading
18
+ - Fixed install not deploying dependancies
19
19
 
20
- - Conversion to using native npm bin definition seems stable and opens up better linux support
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qfpm",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Salesforce package management tool set for mananging dependencies between packages",
5
5
  "main": "index.js",
6
6
  "man": "./README.md",
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 force source convert -d "./manifest" -n "$DXPM_CURRENT_PACKAGE_NAME" -p "$($DXPM_NODE_MOD/.bin/qgetsrcfolders)" && wait
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 force source deploy -p "$($DXPM_NODE_MOD/.bin/qgetsrcfolders)" -w 10 -u "$DXPM_SETUP_PACKAGE_NAME" && wait
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"
@@ -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 force org list --json')
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 force source push -f -w 10 -o "$DXPM_SETUP_PACKAGE_NAME" && wait
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"
@@ -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
- $DXPM_NODE_MOD/.bin/qisqfpm "$val" && rm -fr $val
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 force org create -f $PWD/config/project-scratch-def.json -a "$DXPM_SETUP_PACKAGE_NAME" -d 1 -w 6 && wait
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 force config set target-org $DXPM_SETUP_PACKAGE_NAME
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,6 +5,11 @@ 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
14
  npm install --omit=dev && wait
10
15
  echo "[+] finished installing package $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 force apex test run -l RunLocalTests -d ./test_results -r json -w 10 -o "$DXPM_SETUP_PACKAGE_NAME" && wait
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/
package/sfdx-project.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "packageDirectories": [
3
- {
4
- "path": "test",
5
- "default": true
6
- }
7
- ],
8
- "namespace": "",
9
- "sfdcLoginUrl": "https://login.salesforce.com",
10
- "sourceApiVersion": "55.0"
11
- }