git-ripper 1.4.8 → 1.4.10
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 +1 -1
- package/src/archiver.js +2 -2
- package/src/downloader.js +5 -4
- package/src/index.js +4 -3
- package/src/resumeManager.js +8 -5
package/package.json
CHANGED
package/src/archiver.js
CHANGED
package/src/downloader.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { dirname } from "node:path";
|
|
6
7
|
import cliProgress from "cli-progress";
|
|
7
8
|
import pLimit from "p-limit";
|
|
8
9
|
import chalk from "chalk";
|
package/src/index.js
CHANGED
|
@@ -3,9 +3,10 @@ import { parseGitHubUrl } from "./parser.js";
|
|
|
3
3
|
import { downloadFolder, downloadFolderWithResume } from "./downloader.js";
|
|
4
4
|
import { downloadAndArchive } from "./archiver.js";
|
|
5
5
|
import { ResumeManager } from "./resumeManager.js";
|
|
6
|
-
import { fileURLToPath } from "url";
|
|
7
|
-
import { dirname, join, resolve } from "path";
|
|
8
|
-
import fs from "fs";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { dirname, join, resolve } from "node:path";
|
|
8
|
+
import fs from "node:fs";
|
|
9
|
+
import process from "node:process";
|
|
9
10
|
import chalk from "chalk";
|
|
10
11
|
|
|
11
12
|
// Get package.json for version
|
package/src/resumeManager.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import crypto from "crypto";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
import { dirname } from "path";
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import crypto from "node:crypto";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { dirname } from "node:path";
|
|
6
6
|
|
|
7
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
8
|
const __dirname = dirname(__filename);
|
|
@@ -143,6 +143,9 @@ export class ResumeManager {
|
|
|
143
143
|
if (fs.existsSync(checkpointFile)) {
|
|
144
144
|
try {
|
|
145
145
|
fs.unlinkSync(checkpointFile);
|
|
146
|
+
if (fs.readdirSync(this.checkpointDir).length === 0) {
|
|
147
|
+
fs.rmdirSync(this.checkpointDir);
|
|
148
|
+
}
|
|
146
149
|
} catch (error) {
|
|
147
150
|
console.error(`Failed to cleanup checkpoint: ${error.message}`);
|
|
148
151
|
}
|