replicate-predictions-downloader 2.0.4 → 2.0.6
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/index.js +6 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import https from 'https';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
5
6
|
import archiver from 'archiver';
|
|
6
7
|
import { Command } from 'commander';
|
|
7
8
|
import dotenv from 'dotenv';
|
|
8
9
|
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
|
|
13
|
+
|
|
9
14
|
// Load environment variables
|
|
10
15
|
dotenv.config();
|
|
11
16
|
|
|
@@ -613,7 +618,7 @@ const program = new Command();
|
|
|
613
618
|
program
|
|
614
619
|
.name('replicate-downloader')
|
|
615
620
|
.description('Download and organize Replicate predictions with date filtering')
|
|
616
|
-
.version(
|
|
621
|
+
.version(packageJson.version)
|
|
617
622
|
.option('-s, --since <date>', 'Download predictions created since this date (ISO format, e.g., "2024-01-15" or "2 days ago")')
|
|
618
623
|
.option('-u, --until <date>', 'Download predictions created until this date (ISO format)')
|
|
619
624
|
.option('-l, --last-run', 'Download only predictions created since the last successful run')
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replicate-predictions-downloader",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "A Node.js script to download and organize all your Replicate predictions, including images, metadata, and other outputs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"replicate-downloader": "
|
|
9
|
-
"replicate-predictions-downloader": "
|
|
8
|
+
"replicate-downloader": "index.js",
|
|
9
|
+
"replicate-predictions-downloader": "index.js"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"start": "node index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"node": ">=18.0.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"archiver": "^
|
|
49
|
+
"archiver": "^7.0.1",
|
|
50
50
|
"commander": "^11.0.0",
|
|
51
51
|
"dotenv": "^16.3.1"
|
|
52
52
|
},
|