@ds-sfdc/sfparty 1.4.3 → 1.4.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/{pre-commit → .husky/pre-commit} +0 -0
- package/package.json +62 -62
- package/src/index.js +17 -1
- package/src/lib/checkVersion.js +10 -10
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
2
|
+
"name": "@ds-sfdc/sfparty",
|
|
3
|
+
"version": "1.4.4",
|
|
4
|
+
"description": "Salesforce metadata XML splitter for CI/CD",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/TimPaulaskasDS/sfparty.git"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"sfparty": "src/index.js"
|
|
12
|
+
},
|
|
13
|
+
"main": "src/index.js",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "jest",
|
|
16
|
+
"_postinstall": "husky install",
|
|
17
|
+
"prepack": "pinst --disable",
|
|
18
|
+
"postpack": "pinst --enable"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"salesforce,metadata,xml,split,yaml,json"
|
|
22
|
+
],
|
|
23
|
+
"author": "Tim Paulaskas",
|
|
24
|
+
"license": "BSD-3-Clause",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"axios": "^1.2.2",
|
|
27
|
+
"cli-color": "^2.0.3",
|
|
28
|
+
"cli-spinners": "^2.7.0",
|
|
29
|
+
"convert-hrtime": "^5.0.0",
|
|
30
|
+
"js-yaml": "^4.1.0",
|
|
31
|
+
"log-update": "^5.0.1",
|
|
32
|
+
"marked": "^4.2.12",
|
|
33
|
+
"marked-terminal": "^5.1.1",
|
|
34
|
+
"pinst": "^3.0.0",
|
|
35
|
+
"pretty-quick": "^3.1.3",
|
|
36
|
+
"semver": "^7.3.8",
|
|
37
|
+
"util": "^0.10.3",
|
|
38
|
+
"winston": "^3.8.2",
|
|
39
|
+
"xml2js": "^0.4.23",
|
|
40
|
+
"yargs": "^17.6.2"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@babel/core": "^7.20.12",
|
|
44
|
+
"@babel/preset-env": "^7.20.2",
|
|
45
|
+
"@commitlint/cli": "^17.4.0",
|
|
46
|
+
"@commitlint/config-conventional": "^17.4.0",
|
|
47
|
+
"babel-jest": "^29.3.1",
|
|
48
|
+
"husky": "^8.0.3",
|
|
49
|
+
"jest": "^29.3.1",
|
|
50
|
+
"nodemon": "^2.0.20",
|
|
51
|
+
"prettier": "^2.8.3"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=0.11"
|
|
55
|
+
},
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/TimPaulaskasDS/sfparty/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/TimPaulaskasDS/sfparty#readme",
|
|
60
|
+
"directories": {
|
|
61
|
+
"lib": "lib",
|
|
62
|
+
"test": "tests"
|
|
63
|
+
}
|
|
64
64
|
}
|
package/src/index.js
CHANGED
|
@@ -350,7 +350,11 @@ function yargCheck(argv, options) {
|
|
|
350
350
|
!options.array.includes(key),
|
|
351
351
|
)
|
|
352
352
|
|
|
353
|
-
if (
|
|
353
|
+
if (
|
|
354
|
+
!argv._.includes('update') &&
|
|
355
|
+
!argv._.includes('combine') &&
|
|
356
|
+
!argv._.includes('split')
|
|
357
|
+
) {
|
|
354
358
|
checkVersion({
|
|
355
359
|
axios,
|
|
356
360
|
spawnSync,
|
|
@@ -452,6 +456,12 @@ function splitHandler(argv, startTime) {
|
|
|
452
456
|
let message = `Split completed in `
|
|
453
457
|
displayMessageAndDuration(startTime, message)
|
|
454
458
|
}
|
|
459
|
+
checkVersion({
|
|
460
|
+
axios,
|
|
461
|
+
spawnSync,
|
|
462
|
+
currentVersion: pkgObj.version,
|
|
463
|
+
update: false,
|
|
464
|
+
})
|
|
455
465
|
}
|
|
456
466
|
})
|
|
457
467
|
}
|
|
@@ -601,6 +611,12 @@ function combineHandler(argv, startTime) {
|
|
|
601
611
|
let message = `Split completed in `
|
|
602
612
|
displayMessageAndDuration(startTime, message)
|
|
603
613
|
}
|
|
614
|
+
checkVersion({
|
|
615
|
+
axios,
|
|
616
|
+
spawnSync,
|
|
617
|
+
currentVersion: pkgObj.version,
|
|
618
|
+
update: false,
|
|
619
|
+
})
|
|
604
620
|
}
|
|
605
621
|
})
|
|
606
622
|
combine.catch((error) => {
|
package/src/lib/checkVersion.js
CHANGED
|
@@ -28,8 +28,9 @@ export async function checkVersion({
|
|
|
28
28
|
currentVersion,
|
|
29
29
|
update = false,
|
|
30
30
|
}) {
|
|
31
|
+
let result
|
|
31
32
|
try {
|
|
32
|
-
|
|
33
|
+
let { data } = await axios.get(
|
|
33
34
|
'https://registry.npmjs.org/@ds-sfdc/sfparty',
|
|
34
35
|
{
|
|
35
36
|
params: {
|
|
@@ -37,9 +38,15 @@ export async function checkVersion({
|
|
|
37
38
|
},
|
|
38
39
|
},
|
|
39
40
|
)
|
|
40
|
-
|
|
41
|
+
result = data
|
|
42
|
+
} catch (error) {
|
|
43
|
+
// do not display errors
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (result !== undefined) {
|
|
47
|
+
const latestVersion = result['dist-tags'].latest
|
|
41
48
|
if (semver.gt(latestVersion, currentVersion)) {
|
|
42
|
-
const version = clc.bgMagenta(
|
|
49
|
+
const version = clc.bgMagenta(result['dist-tags'].latest)
|
|
43
50
|
const icon = update ? global.icons.working : global.icons.fail
|
|
44
51
|
console.log()
|
|
45
52
|
console.log(`${icon} A newer version ${version} is available.`)
|
|
@@ -85,12 +92,5 @@ export async function checkVersion({
|
|
|
85
92
|
}
|
|
86
93
|
return 'You are on the latest version'
|
|
87
94
|
}
|
|
88
|
-
} catch (error) {
|
|
89
|
-
if (error.response && error.response.status === 404) {
|
|
90
|
-
error = new PackageNotFoundError(
|
|
91
|
-
'Package not found on the npm registry',
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
throw error
|
|
95
95
|
}
|
|
96
96
|
}
|