vidup 1.0.17 → 1.0.19
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.d.ts +1 -0
- package/dist/bin/cli.js +85 -2
- package/dist/lib/index.d.ts +20 -21
- package/dist/lib/index.js +3 -256
- package/dist/lib-D5PZ18VU.js +251 -0
- package/package.json +20 -24
- package/readme.md +33 -11
- package/dist/sync-ChGtXZ_b.js +0 -543
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vidup",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "Synchronize a local directory of video files to remote streaming services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bunnycdn-stream",
|
|
@@ -43,42 +43,38 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@types/yargs": "^17.0.35",
|
|
45
45
|
"bunnycdn-stream": "^2.5.5",
|
|
46
|
-
"execa": "^
|
|
46
|
+
"execa": "^10.0.1",
|
|
47
47
|
"ffmpeg-static": "^5.3.0",
|
|
48
48
|
"hasha": "^7.0.0",
|
|
49
|
+
"lognow": "^0.8.4",
|
|
49
50
|
"lowdb": "^7.0.1",
|
|
50
|
-
"ora": "^9.
|
|
51
|
-
"
|
|
52
|
-
"pretty-ms": "^9.3.0",
|
|
51
|
+
"ora": "^9.4.1",
|
|
52
|
+
"pretty-ms": "^9.3.1",
|
|
53
53
|
"untildify": "^6.0.0",
|
|
54
|
-
"yargs": "^18.
|
|
54
|
+
"yargs": "^18.2.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@arethetypeswrong/core": "^0.18.
|
|
58
|
-
"@kitschpatrol/shared-config": "^
|
|
59
|
-
"@types/node": "
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
57
|
+
"@arethetypeswrong/core": "^0.18.5",
|
|
58
|
+
"@kitschpatrol/shared-config": "^8.9.0",
|
|
59
|
+
"@types/node": "~24.13.4",
|
|
60
|
+
"brewpub": "^0.3.0",
|
|
61
|
+
"bumpp": "^12.3.0",
|
|
62
|
+
"mdat-plugin-cli-help": "^3.2.0",
|
|
63
|
+
"publint": "^0.3.24",
|
|
64
|
+
"shx": "^0.4.0",
|
|
65
|
+
"tsdown": "^0.23.0",
|
|
66
|
+
"typescript": "^6.0.3",
|
|
67
|
+
"vitest": "^5.0.1"
|
|
66
68
|
},
|
|
67
69
|
"engines": {
|
|
68
|
-
"node": ">=
|
|
69
|
-
},
|
|
70
|
-
"devEngines": {
|
|
71
|
-
"runtime": {
|
|
72
|
-
"name": "node",
|
|
73
|
-
"version": ">=22.18.0"
|
|
74
|
-
}
|
|
70
|
+
"node": ">=24.16.0"
|
|
75
71
|
},
|
|
76
72
|
"scripts": {
|
|
77
73
|
"build": "tsdown",
|
|
78
|
-
"clean": "
|
|
74
|
+
"clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
|
|
79
75
|
"fix": "ksc fix",
|
|
80
76
|
"lint": "ksc lint",
|
|
81
|
-
"release": "bumpp --commit 'Release: %s' && pnpm
|
|
77
|
+
"release": "bumpp --commit 'Release: %s' && pnpm build && pnpm publish --otp $(op item get npm --otp) && brewpub --tap kitschpatrol/tap",
|
|
82
78
|
"test": "vitest run"
|
|
83
79
|
}
|
|
84
80
|
}
|
package/readme.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<!-- badges -->
|
|
8
8
|
|
|
9
|
-
[](https://npmjs.com/package/vidup)
|
|
10
|
-
[](https://opensource.org/
|
|
9
|
+
[](https://www.npmjs.com/package/vidup)
|
|
10
|
+
[](https://opensource.org/license/mit)
|
|
11
11
|
[](https://github.com/kitschpatrol/vidup/actions/workflows/ci.yml)
|
|
12
12
|
|
|
13
13
|
<!-- /badges -->
|
|
@@ -51,7 +51,13 @@ Or, install locally to access the CLI commands in a single project or to import
|
|
|
51
51
|
npm install vidup
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Or, install globally for access across your system:
|
|
54
|
+
Or, install globally for access across your system with either Homebrew or npm:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
brew install kitschpatrol/tap/vidup
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
_or_
|
|
55
61
|
|
|
56
62
|
```sh
|
|
57
63
|
npm install --global vidup
|
|
@@ -116,7 +122,7 @@ vidup sync <directory> [options]
|
|
|
116
122
|
| `--strip-metadata` | Remove all metadata from the video files before uploading them to the streaming service. Warning: This will modify local videos in-place. | `boolean` | `false` |
|
|
117
123
|
| `--dry-run`<br>`-d` | Perform a dry run without making any changes. Useful for testing and debugging. Pairs well with the `--json` command. | `boolean` | `false` |
|
|
118
124
|
| `--json` | Output the sync report as JSON. | `boolean` | `false` |
|
|
119
|
-
| `--verbose` | Enable verbose logging. All verbose logs
|
|
125
|
+
| `--verbose` | Enable verbose logging. All verbose logs are prefixed with their log level and are printed to `stderr` for ease of redirection. | `boolean` | `false` |
|
|
120
126
|
| `--help`<br>`-h` | Show help | `boolean` | |
|
|
121
127
|
| `--version`<br>`-v` | Show version number | `boolean` | |
|
|
122
128
|
|
|
@@ -165,7 +171,6 @@ async function syncVideoInDirectory(
|
|
|
165
171
|
}
|
|
166
172
|
dryRun?: boolean // Defaults to false
|
|
167
173
|
service: Service
|
|
168
|
-
verbose?: boolean // Defaults to false
|
|
169
174
|
},
|
|
170
175
|
): Promise<SyncReport>
|
|
171
176
|
```
|
|
@@ -173,11 +178,10 @@ async function syncVideoInDirectory(
|
|
|
173
178
|
A `stripVideoMetadataInDirectory` function is also exported, which will remove metadata from all videos in the target directory. It returns a list of video filepaths with metadata:
|
|
174
179
|
|
|
175
180
|
```ts
|
|
176
|
-
|
|
181
|
+
async function stripVideoMetadataInDirectory(
|
|
177
182
|
directory: string,
|
|
178
183
|
options: {
|
|
179
184
|
dryRun?: boolean // Defaults to false
|
|
180
|
-
verbose?: boolean // Defaults to false
|
|
181
185
|
},
|
|
182
186
|
): Promise<string[]>
|
|
183
187
|
```
|
|
@@ -198,6 +202,21 @@ const syncReport = await syncVideoInDirectory(process.cwd(), {
|
|
|
198
202
|
console.log(JSON.stringify(syncReport, undefined, 2))
|
|
199
203
|
```
|
|
200
204
|
|
|
205
|
+
#### Logging
|
|
206
|
+
|
|
207
|
+
Vidup logs progress at the `debug` level and problems at the `warn` and `error` levels via [lognow](https://github.com/kitschpatrol/lognow). By default, only warnings and errors are shown. To see everything, or to route the library's logs into your own logging system, inject a logger:
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
import { setLogger } from 'vidup'
|
|
211
|
+
|
|
212
|
+
// Send all library logs to the console
|
|
213
|
+
setLogger(console)
|
|
214
|
+
|
|
215
|
+
// Or pass any LogLayer instance
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Call `setLogger()` with no argument to silence the library entirely.
|
|
219
|
+
|
|
201
220
|
## Background
|
|
202
221
|
|
|
203
222
|
### Motivation
|
|
@@ -206,7 +225,6 @@ Video streaming providers have slow and clunky web UIs. I'd rather not maintain
|
|
|
206
225
|
|
|
207
226
|
## The future
|
|
208
227
|
|
|
209
|
-
- [ ] Tests
|
|
210
228
|
- [ ] Add [Cosmiconfig](https://github.com/cosmiconfig/cosmiconfig)
|
|
211
229
|
- [ ] Synchronize thumbnails and other metadata
|
|
212
230
|
- [ ] Remote collection / folder support
|
|
@@ -216,7 +234,7 @@ Video streaming providers have slow and clunky web UIs. I'd rather not maintain
|
|
|
216
234
|
|
|
217
235
|
## Maintainers
|
|
218
236
|
|
|
219
|
-
[
|
|
237
|
+
[kitschpatrol](https://github.com/kitschpatrol)
|
|
220
238
|
|
|
221
239
|
## Acknowledgments
|
|
222
240
|
|
|
@@ -226,10 +244,14 @@ Thanks to [@dan-online](https://github.com/dan-online) for his super-helpful [bu
|
|
|
226
244
|
|
|
227
245
|
## Contributing
|
|
228
246
|
|
|
229
|
-
[Issues](https://github.com/kitschpatrol/vidup/issues)
|
|
247
|
+
[Issues](https://github.com/kitschpatrol/vidup/issues) are welcome and appreciated.
|
|
248
|
+
|
|
249
|
+
Please open an issue to discuss changes before submitting a pull request. Unsolicited PRs (especially AI-generated ones) are unlikely to be merged.
|
|
250
|
+
|
|
251
|
+
This repository uses [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config) (via its `ksc` CLI) for linting and formatting, plus [MDAT](https://github.com/kitschpatrol/mdat) for readme placeholder expansion.
|
|
230
252
|
|
|
231
253
|
## License
|
|
232
254
|
|
|
233
|
-
[MIT](license.txt) © Eric Mika
|
|
255
|
+
[MIT](license.txt) © [Eric Mika](https://ericmika.com)
|
|
234
256
|
|
|
235
257
|
<!-- /footer -->
|