vidup 1.0.20 → 1.0.21
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/dist/bin/cli.js +2 -3
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/index.js +1 -1
- package/dist/{lib-Ddx3eQbF.js → lib-vuAW453K.js} +6 -11
- package/package.json +16 -16
- package/readme.md +2 -2
package/dist/bin/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as version, n as stripVideoMetadataInDirectory, r as setLogger, t as syncVideoInDirectory } from "../lib-
|
|
2
|
+
import { i as version, n as stripVideoMetadataInDirectory, r as setLogger, t as syncVideoInDirectory } from "../lib-vuAW453K.js";
|
|
3
3
|
import { log, setDefaultLogOptions } from "lognow";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import prettyMilliseconds from "pretty-ms";
|
|
@@ -7,7 +7,7 @@ import untildify from "untildify";
|
|
|
7
7
|
import yargs from "yargs";
|
|
8
8
|
import { hideBin } from "yargs/helpers";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/bin/cli.ts
|
|
11
11
|
setLogger(log);
|
|
12
12
|
const startTime = performance.now();
|
|
13
13
|
const yargsInstance = yargs(hideBin(process.argv));
|
|
@@ -82,5 +82,4 @@ await yargsInstance.scriptName("vidup").usage("$0 [command]", "Run a vidup comma
|
|
|
82
82
|
process.exitCode = 0;
|
|
83
83
|
}).demandCommand(1).alias("h", "help").version(version).alias("v", "version").help().wrap(process.stdout.isTTY ? Math.min(120, yargsInstance.terminalWidth()) : 0).parse();
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { };
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ILogBasic, ILogLayer } from "lognow";
|
|
2
|
-
//#region src/lib/log.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Set the logger instance for the library. Library consumers can call this to
|
|
5
4
|
* inject their own logger. Calling it with no argument silences the library.
|
|
@@ -8,8 +7,6 @@ import { ILogBasic, ILogLayer } from "lognow";
|
|
|
8
7
|
* Stream-like log target
|
|
9
8
|
*/
|
|
10
9
|
export declare function setLogger(logger?: ILogBasic | ILogLayer<unknown>): void;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/lib/strip.d.ts
|
|
13
10
|
type StripOptions = {
|
|
14
11
|
dryRun?: boolean;
|
|
15
12
|
};
|
|
@@ -19,8 +16,6 @@ type StripOptions = {
|
|
|
19
16
|
* @returns List of file paths with metadata that were stripped
|
|
20
17
|
*/
|
|
21
18
|
export declare function stripVideoMetadataInDirectory(directory: string, options?: StripOptions): Promise<string[]>;
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/lib/sync.d.ts
|
|
24
19
|
type Service = 'bunny' | 'cloudflare' | 'mux';
|
|
25
20
|
type SyncReport = Array<{
|
|
26
21
|
action: 'Create' | 'Delete' | 'None' | 'Update';
|
|
@@ -44,5 +39,4 @@ type SyncOptions = {
|
|
|
44
39
|
* change if a dry run)
|
|
45
40
|
*/
|
|
46
41
|
export declare function syncVideoInDirectory(directory: string, options: SyncOptions): Promise<SyncReport>;
|
|
47
|
-
//#endregion
|
|
48
42
|
export type { Service, StripOptions, SyncOptions, SyncReport };
|
package/dist/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as stripVideoMetadataInDirectory, r as setLogger, t as syncVideoInDirectory } from "../lib-
|
|
1
|
+
import { n as stripVideoMetadataInDirectory, r as setLogger, t as syncVideoInDirectory } from "../lib-vuAW453K.js";
|
|
2
2
|
|
|
3
3
|
export { setLogger, stripVideoMetadataInDirectory, syncVideoInDirectory };
|
|
@@ -9,12 +9,11 @@ import { JSONFilePreset } from "lowdb/node";
|
|
|
9
9
|
import { createReadStream } from "node:fs";
|
|
10
10
|
import { oraPromise } from "ora";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// package.json
|
|
13
13
|
var name = "vidup";
|
|
14
|
-
var version = "1.0.
|
|
14
|
+
var version = "1.0.21";
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
//#region src/lib/log.ts
|
|
16
|
+
// src/lib/log.ts
|
|
18
17
|
/**
|
|
19
18
|
* The default logger instance for the library.
|
|
20
19
|
*/
|
|
@@ -30,8 +29,7 @@ function setLogger(logger) {
|
|
|
30
29
|
log$1 = injectionHelper(logger);
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
//#region src/lib/utilities/video.ts
|
|
32
|
+
// src/lib/utilities/video.ts
|
|
35
33
|
/**
|
|
36
34
|
* List the video files directly inside a directory. Matches by extension (.mp4,
|
|
37
35
|
* .mov, .avi, .mkv) and does not recurse into subdirectories.
|
|
@@ -97,8 +95,7 @@ async function stripVideoMetadata(filename) {
|
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
|
|
101
|
-
//#region src/lib/strip.ts
|
|
98
|
+
// src/lib/strip.ts
|
|
102
99
|
/**
|
|
103
100
|
* Strip metadata from video files in a directory
|
|
104
101
|
*
|
|
@@ -126,8 +123,7 @@ async function stripVideoMetadataInFiles(files, options = {}) {
|
|
|
126
123
|
return localVideosWithMetadata;
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
//#region src/lib/sync.ts
|
|
126
|
+
// src/lib/sync.ts
|
|
131
127
|
/**
|
|
132
128
|
* Synchronize a remote streaming service to mirror the contents of a local
|
|
133
129
|
* directory
|
|
@@ -247,5 +243,4 @@ async function withSpinner(promise, text) {
|
|
|
247
243
|
});
|
|
248
244
|
}
|
|
249
245
|
|
|
250
|
-
//#endregion
|
|
251
246
|
export { version as i, stripVideoMetadataInDirectory as n, setLogger as r, syncVideoInDirectory as t };
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vidup",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "Synchronize a local directory of video files to remote streaming services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bunnycdn-stream",
|
|
7
7
|
"bunnycdn",
|
|
8
8
|
"cli",
|
|
9
|
+
"homebrew-formula",
|
|
9
10
|
"npm-package",
|
|
10
11
|
"sync",
|
|
11
12
|
"upload",
|
|
@@ -38,43 +39,42 @@
|
|
|
38
39
|
"vidup": "dist/bin/cli.js"
|
|
39
40
|
},
|
|
40
41
|
"files": [
|
|
41
|
-
"dist
|
|
42
|
+
"dist"
|
|
42
43
|
],
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@types/yargs": "^17.0.35",
|
|
45
46
|
"bunnycdn-stream": "^2.5.5",
|
|
46
|
-
"execa": "^10.
|
|
47
|
+
"execa": "^10.2.1",
|
|
47
48
|
"ffmpeg-static": "^5.3.0",
|
|
48
49
|
"hasha": "^7.0.0",
|
|
49
|
-
"lognow": "^0.8.
|
|
50
|
+
"lognow": "^0.8.7",
|
|
50
51
|
"lowdb": "^7.0.1",
|
|
51
|
-
"ora": "^
|
|
52
|
-
"pretty-ms": "^
|
|
52
|
+
"ora": "^10.0.0",
|
|
53
|
+
"pretty-ms": "^10.0.0",
|
|
53
54
|
"untildify": "^6.0.0",
|
|
54
55
|
"yargs": "^18.2.0"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@arethetypeswrong/core": "^0.18.5",
|
|
58
|
-
"@kitschpatrol/shared-config": "^8.
|
|
59
|
-
"@types/node": "~24.13.
|
|
59
|
+
"@kitschpatrol/shared-config": "^8.14.0",
|
|
60
|
+
"@types/node": "~24.13.6",
|
|
60
61
|
"brewpub": "^0.5.0",
|
|
61
62
|
"bumpp": "^12.3.0",
|
|
62
|
-
"mdat-plugin-cli-help": "^3.4.
|
|
63
|
+
"mdat-plugin-cli-help": "^3.4.1",
|
|
63
64
|
"publint": "^0.3.25",
|
|
64
65
|
"shx": "^0.4.0",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"vitest": "^5.0.3"
|
|
66
|
+
"tsdown": "^0.23.4",
|
|
67
|
+
"typescript": "~6.0.3",
|
|
68
|
+
"vitest": "^5.0.5"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": "^24.16.0 || >=26.3.0"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "tsdown",
|
|
75
|
-
"clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX
|
|
76
|
-
"fix": "ksc fix",
|
|
77
|
-
"lint": "ksc lint",
|
|
75
|
+
"clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX",
|
|
76
|
+
"fix": "pnpm build && ksc fix",
|
|
77
|
+
"lint": "pnpm build && ksc lint",
|
|
78
78
|
"release": "bumpp --commit 'Release: %s' && pnpm build && pnpm publish --otp $(op item get npm --otp) && brewpub --tap kitschpatrol/tap",
|
|
79
79
|
"test": "vitest run"
|
|
80
80
|
}
|
package/readme.md
CHANGED
|
@@ -86,7 +86,7 @@ Vidup treats local videos' file names as keys, and will look for a file with the
|
|
|
86
86
|
|
|
87
87
|
Any video files present in the local folder that aren't matched to a video on the remote service will be uploaded.
|
|
88
88
|
|
|
89
|
-
If you change the name of a local video file, the remote video with the previous name will be deleted, and a new remote video (with a
|
|
89
|
+
If you change the name of a local video file, the remote video with the previous name will be deleted, and a new remote video (with a new GUID) will be created.
|
|
90
90
|
|
|
91
91
|
Vidup tracks the content hash of each local video. If you replace a local video file with another of the same name, the change in content will be detected and the remote video will be updated.
|
|
92
92
|
(_Note that this is currently equivalent to deleting / creating a new remote video since Bunny.net doesn't support in-place video updates. The GUID will change, so you'll need to update any embeds accordingly._)
|
|
@@ -199,7 +199,7 @@ A `stripVideoMetadataInDirectory` function is also exported, which will remove m
|
|
|
199
199
|
```ts
|
|
200
200
|
async function stripVideoMetadataInDirectory(
|
|
201
201
|
directory: string,
|
|
202
|
-
options
|
|
202
|
+
options?: {
|
|
203
203
|
dryRun?: boolean // Defaults to false
|
|
204
204
|
},
|
|
205
205
|
): Promise<string[]>
|