@guanghechen/kit-video 0.5.8 → 0.5.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/README.md +23 -4
- package/lib/esm/cli.mjs +1 -1
- package/lib/esm/command-DE3PjokJ.mjs +1 -0
- package/lib/esm/index.mjs +1 -1
- package/package.json +6 -4
- package/lib/esm/command-rAABScWO.mjs +0 -1
package/README.md
CHANGED
|
@@ -10,6 +10,12 @@ pnpm add @guanghechen/kit-video
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
+
When running from this monorepo workspace, build `kit-video` and its dependency graph first:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm -r --filter @guanghechen/kit-video... run build
|
|
17
|
+
```
|
|
18
|
+
|
|
13
19
|
### Full Pipeline (autogen)
|
|
14
20
|
|
|
15
21
|
```bash
|
|
@@ -136,10 +142,10 @@ workspace/
|
|
|
136
142
|
| `--ocr` | boolean | false | Enable OCR text detection |
|
|
137
143
|
| `--dry-run` | boolean | false | Show what stages would run |
|
|
138
144
|
| `--debug` | boolean | false | Enable debug output |
|
|
139
|
-
| `--image-
|
|
145
|
+
| `--image-provider` | string | azure | Image provider (choices: azure) |
|
|
146
|
+
| `--image-model` | string | gpt-image-1-5 | Image model (choices: gpt-image-1-5) |
|
|
140
147
|
| `--image-quality` | string | high | Image quality (low/medium/high) |
|
|
141
|
-
| `--
|
|
142
|
-
| `--speech-voice` | string | - | Azure Speech voice name |
|
|
148
|
+
| `--voice` | string | - | TTS voice name |
|
|
143
149
|
| `--transition` | string | wipeleft | Transition effect |
|
|
144
150
|
| `--transition-duration` | number | 0.8 | Transition duration in seconds |
|
|
145
151
|
| `--stage-image-parallel` | number | 1 | Image stage parallelism |
|
|
@@ -178,12 +184,25 @@ Supported transition types:
|
|
|
178
184
|
|
|
179
185
|
1. CLI entry preloads missing keys from `<config-root>/.env.local` into `process.env` via `src/env.ts`.
|
|
180
186
|
2. CLI entry passes `process.env` into `command.run({ envs })`.
|
|
181
|
-
3. commander
|
|
187
|
+
3. commander loads preset from `<config-root>/preset.json` (or `--preset-file`) and merges selected profile env.
|
|
182
188
|
4. CLI actions (including `checkhealth`) consume effective `ctx.envs`.
|
|
183
189
|
5. For provider calls, `ctx.envs` is passed explicitly along `command -> handle -> core` (no global runtime env binding, no `process.env` fallback in runtime).
|
|
184
190
|
|
|
191
|
+
If `<config-root>/preset.json` does not exist, command runs without preset envs.
|
|
192
|
+
|
|
185
193
|
For duplicated keys, preset env overrides user env.
|
|
186
194
|
|
|
195
|
+
## Provider Environment (Minimum)
|
|
196
|
+
|
|
197
|
+
For a minimal runnable setup (`image` + `tts`), configure:
|
|
198
|
+
|
|
199
|
+
- `KIT_IMAGE_AZURE_API_KEY`
|
|
200
|
+
- `KIT_IMAGE_AZURE_API_ENDPOINT`
|
|
201
|
+
- `KIT_TTS_AZURE_API_KEY`
|
|
202
|
+
- `KIT_TTS_AZURE_API_ENDPOINT`
|
|
203
|
+
|
|
204
|
+
TTS in `kit-video` is executed through `@guanghechen/kit-tts` (provider fixed to `speech`).
|
|
205
|
+
|
|
187
206
|
## Requirements
|
|
188
207
|
|
|
189
208
|
- Node.js >= 20.0.0
|
package/lib/esm/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
(function(_0x2bd5c,_0x3eaa31){const _0x168883={_0x4816c9:'gBaj',_0x5d18b9:0x2e5,_0x1b03f9:0x2ce,_0x33ec9e:0x2df,_0x3511e1:'nQLR',_0x5bab7f:0x2d1,_0x59da8f:0xa,_0xbfc44b:'SUG8',_0x41baae:0x4,_0x27492c:0xd,_0x35c215:0x1a,_0x402f98:0x2f,_0x588e03:0x2e0,_0x512225:0x2e3,_0x29036d:0x2ed,_0x256e1c:0x2e1,_0x19b390:'yGU]',_0x36ce02:0x2d2,_0x50aa83:0xb,_0x560766:0x1f,_0x3ec9e4:0x0,_0x2cba0d:0x1,_0x1fd21a:'DVU#',_0x59b719:0x16,_0x15a2c6:0xd,_0x1ff2c2:0x5,_0x1993b7:'FXBg'},_0x5bd399={_0x4bcdbe:0x216},_0x25eb8c={_0x1a47c8:0xdf};function _0xc5551c(_0x3a659e,_0x5585e8,_0x583919,_0x308da8){return _0x2446(_0x3a659e- -_0x25eb8c._0x1a47c8,_0x5585e8);}const _0x1e2c21=_0x2bd5c();function _0x21f768(_0x2fc1f7,_0xebaeaf,_0x346ca2,_0x44eade){return _0x2446(_0x346ca2-_0x5bd399._0x4bcdbe,_0xebaeaf);}while(!![]){try{const _0x60a836=parseInt(_0x21f768(0x2e0,_0x168883._0x4816c9,_0x168883._0x5d18b9,_0x168883._0x1b03f9))/(-0xf39*0x1+0x35*-0x6a+0x9c*0x3d)+parseInt(_0x21f768(_0x168883._0x33ec9e,_0x168883._0x3511e1,0x2da,_0x168883._0x5bab7f))/(-0x4fc*0x2+0x1cb7*0x1+0xd*-0x171)+-parseInt(_0xc5551c(-_0x168883._0x59da8f,_0x168883._0xbfc44b,-_0x168883._0x41baae,-_0x168883._0x27492c))/(-0x142*-0x13+0x12ed+0xa*-0x448)+-parseInt(_0xc5551c(-_0x168883._0x35c215,_0x168883._0x4816c9,-_0x168883._0x402f98,-0x24))/(-0xaf4+-0x7a*-0x4+0x910)+-parseInt(_0x21f768(_0x168883._0x588e03,'SUG8',_0x168883._0x512225,_0x168883._0x29036d))/(0x4*-0x1e9+0x4fd*-0x3+-0x16a*-0x10)*(parseInt(_0x21f768(_0x168883._0x256e1c,_0x168883._0x19b390,_0x168883._0x36ce02,0x2e5))/(0x1db3*-0x1+0x18b7*0x1+0x2*0x281))+-parseInt(_0xc5551c(-_0x168883._0x50aa83,'pc8D',-_0x168883._0x560766,_0x168883._0x3ec9e4))/(0x1a31*-0x1+-0x2540+0x3f78)*(parseInt(_0xc5551c(_0x168883._0x2cba0d,_0x168883._0x1fd21a,_0x168883._0x59b719,-_0x168883._0x15a2c6))/(-0x2059+-0xee4+0x2f45))+parseInt(_0xc5551c(_0x168883._0x1ff2c2,_0x168883._0x1993b7,0xb,-0x12))/(0xb*-0x43+0x10b6+0x4*-0x373)*(parseInt(_0xc5551c(-0x22,_0x168883._0x1fd21a,-0x27,-0x10))/(-0xe2c*-0x2+0x2441+0x408f*-0x1));if(_0x60a836===_0x3eaa31)break;else _0x1e2c21['push'](_0x1e2c21['shift']());}catch(_0x3e3845){_0x1e2c21['push'](_0x1e2c21['shift']());}}}(_0x1a10,-0x36d7*-0x1f+-0x667c9*-0x1+0x3a6c6*-0x2));import{C as _0x227bb8,V as _0x591119}from'./command-DE3PjokJ.mjs';import{CompletionCommand}from'@guanghechen/commander/node';import{Reporter}from'@guanghechen/reporter';import'node:fs';function _0x1a10(){const _0x4f39f6=['WP0ZgJuC','nWGRiG','W7BdNfr5e0bjamo7W4pcISkT','WQ3cKKS+yZldI8o4mCkOxq','nmkpW4pdJfa','jNldHCk1W7C','j8ope1xdSW','W4TyaSk0yq','haJdVSo9hLqQDLRcN8k9kN8','cf4v','WODFgmkVjG','W6fwdCoOW7HxuSoJ','WRxcIWSLvq','WQ/cLeq4yxVdGSoyeCkUw2W','ymoAWPtcLWKBWOdcR35sxa','pCktWP3dOmkM','lKyVkXa','nCkdW4hdKve','zvb+ySoSbMNcLCkGW5BcVmkqWOS','W6jFtmkPWQejkCofWOyvqZJdTG','WP16W5BcLw0','ymopWP42WO0','WRBcO2yQ','W7hcSWJcRCk/','WPu8adO','WRGNCmkdWR7cPmoIrmoCW6rQW68','pHrpymkm','W7pdQCksdCk1WOddMKq','iKrHW6Sk','W7RcSMzZ','jqTZpdpdJfO','W7xcRdtcO8kG','WPFcLalcQmox','W4bmh8ooFG','WQaqWOrYsSkfqJC','f8o2eSkLpW','zSk0W6reW7y','WQhcNt/dLCoC','lSkoWP/dT8k4','pHvmymki','WOebiwZcH8oyWPGLWQRcNf56','lhSGzgFcTctcOmk1W5hcU8k8rW','WOvouCosja','E8kzc0lcSgv7mW','W4xcU2aclG','BICTpCk+FXq'];_0x1a10=function(){return _0x4f39f6;};return _0x1a10();}import'node:path';function _0x408a6a(_0x331185,_0x3eb1a9,_0x3d1841,_0xd1cd95){const _0x32917e={_0x574e55:0x133};return _0x2446(_0x331185- -_0x32917e._0x574e55,_0xd1cd95);}import'@guanghechen/string';import'@guanghechen/kit-image';import'@guanghechen/env';import'node:os';import'node:child_process';function _0x30afb8(_0x73cf63,_0x597090,_0x415a2e,_0x4bdacb){const _0x2035bc={_0x279435:0x91};return _0x2446(_0x597090- -_0x2035bc._0x279435,_0x73cf63);}import'@guanghechen/kit-tts';const _0x3a240d={};_0x3a240d[_0x408a6a(-0x7a,-0x7c,-0x75,'#sue')+'x']=_0x227bb8;const _0x52a437=new Reporter(_0x3a240d),_0x1b361b=new _0x591119();_0x1b361b[_0x30afb8('nQLR',0x3d,0x4e,0x26)+_0x30afb8('0R^p',0x41,0x47,0x51)+_0x30afb8('c36h',0x35,0x48,0x49)+_0x30afb8('pc8D',0x32,0x24,0x3c)]();const _0x19ceef={};function _0x2446(_0x239c64,_0x48f4cf){_0x239c64=_0x239c64-(0x19e3+0x2177+-0x3aa3);const _0x5e4d3d=_0x1a10();let _0x219d84=_0x5e4d3d[_0x239c64];if(_0x2446['eWTlmJ']===undefined){var _0xdabe14=function(_0x228349){const _0x2c2ca3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44156f='',_0x5559bb='';for(let _0x422d55=0x3*0x3b3+0x1355+0x1e6e*-0x1,_0x22f6fd,_0x39aa25,_0x3fbfde=0x16a9+-0xe95*-0x1+-0x253e;_0x39aa25=_0x228349['charAt'](_0x3fbfde++);~_0x39aa25&&(_0x22f6fd=_0x422d55%(0x123b+0x21f4+0xa6f*-0x5)?_0x22f6fd*(0x741*-0x1+0x59*-0x24+0x1405)+_0x39aa25:_0x39aa25,_0x422d55++%(0x1*-0x17ed+0x6*-0x542+0x3*0x127f))?_0x44156f+=String['fromCharCode'](0x5*-0x29+-0x496+0x2*0x331&_0x22f6fd>>(-(0x1ca3+-0x10c7+-0xbda)*_0x422d55&0x1520+0x356+-0x1870)):-0x1aca+-0x1d67+0x3831){_0x39aa25=_0x2c2ca3['indexOf'](_0x39aa25);}for(let _0x5248a9=-0x3ff*-0x7+0x1*-0x832+-0x13c7,_0x5befd8=_0x44156f['length'];_0x5248a9<_0x5befd8;_0x5248a9++){_0x5559bb+='%'+('00'+_0x44156f['charCodeAt'](_0x5248a9)['toString'](-0xd*-0x121+0xa25+-0x2*0xc61))['slice'](-(0x8*-0x478+0x62*0x3+0x2*0x114e));}return decodeURIComponent(_0x5559bb);};const _0x19d21c=function(_0x32192c,_0x925881){let _0xf61727=[],_0x4502c3=-0xb90+-0x246a+0x2ffa,_0x5b65de,_0x4b40de='';_0x32192c=_0xdabe14(_0x32192c);let _0x4a46c6;for(_0x4a46c6=-0x1d26+0x27a+0x1aac;_0x4a46c6<-0x1*0x1613+-0x1*0x13d5+-0x8*-0x55d;_0x4a46c6++){_0xf61727[_0x4a46c6]=_0x4a46c6;}for(_0x4a46c6=-0xfd9*-0x1+0x15e0+-0x25b9;_0x4a46c6<-0x26ab*-0x1+-0x1856+-0xd55;_0x4a46c6++){_0x4502c3=(_0x4502c3+_0xf61727[_0x4a46c6]+_0x925881['charCodeAt'](_0x4a46c6%_0x925881['length']))%(0x14b2+0x14d1+-0x2883),_0x5b65de=_0xf61727[_0x4a46c6],_0xf61727[_0x4a46c6]=_0xf61727[_0x4502c3],_0xf61727[_0x4502c3]=_0x5b65de;}_0x4a46c6=0x198+-0x2f*-0x5f+-0x1bb*0xb,_0x4502c3=-0x162d+-0xdca+-0x23f7*-0x1;for(let _0x4e9298=0x93*0x35+0xde3+0x2c52*-0x1;_0x4e9298<_0x32192c['length'];_0x4e9298++){_0x4a46c6=(_0x4a46c6+(0xe*-0x274+0x1c09*0x1+0x1*0x650))%(0xb*-0x279+-0x9a0+-0x25d3*-0x1),_0x4502c3=(_0x4502c3+_0xf61727[_0x4a46c6])%(0x371+-0x1c9a+0x1a29),_0x5b65de=_0xf61727[_0x4a46c6],_0xf61727[_0x4a46c6]=_0xf61727[_0x4502c3],_0xf61727[_0x4502c3]=_0x5b65de,_0x4b40de+=String['fromCharCode'](_0x32192c['charCodeAt'](_0x4e9298)^_0xf61727[(_0xf61727[_0x4a46c6]+_0xf61727[_0x4502c3])%(0x12a*0x3+-0x67*-0x1d+-0xe29)]);}return _0x4b40de;};_0x2446['tRfOuq']=_0x19d21c,_0x2446['rXNoEt']={},_0x2446['eWTlmJ']=!![];}const _0x835809=_0x5e4d3d[0x3*0x83d+0xd*0x8b+-0x245*0xe],_0x1d837e=_0x239c64+_0x835809,_0xc85f24=_0x2446['rXNoEt'][_0x1d837e];return!_0xc85f24?(_0x2446['LQnljI']===undefined&&(_0x2446['LQnljI']=!![]),_0x219d84=_0x2446['tRfOuq'](_0x219d84,_0x48f4cf),_0x2446['rXNoEt'][_0x1d837e]=_0x219d84):_0x219d84=_0xc85f24,_0x219d84;}_0x19ceef[_0x30afb8('GX5q',0x29,0x26,0x2a)+_0x408a6a(-0x52,-0x61,-0x3e,'f8br')+'e']=_0x227bb8,_0x19ceef[_0x30afb8('U*Ic',0x51,0x4e,0x56)]={},_0x19ceef[_0x30afb8('U*Ic',0x51,0x4e,0x56)][_0x30afb8(']Lrv',0x47,0x3b,0x5b)]=_0x30afb8('9*!4',0x26,0x2f,0x14)+_0x30afb8('qM13',0x4d,0x5f,0x5b)+_0x408a6a(-0x6a,-0x62,-0x5d,'pW$k')+_0x408a6a(-0x62,-0x77,-0x54,'GX5q')+'etion'+'s/'+_0x227bb8+'.sh',_0x19ceef[_0x30afb8('U*Ic',0x51,0x4e,0x56)][_0x30afb8('^(VN',0x49,0x3b,0x5d)]=_0x30afb8('NdHr',0x36,0x40,0x2e)+_0x408a6a(-0x6b,-0x68,-0x65,'OmdC')+'fish/'+'compl'+'etion'+'s/'+_0x227bb8+_0x408a6a(-0x67,-0x7c,-0x5f,'pW$k'),_0x19ceef[_0x30afb8('U*Ic',0x51,0x4e,0x56)]['pwsh']=_0x30afb8('OG0H',0x52,0x54,0x62)+_0x408a6a(-0x71,-0x60,-0x7c,'^(VN')+'pwsh/'+_0x30afb8('Qtao',0x2d,0x3b,0x16)+_0x408a6a(-0x5d,-0x57,-0x6e,'D]Sw')+'s/'+_0x227bb8+_0x30afb8(']Lrv',0x4e,0x4b,0x62),_0x1b361b[_0x30afb8('I1K9',0x2a,0x2d,0x37)+'mmand'](_0x30afb8('c36h',0x42,0x3b,0x38)+'etion',new CompletionCommand(_0x1b361b,_0x19ceef));try{await _0x1b361b['run']({'argv':process['argv']['slice'](-0xc26+0x1*-0x17ed+0x3*0xc07),'envs':process.env,'reporter':_0x52a437});}catch(_0x25c4fb){_0x52a437[_0x30afb8('f8br',0x48,0x4e,0x55)](_0x25c4fb instanceof Error?_0x25c4fb[_0x30afb8('I1K9',0x4b,0x4b,0x42)]??_0x25c4fb[_0x30afb8('71%9',0x46,0x4a,0x2f)+'ge']:String(_0x25c4fb)),process[_0x30afb8('NlHh',0x2f,0x32,0x43)+_0x30afb8('TY17',0x3a,0x3c,0x26)]=0xaa4+0x90a+0x45*-0x49;}
|