@ds-sfdc/sfparty 1.2.4 → 1.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-sfdc/sfparty",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Salesforce metadata XML splitter for CI/CD",
5
5
  "type": "module",
6
6
  "repository": {
package/sfdx-project.json CHANGED
@@ -7,5 +7,5 @@
7
7
  ],
8
8
  "namespace": "",
9
9
  "sfdcLoginUrl": "https://login.salesforce.com",
10
- "sourceApiVersion": "53.0"
10
+ "sourceApiVersion": "56.0"
11
11
  }
@@ -42,7 +42,7 @@ export function getFiles(dirPath, filter = undefined) {
42
42
  if (!filter) {
43
43
  filesList.push(file)
44
44
  } else {
45
- if (file.endsWith(filter)) {
45
+ if (file.toLocaleLowerCase().endsWith(filter.toLocaleLowerCase())) {
46
46
  filesList.push(file)
47
47
  }
48
48
  }
@@ -49,9 +49,6 @@ export function diff(dir, gitRef) {
49
49
  gitData.forEach((gitRow, index) => {
50
50
  if (gitRow.indexOf('\t') !== -1 &&(index < count || lastIndex + 1 == gitString)) {
51
51
  const file = gitRow.split('\t')
52
- if (file.slice(-1)[0] == 'uthorizationFormConsent.yaml') {
53
- let test = true
54
- }
55
52
  if (file.slice(-1) !== '') {
56
53
  files.push({
57
54
  type: status[(file[0] === file.slice(-1)) ? 'A' : Array.from(file[0])[0]],
@@ -260,7 +260,6 @@ export class Combine {
260
260
  try {
261
261
  that.#json[key] = (rootKey !== undefined) ? result[rootKey][key] : result[key]
262
262
  } catch (error) {
263
- let test = { key: key, rootKey: rootKey, json: result }
264
263
  throw error
265
264
  }
266
265
  }
@@ -1,8 +1,6 @@
1
1
  'use strict'
2
2
 
3
3
  import path from 'path'
4
- import fs from 'fs'
5
- import os from 'os'
6
4
  import { readFile } from 'fs'
7
5
  import { Parser } from 'xml2js'
8
6
  import logUpdate from 'log-update'
@@ -62,8 +60,14 @@ export class Split {
62
60
  throw 'The file path cannot be empty'
63
61
  }
64
62
  this._metaFilePath = value
65
- this.#fileName.fullName = fileUtils.fileInfo(value).filename
66
- this.#fileName.shortName = fileUtils.fileInfo(value).filename.replace(`.${this.#type}-meta.xml`, '')
63
+ let fileName = fileUtils.fileInfo(value).filename
64
+
65
+ // Use actual file name if found so it matches case sensitivity
66
+ let foundFile = fileUtils.getFiles(path.dirname(value), fileName)
67
+ if (foundFile.length > 0) fileName = path.basename(foundFile[0])
68
+
69
+ this.#fileName.shortName = fileName.replace(`.${this.#type}-meta.xml`, '')
70
+ this.#fileName.fullName = fileName
67
71
  }
68
72
 
69
73
  split() {
@@ -305,7 +309,6 @@ function keySort(that, key, json) {
305
309
  return accumulator
306
310
  }, {})
307
311
  } catch (error) {
308
- let test = key
309
312
  throw error
310
313
  }
311
314
  }, json)