@ds-sfdc/sfparty 1.3.0 → 1.3.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/README.md CHANGED
@@ -46,6 +46,7 @@ sfparty combine
46
46
  -f, --format format to use yaml (default) or json
47
47
  -s, --source package directory path specified in sfdx-project.json
48
48
  -t, --target target path to directory to create yaml/json files
49
+ -g, --git process files based on git commits. This option does not require a value.
49
50
  -h, --help Show help
50
51
  ```
51
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-sfdc/sfparty",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Salesforce metadata XML splitter for CI/CD",
5
5
  "type": "module",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -619,7 +619,16 @@ function getRootPath(packageDir) {
619
619
  let defaultDir
620
620
  if (rootPath) {
621
621
  global.__basedir = fileUtils.fileInfo(rootPath).dirname
622
- let packageJSON = JSON.parse(readFileSync(rootPath))
622
+ let packageJSON
623
+ try {
624
+ packageJSON = JSON.parse(readFileSync(rootPath))
625
+ } catch (error) {
626
+ if (error.message.indexOf('JSON at position') > 0) {
627
+ global.displayError('sfdx-project.json has invalid JSON', true)
628
+ } else {
629
+ global.displayError(error, true)
630
+ }
631
+ }
623
632
  if (Array.isArray(packageJSON.packageDirectories)) {
624
633
  packageJSON.packageDirectories.every(directory => {
625
634
  if (directory.default || packageJSON.packageDirectories.length == 1) defaultDir = directory.path
@@ -57,7 +57,7 @@ export function diff(dir, gitRef = 'HEAD', existsSyncStub = existsSync, execSync
57
57
 
58
58
  let data = ''
59
59
  try {
60
- data = execSyncStub(`git diff --name-status --oneline --relative ${gitRef}`, { cwd: dir }).toString()
60
+ data = execSyncStub(`git diff --name-status --oneline --relative ${gitRef}`, { cwd: dir, maxBuffer: 1024 * 1024 * 10 }).toString()
61
61
  } catch (error) {
62
62
  reject(error)
63
63
  }