@ds-sfdc/sfparty 1.3.10 → 1.3.11

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
@@ -38,6 +38,10 @@ sfparty split
38
38
  sfparty combine
39
39
  ```
40
40
 
41
+ ### Update
42
+ ```bash
43
+ sfparty update
44
+ ```
41
45
  ### Options
42
46
 
43
47
  ```
@@ -48,6 +52,7 @@ sfparty combine
48
52
  -t, --target target path to directory to create yaml/json files
49
53
  -g, --git combine files based on git commits
50
54
  -h, --help Show help
55
+ -v, --version Show version
51
56
  ```
52
57
 
53
58
  ### Combine Options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-sfdc/sfparty",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "Salesforce metadata XML splitter for CI/CD",
5
5
  "type": "module",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -112,10 +112,15 @@ let errorMessage = clc.red(
112
112
 
113
113
  displayHeader() // display header mast
114
114
 
115
+ let checkYargs = false
116
+
115
117
  yargs(hideBin(process.argv))
116
118
  .command({
117
119
  command: 'help',
118
120
  alias: 'h',
121
+ builder: (yargs) => {
122
+ yargs.check(yargCheck)
123
+ },
119
124
  handler: (argv) => {
120
125
  const data = fs.readFileSync(
121
126
  path.join(process.cwd(), 'README.md'),
@@ -126,6 +131,9 @@ yargs(hideBin(process.argv))
126
131
  })
127
132
  .command({
128
133
  command: '[test]',
134
+ builder: (yargs) => {
135
+ yargs.check(yargCheck)
136
+ },
129
137
  alias: 'test',
130
138
  handler: (argv) => {
131
139
  // THIS IS A PLACE TO TEST NEW CODE
@@ -151,13 +159,6 @@ yargs(hideBin(process.argv))
151
159
  })
152
160
  },
153
161
  })
154
- .command({
155
- command: '[version]',
156
- alias: 'version',
157
- builder: (yargs) => {
158
- yargs.check(yargCheck)
159
- },
160
- })
161
162
  .command({
162
163
  command: '[split]',
163
164
  alias: 'split',
@@ -267,7 +268,16 @@ yargs(hideBin(process.argv))
267
268
  ['$0 combine --type=permset --all'],
268
269
  ['$0 combine --type=permset --name="Permission Set Name"'],
269
270
  ])
270
- .help(false).argv.parse
271
+ .help(false)
272
+ .version(false)
273
+
274
+ if (!checkYargs)
275
+ checkVersion({
276
+ axios,
277
+ spawnSync,
278
+ currentVersion: pkgObj.version,
279
+ update: false,
280
+ })
271
281
 
272
282
  function gitMode({ status, gitRef, lastCommit, latestCommit }) {
273
283
  let statusMessage
@@ -302,6 +312,7 @@ function gitMode({ status, gitRef, lastCommit, latestCommit }) {
302
312
  }
303
313
 
304
314
  function yargCheck(argv, options) {
315
+ checkYargs = true
305
316
  const argvKeys = Object.keys(argv)
306
317
  const invalidKeys = argvKeys.filter(
307
318
  (key) =>