@ds-sfdc/sfparty 1.3.10 → 1.3.12
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 +5 -0
- package/package.json +1 -1
- package/src/index.js +21 -8
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
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,18 @@ yargs(hideBin(process.argv))
|
|
|
267
268
|
['$0 combine --type=permset --all'],
|
|
268
269
|
['$0 combine --type=permset --name="Permission Set Name"'],
|
|
269
270
|
])
|
|
270
|
-
.
|
|
271
|
+
.argv()
|
|
272
|
+
.parse()
|
|
273
|
+
.help(false)
|
|
274
|
+
.version(false)
|
|
275
|
+
|
|
276
|
+
if (!checkYargs)
|
|
277
|
+
checkVersion({
|
|
278
|
+
axios,
|
|
279
|
+
spawnSync,
|
|
280
|
+
currentVersion: pkgObj.version,
|
|
281
|
+
update: false,
|
|
282
|
+
})
|
|
271
283
|
|
|
272
284
|
function gitMode({ status, gitRef, lastCommit, latestCommit }) {
|
|
273
285
|
let statusMessage
|
|
@@ -302,6 +314,7 @@ function gitMode({ status, gitRef, lastCommit, latestCommit }) {
|
|
|
302
314
|
}
|
|
303
315
|
|
|
304
316
|
function yargCheck(argv, options) {
|
|
317
|
+
checkYargs = true
|
|
305
318
|
const argvKeys = Object.keys(argv)
|
|
306
319
|
const invalidKeys = argvKeys.filter(
|
|
307
320
|
(key) =>
|