@naturalcycles/nodejs-lib 15.77.1 → 15.78.0

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.
@@ -14,6 +14,7 @@ declare class Git2 {
14
14
  * @returns true if there are not pushed commits.
15
15
  */
16
16
  isAhead(): boolean;
17
+ fetch(): void;
17
18
  pull(): void;
18
19
  push(): void;
19
20
  getCurrentCommitSha(full?: boolean): string;
package/dist/util/git2.js CHANGED
@@ -54,6 +54,15 @@ class Git2 {
54
54
  // console.log(`gitIsAhead: ${stdout}`)
55
55
  return Number(stdout) > 0;
56
56
  }
57
+ fetch() {
58
+ const cmd = 'git fetch';
59
+ try {
60
+ execSync(cmd, {
61
+ stdio: 'inherit',
62
+ });
63
+ }
64
+ catch { }
65
+ }
57
66
  pull() {
58
67
  const cmd = 'git pull';
59
68
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/nodejs-lib",
3
3
  "type": "module",
4
- "version": "15.77.1",
4
+ "version": "15.78.0",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@types/js-yaml": "^4",
package/src/util/git2.ts CHANGED
@@ -60,6 +60,15 @@ class Git2 {
60
60
  return Number(stdout) > 0
61
61
  }
62
62
 
63
+ fetch(): void {
64
+ const cmd = 'git fetch'
65
+ try {
66
+ execSync(cmd, {
67
+ stdio: 'inherit',
68
+ })
69
+ } catch {}
70
+ }
71
+
63
72
  pull(): void {
64
73
  const cmd = 'git pull'
65
74
  try {