larkup 0.1.45 → 0.1.47

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.
Files changed (241) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +12 -12
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +16 -16
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
  18. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  19. package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  21. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  23. package/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/analytics.html +1 -1
  25. package/.next/server/app/analytics.rsc +17 -17
  26. package/.next/server/app/analytics.segments/_full.segment.rsc +17 -17
  27. package/.next/server/app/analytics.segments/_head.segment.rsc +4 -4
  28. package/.next/server/app/analytics.segments/_index.segment.rsc +11 -11
  29. package/.next/server/app/analytics.segments/_tree.segment.rsc +1 -1
  30. package/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +3 -3
  31. package/.next/server/app/analytics.segments/analytics.segment.rsc +3 -3
  32. package/.next/server/app/api/chat/route.js +9 -9
  33. package/.next/server/app/api/chat/route.js.nft.json +1 -1
  34. package/.next/server/app/api/deploy/ssh/route.js +2 -2
  35. package/.next/server/app/api/deploy/ssh/route.js.nft.json +1 -1
  36. package/.next/server/app/api/doc-editor/edit/route.js +2 -2
  37. package/.next/server/app/api/doc-editor/export/route.js +2 -2
  38. package/.next/server/app/api/doc-editor/extract-text/route.js +2 -2
  39. package/.next/server/app/api/doc-editor/parse/route.js +1 -1
  40. package/.next/server/app/api/doc-editor/restore/route.js +2 -2
  41. package/.next/server/app/api/document/sign/route.js +3 -3
  42. package/.next/server/app/api/marketplace/[toolId]/route.js.nft.json +1 -1
  43. package/.next/server/app/api/marketplace/route.js.nft.json +1 -1
  44. package/.next/server/app/api/media/process/route.js.nft.json +1 -1
  45. package/.next/server/app/api/media/route.js.nft.json +1 -1
  46. package/.next/server/app/api/parse-file/route.js +2 -2
  47. package/.next/server/app/api/server/download/route.js +1 -1
  48. package/.next/server/app/api/server/generate/route.js +2 -2
  49. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/chat.html +1 -1
  51. package/.next/server/app/chat.rsc +17 -17
  52. package/.next/server/app/chat.segments/_full.segment.rsc +17 -17
  53. package/.next/server/app/chat.segments/_head.segment.rsc +4 -4
  54. package/.next/server/app/chat.segments/_index.segment.rsc +11 -11
  55. package/.next/server/app/chat.segments/_tree.segment.rsc +1 -1
  56. package/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +3 -3
  57. package/.next/server/app/chat.segments/chat.segment.rsc +3 -3
  58. package/.next/server/app/data/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/data.html +1 -1
  60. package/.next/server/app/data.rsc +17 -17
  61. package/.next/server/app/data.segments/_full.segment.rsc +17 -17
  62. package/.next/server/app/data.segments/_head.segment.rsc +4 -4
  63. package/.next/server/app/data.segments/_index.segment.rsc +11 -11
  64. package/.next/server/app/data.segments/_tree.segment.rsc +1 -1
  65. package/.next/server/app/data.segments/data/__PAGE__.segment.rsc +3 -3
  66. package/.next/server/app/data.segments/data.segment.rsc +3 -3
  67. package/.next/server/app/index.html +1 -1
  68. package/.next/server/app/index.rsc +16 -16
  69. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  70. package/.next/server/app/index.segments/_full.segment.rsc +16 -16
  71. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  72. package/.next/server/app/index.segments/_index.segment.rsc +11 -11
  73. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  74. package/.next/server/app/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/settings.html +1 -1
  77. package/.next/server/app/settings.rsc +18 -18
  78. package/.next/server/app/settings.segments/_full.segment.rsc +18 -18
  79. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  80. package/.next/server/app/settings.segments/_index.segment.rsc +11 -11
  81. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  82. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  83. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  84. package/.next/server/chunks/[root-of-the-server]__05707i3._.js +1 -1
  85. package/.next/server/chunks/[root-of-the-server]__0vmcld0._.js +3 -0
  86. package/.next/{standalone/apps/web/.next/server/chunks/[root-of-the-server]__08f60c7._.js → server/chunks/[root-of-the-server]__1e8p5bd._.js} +2 -2
  87. package/.next/server/chunks/[root-of-the-server]__1ks-3_h._.js +3 -0
  88. package/.next/server/chunks/[root-of-the-server]__1lhfkyh._.js +1 -1
  89. package/.next/server/chunks/packages_marketplace_src_125_g2p._.js +1 -1
  90. package/.next/server/chunks/packages_scraper_src_0kkcv_v._.js +1 -1
  91. package/.next/server/chunks/packages_tools_video-audio_dist_ffmpeg-spawn_0by2bau.js +3 -0
  92. package/.next/server/chunks/ssr/_1yqlx1m._.js +1 -1
  93. package/.next/server/middleware-build-manifest.js +3 -3
  94. package/.next/server/pages/404.html +1 -1
  95. package/.next/server/pages/500.html +1 -1
  96. package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  97. package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
  98. package/.next/standalone/apps/web/.next/required-server-files.json +1 -1
  99. package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
  100. package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
  101. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  102. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  103. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  104. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  105. package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  106. package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  108. package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +16 -16
  109. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
  110. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  111. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  112. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  113. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  114. package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  115. package/.next/standalone/apps/web/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
  116. package/.next/standalone/apps/web/.next/server/app/analytics.html +1 -1
  117. package/.next/standalone/apps/web/.next/server/app/analytics.rsc +17 -17
  118. package/.next/standalone/apps/web/.next/server/app/analytics.segments/_full.segment.rsc +17 -17
  119. package/.next/standalone/apps/web/.next/server/app/analytics.segments/_head.segment.rsc +4 -4
  120. package/.next/standalone/apps/web/.next/server/app/analytics.segments/_index.segment.rsc +11 -11
  121. package/.next/standalone/apps/web/.next/server/app/analytics.segments/_tree.segment.rsc +1 -1
  122. package/.next/standalone/apps/web/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +3 -3
  123. package/.next/standalone/apps/web/.next/server/app/analytics.segments/analytics.segment.rsc +3 -3
  124. package/.next/standalone/apps/web/.next/server/app/api/chat/route.js +9 -9
  125. package/.next/standalone/apps/web/.next/server/app/api/chat/route.js.nft.json +1 -1
  126. package/.next/standalone/apps/web/.next/server/app/api/deploy/ssh/route.js +2 -2
  127. package/.next/standalone/apps/web/.next/server/app/api/deploy/ssh/route.js.nft.json +1 -1
  128. package/.next/standalone/apps/web/.next/server/app/api/doc-editor/edit/route.js +2 -2
  129. package/.next/standalone/apps/web/.next/server/app/api/doc-editor/export/route.js +2 -2
  130. package/.next/standalone/apps/web/.next/server/app/api/doc-editor/extract-text/route.js +2 -2
  131. package/.next/standalone/apps/web/.next/server/app/api/doc-editor/parse/route.js +1 -1
  132. package/.next/standalone/apps/web/.next/server/app/api/doc-editor/restore/route.js +2 -2
  133. package/.next/standalone/apps/web/.next/server/app/api/document/sign/route.js +3 -3
  134. package/.next/standalone/apps/web/.next/server/app/api/marketplace/[toolId]/route.js.nft.json +1 -1
  135. package/.next/standalone/apps/web/.next/server/app/api/marketplace/route.js.nft.json +1 -1
  136. package/.next/standalone/apps/web/.next/server/app/api/media/process/route.js.nft.json +1 -1
  137. package/.next/standalone/apps/web/.next/server/app/api/media/route.js.nft.json +1 -1
  138. package/.next/standalone/apps/web/.next/server/app/api/parse-file/route.js +2 -2
  139. package/.next/standalone/apps/web/.next/server/app/api/server/download/route.js +1 -1
  140. package/.next/standalone/apps/web/.next/server/app/api/server/generate/route.js +2 -2
  141. package/.next/standalone/apps/web/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  142. package/.next/standalone/apps/web/.next/server/app/chat.html +1 -1
  143. package/.next/standalone/apps/web/.next/server/app/chat.rsc +17 -17
  144. package/.next/standalone/apps/web/.next/server/app/chat.segments/_full.segment.rsc +17 -17
  145. package/.next/standalone/apps/web/.next/server/app/chat.segments/_head.segment.rsc +4 -4
  146. package/.next/standalone/apps/web/.next/server/app/chat.segments/_index.segment.rsc +11 -11
  147. package/.next/standalone/apps/web/.next/server/app/chat.segments/_tree.segment.rsc +1 -1
  148. package/.next/standalone/apps/web/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +3 -3
  149. package/.next/standalone/apps/web/.next/server/app/chat.segments/chat.segment.rsc +3 -3
  150. package/.next/standalone/apps/web/.next/server/app/data/page_client-reference-manifest.js +1 -1
  151. package/.next/standalone/apps/web/.next/server/app/data.html +1 -1
  152. package/.next/standalone/apps/web/.next/server/app/data.rsc +17 -17
  153. package/.next/standalone/apps/web/.next/server/app/data.segments/_full.segment.rsc +17 -17
  154. package/.next/standalone/apps/web/.next/server/app/data.segments/_head.segment.rsc +4 -4
  155. package/.next/standalone/apps/web/.next/server/app/data.segments/_index.segment.rsc +11 -11
  156. package/.next/standalone/apps/web/.next/server/app/data.segments/_tree.segment.rsc +1 -1
  157. package/.next/standalone/apps/web/.next/server/app/data.segments/data/__PAGE__.segment.rsc +3 -3
  158. package/.next/standalone/apps/web/.next/server/app/data.segments/data.segment.rsc +3 -3
  159. package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
  160. package/.next/standalone/apps/web/.next/server/app/index.rsc +16 -16
  161. package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  162. package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +16 -16
  163. package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
  164. package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +11 -11
  165. package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  166. package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  167. package/.next/standalone/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  168. package/.next/standalone/apps/web/.next/server/app/settings.html +1 -1
  169. package/.next/standalone/apps/web/.next/server/app/settings.rsc +18 -18
  170. package/.next/standalone/apps/web/.next/server/app/settings.segments/_full.segment.rsc +18 -18
  171. package/.next/standalone/apps/web/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  172. package/.next/standalone/apps/web/.next/server/app/settings.segments/_index.segment.rsc +11 -11
  173. package/.next/standalone/apps/web/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  174. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  175. package/.next/standalone/apps/web/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  176. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__05707i3._.js +1 -1
  177. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0vmcld0._.js +3 -0
  178. package/.next/{server/chunks/[root-of-the-server]__08f60c7._.js → standalone/apps/web/.next/server/chunks/[root-of-the-server]__1e8p5bd._.js} +2 -2
  179. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__1ks-3_h._.js +3 -0
  180. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__1lhfkyh._.js +1 -1
  181. package/.next/standalone/apps/web/.next/server/chunks/packages_marketplace_src_125_g2p._.js +1 -1
  182. package/.next/standalone/apps/web/.next/server/chunks/packages_scraper_src_0kkcv_v._.js +1 -1
  183. package/.next/standalone/apps/web/.next/server/chunks/packages_tools_video-audio_dist_ffmpeg-spawn_0by2bau.js +3 -0
  184. package/.next/standalone/apps/web/.next/server/chunks/ssr/_1yqlx1m._.js +1 -1
  185. package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
  186. package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
  187. package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  188. package/.next/standalone/apps/web/.next/static/chunks/{041vy184s-7sh.js → 2azppfcsqga3r.js} +1 -1
  189. package/.next/standalone/apps/web/CHANGELOG.md +18 -0
  190. package/.next/standalone/apps/web/components/update-banner.tsx +2 -2
  191. package/.next/standalone/apps/web/package.json +1 -1
  192. package/.next/standalone/apps/web/server.js +1 -1
  193. package/.next/standalone/packages/tools/video-audio/CHANGELOG.md +6 -0
  194. package/.next/standalone/packages/tools/video-audio/dist/audio-processor.js +30 -32
  195. package/.next/standalone/packages/tools/video-audio/dist/ffmpeg-spawn.js +127 -0
  196. package/.next/standalone/packages/tools/video-audio/dist/video-processor.js +95 -113
  197. package/.next/standalone/packages/tools/video-audio/package.json +2 -7
  198. package/.next/standalone/packages/tools/video-audio/src/audio-processor.ts +30 -31
  199. package/.next/standalone/packages/tools/video-audio/src/ffmpeg-spawn.ts +176 -0
  200. package/.next/standalone/packages/tools/video-audio/src/video-processor.ts +88 -116
  201. package/.next/static/chunks/{041vy184s-7sh.js → 2azppfcsqga3r.js} +1 -1
  202. package/CHANGELOG.md +18 -0
  203. package/LICENSE +176 -0
  204. package/components/update-banner.tsx +2 -2
  205. package/package.json +6 -6
  206. package/.next/server/chunks/[externals]__1_tvo45._.js +0 -3
  207. package/.next/server/chunks/[root-of-the-server]__010rwkn._.js +0 -3
  208. package/.next/server/chunks/[root-of-the-server]__0xbvdcw._.js +0 -3
  209. package/.next/server/chunks/node_modules__pnpm_0ddqx71._.js +0 -3
  210. package/.next/standalone/apps/web/.next/server/chunks/[externals]__1_tvo45._.js +0 -3
  211. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__010rwkn._.js +0 -3
  212. package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0xbvdcw._.js +0 -3
  213. package/.next/standalone/apps/web/.next/server/chunks/node_modules__pnpm_0ddqx71._.js +0 -3
  214. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/capabilities.js +0 -665
  215. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/ffprobe.js +0 -261
  216. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js +0 -226
  217. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/audio.js +0 -178
  218. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/custom.js +0 -212
  219. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/inputs.js +0 -178
  220. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/misc.js +0 -41
  221. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/output.js +0 -162
  222. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/video.js +0 -184
  223. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/options/videosize.js +0 -291
  224. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/presets/divx.js +0 -14
  225. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/presets/flashvideo.js +0 -16
  226. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/presets/podcast.js +0 -16
  227. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/processor.js +0 -662
  228. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/recipes.js +0 -456
  229. package/.next/standalone/node_modules/.pnpm/fluent-ffmpeg@2.1.3/node_modules/fluent-ffmpeg/lib/utils.js +0 -455
  230. package/.next/standalone/node_modules/.pnpm/which@1.3.1/node_modules/which/CHANGELOG.md +0 -152
  231. package/.next/standalone/node_modules/.pnpm/which@1.3.1/node_modules/which/LICENSE +0 -15
  232. package/.next/standalone/node_modules/.pnpm/which@1.3.1/node_modules/which/README.md +0 -51
  233. package/.next/standalone/node_modules/.pnpm/which@1.3.1/node_modules/which/bin/which +0 -52
  234. package/.next/standalone/node_modules/.pnpm/which@1.3.1/node_modules/which/package.json +0 -30
  235. package/.next/standalone/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js +0 -135
  236. /package/.next/standalone/apps/web/.next/static/{IHAOZOY0iJJ_cMmT7-lqT → PM7-3u8cSkShjD80zaJ4l}/_buildManifest.js +0 -0
  237. /package/.next/standalone/apps/web/.next/static/{IHAOZOY0iJJ_cMmT7-lqT → PM7-3u8cSkShjD80zaJ4l}/_clientMiddlewareManifest.js +0 -0
  238. /package/.next/standalone/apps/web/.next/static/{IHAOZOY0iJJ_cMmT7-lqT → PM7-3u8cSkShjD80zaJ4l}/_ssgManifest.js +0 -0
  239. /package/.next/static/{IHAOZOY0iJJ_cMmT7-lqT → PM7-3u8cSkShjD80zaJ4l}/_buildManifest.js +0 -0
  240. /package/.next/static/{IHAOZOY0iJJ_cMmT7-lqT → PM7-3u8cSkShjD80zaJ4l}/_clientMiddlewareManifest.js +0 -0
  241. /package/.next/static/{IHAOZOY0iJJ_cMmT7-lqT → PM7-3u8cSkShjD80zaJ4l}/_ssgManifest.js +0 -0
@@ -1,455 +0,0 @@
1
- /*jshint node:true*/
2
- 'use strict';
3
-
4
- var exec = require('child_process').exec;
5
- var isWindows = require('os').platform().match(/win(32|64)/);
6
- var which = require('which');
7
-
8
- var nlRegexp = /\r\n|\r|\n/g;
9
- var streamRegexp = /^\[?(.*?)\]?$/;
10
- var filterEscapeRegexp = /[,]/;
11
- var whichCache = {};
12
-
13
- /**
14
- * Parse progress line from ffmpeg stderr
15
- *
16
- * @param {String} line progress line
17
- * @return progress object
18
- * @private
19
- */
20
- function parseProgressLine(line) {
21
- var progress = {};
22
-
23
- // Remove all spaces after = and trim
24
- line = line.replace(/=\s+/g, '=').trim();
25
- var progressParts = line.split(' ');
26
-
27
- // Split every progress part by "=" to get key and value
28
- for(var i = 0; i < progressParts.length; i++) {
29
- var progressSplit = progressParts[i].split('=', 2);
30
- var key = progressSplit[0];
31
- var value = progressSplit[1];
32
-
33
- // This is not a progress line
34
- if(typeof value === 'undefined')
35
- return null;
36
-
37
- progress[key] = value;
38
- }
39
-
40
- return progress;
41
- }
42
-
43
-
44
- var utils = module.exports = {
45
- isWindows: isWindows,
46
- streamRegexp: streamRegexp,
47
-
48
-
49
- /**
50
- * Copy an object keys into another one
51
- *
52
- * @param {Object} source source object
53
- * @param {Object} dest destination object
54
- * @private
55
- */
56
- copy: function(source, dest) {
57
- Object.keys(source).forEach(function(key) {
58
- dest[key] = source[key];
59
- });
60
- },
61
-
62
-
63
- /**
64
- * Create an argument list
65
- *
66
- * Returns a function that adds new arguments to the list.
67
- * It also has the following methods:
68
- * - clear() empties the argument list
69
- * - get() returns the argument list
70
- * - find(arg, count) finds 'arg' in the list and return the following 'count' items, or undefined if not found
71
- * - remove(arg, count) remove 'arg' in the list as well as the following 'count' items
72
- *
73
- * @private
74
- */
75
- args: function() {
76
- var list = [];
77
-
78
- // Append argument(s) to the list
79
- var argfunc = function() {
80
- if (arguments.length === 1 && Array.isArray(arguments[0])) {
81
- list = list.concat(arguments[0]);
82
- } else {
83
- list = list.concat([].slice.call(arguments));
84
- }
85
- };
86
-
87
- // Clear argument list
88
- argfunc.clear = function() {
89
- list = [];
90
- };
91
-
92
- // Return argument list
93
- argfunc.get = function() {
94
- return list;
95
- };
96
-
97
- // Find argument 'arg' in list, and if found, return an array of the 'count' items that follow it
98
- argfunc.find = function(arg, count) {
99
- var index = list.indexOf(arg);
100
- if (index !== -1) {
101
- return list.slice(index + 1, index + 1 + (count || 0));
102
- }
103
- };
104
-
105
- // Find argument 'arg' in list, and if found, remove it as well as the 'count' items that follow it
106
- argfunc.remove = function(arg, count) {
107
- var index = list.indexOf(arg);
108
- if (index !== -1) {
109
- list.splice(index, (count || 0) + 1);
110
- }
111
- };
112
-
113
- // Clone argument list
114
- argfunc.clone = function() {
115
- var cloned = utils.args();
116
- cloned(list);
117
- return cloned;
118
- };
119
-
120
- return argfunc;
121
- },
122
-
123
-
124
- /**
125
- * Generate filter strings
126
- *
127
- * @param {String[]|Object[]} filters filter specifications. When using objects,
128
- * each must have the following properties:
129
- * @param {String} filters.filter filter name
130
- * @param {String|Array} [filters.inputs] (array of) input stream specifier(s) for the filter,
131
- * defaults to ffmpeg automatically choosing the first unused matching streams
132
- * @param {String|Array} [filters.outputs] (array of) output stream specifier(s) for the filter,
133
- * defaults to ffmpeg automatically assigning the output to the output file
134
- * @param {Object|String|Array} [filters.options] filter options, can be omitted to not set any options
135
- * @return String[]
136
- * @private
137
- */
138
- makeFilterStrings: function(filters) {
139
- return filters.map(function(filterSpec) {
140
- if (typeof filterSpec === 'string') {
141
- return filterSpec;
142
- }
143
-
144
- var filterString = '';
145
-
146
- // Filter string format is:
147
- // [input1][input2]...filter[output1][output2]...
148
- // The 'filter' part can optionaly have arguments:
149
- // filter=arg1:arg2:arg3
150
- // filter=arg1=v1:arg2=v2:arg3=v3
151
-
152
- // Add inputs
153
- if (Array.isArray(filterSpec.inputs)) {
154
- filterString += filterSpec.inputs.map(function(streamSpec) {
155
- return streamSpec.replace(streamRegexp, '[$1]');
156
- }).join('');
157
- } else if (typeof filterSpec.inputs === 'string') {
158
- filterString += filterSpec.inputs.replace(streamRegexp, '[$1]');
159
- }
160
-
161
- // Add filter
162
- filterString += filterSpec.filter;
163
-
164
- // Add options
165
- if (filterSpec.options) {
166
- if (typeof filterSpec.options === 'string' || typeof filterSpec.options === 'number') {
167
- // Option string
168
- filterString += '=' + filterSpec.options;
169
- } else if (Array.isArray(filterSpec.options)) {
170
- // Option array (unnamed options)
171
- filterString += '=' + filterSpec.options.map(function(option) {
172
- if (typeof option === 'string' && option.match(filterEscapeRegexp)) {
173
- return '\'' + option + '\'';
174
- } else {
175
- return option;
176
- }
177
- }).join(':');
178
- } else if (Object.keys(filterSpec.options).length) {
179
- // Option object (named options)
180
- filterString += '=' + Object.keys(filterSpec.options).map(function(option) {
181
- var value = filterSpec.options[option];
182
-
183
- if (typeof value === 'string' && value.match(filterEscapeRegexp)) {
184
- value = '\'' + value + '\'';
185
- }
186
-
187
- return option + '=' + value;
188
- }).join(':');
189
- }
190
- }
191
-
192
- // Add outputs
193
- if (Array.isArray(filterSpec.outputs)) {
194
- filterString += filterSpec.outputs.map(function(streamSpec) {
195
- return streamSpec.replace(streamRegexp, '[$1]');
196
- }).join('');
197
- } else if (typeof filterSpec.outputs === 'string') {
198
- filterString += filterSpec.outputs.replace(streamRegexp, '[$1]');
199
- }
200
-
201
- return filterString;
202
- });
203
- },
204
-
205
-
206
- /**
207
- * Search for an executable
208
- *
209
- * Uses 'which' or 'where' depending on platform
210
- *
211
- * @param {String} name executable name
212
- * @param {Function} callback callback with signature (err, path)
213
- * @private
214
- */
215
- which: function(name, callback) {
216
- if (name in whichCache) {
217
- return callback(null, whichCache[name]);
218
- }
219
-
220
- which(name, function(err, result){
221
- if (err) {
222
- // Treat errors as not found
223
- return callback(null, whichCache[name] = '');
224
- }
225
- callback(null, whichCache[name] = result);
226
- });
227
- },
228
-
229
-
230
- /**
231
- * Convert a [[hh:]mm:]ss[.xxx] timemark into seconds
232
- *
233
- * @param {String} timemark timemark string
234
- * @return Number
235
- * @private
236
- */
237
- timemarkToSeconds: function(timemark) {
238
- if (typeof timemark === 'number') {
239
- return timemark;
240
- }
241
-
242
- if (timemark.indexOf(':') === -1 && timemark.indexOf('.') >= 0) {
243
- return Number(timemark);
244
- }
245
-
246
- var parts = timemark.split(':');
247
-
248
- // add seconds
249
- var secs = Number(parts.pop());
250
-
251
- if (parts.length) {
252
- // add minutes
253
- secs += Number(parts.pop()) * 60;
254
- }
255
-
256
- if (parts.length) {
257
- // add hours
258
- secs += Number(parts.pop()) * 3600;
259
- }
260
-
261
- return secs;
262
- },
263
-
264
-
265
- /**
266
- * Extract codec data from ffmpeg stderr and emit 'codecData' event if appropriate
267
- * Call it with an initially empty codec object once with each line of stderr output until it returns true
268
- *
269
- * @param {FfmpegCommand} command event emitter
270
- * @param {String} stderrLine ffmpeg stderr output line
271
- * @param {Object} codecObject object used to accumulate codec data between calls
272
- * @return {Boolean} true if codec data is complete (and event was emitted), false otherwise
273
- * @private
274
- */
275
- extractCodecData: function(command, stderrLine, codecsObject) {
276
- var inputPattern = /Input #[0-9]+, ([^ ]+),/;
277
- var durPattern = /Duration\: ([^,]+)/;
278
- var audioPattern = /Audio\: (.*)/;
279
- var videoPattern = /Video\: (.*)/;
280
-
281
- if (!('inputStack' in codecsObject)) {
282
- codecsObject.inputStack = [];
283
- codecsObject.inputIndex = -1;
284
- codecsObject.inInput = false;
285
- }
286
-
287
- var inputStack = codecsObject.inputStack;
288
- var inputIndex = codecsObject.inputIndex;
289
- var inInput = codecsObject.inInput;
290
-
291
- var format, dur, audio, video;
292
-
293
- if (format = stderrLine.match(inputPattern)) {
294
- inInput = codecsObject.inInput = true;
295
- inputIndex = codecsObject.inputIndex = codecsObject.inputIndex + 1;
296
-
297
- inputStack[inputIndex] = { format: format[1], audio: '', video: '', duration: '' };
298
- } else if (inInput && (dur = stderrLine.match(durPattern))) {
299
- inputStack[inputIndex].duration = dur[1];
300
- } else if (inInput && (audio = stderrLine.match(audioPattern))) {
301
- audio = audio[1].split(', ');
302
- inputStack[inputIndex].audio = audio[0];
303
- inputStack[inputIndex].audio_details = audio;
304
- } else if (inInput && (video = stderrLine.match(videoPattern))) {
305
- video = video[1].split(', ');
306
- inputStack[inputIndex].video = video[0];
307
- inputStack[inputIndex].video_details = video;
308
- } else if (/Output #\d+/.test(stderrLine)) {
309
- inInput = codecsObject.inInput = false;
310
- } else if (/Stream mapping:|Press (\[q\]|ctrl-c) to stop/.test(stderrLine)) {
311
- command.emit.apply(command, ['codecData'].concat(inputStack));
312
- return true;
313
- }
314
-
315
- return false;
316
- },
317
-
318
-
319
- /**
320
- * Extract progress data from ffmpeg stderr and emit 'progress' event if appropriate
321
- *
322
- * @param {FfmpegCommand} command event emitter
323
- * @param {String} stderrLine ffmpeg stderr data
324
- * @private
325
- */
326
- extractProgress: function(command, stderrLine) {
327
- var progress = parseProgressLine(stderrLine);
328
-
329
- if (progress) {
330
- // build progress report object
331
- var ret = {
332
- frames: parseInt(progress.frame, 10),
333
- currentFps: parseInt(progress.fps, 10),
334
- currentKbps: progress.bitrate ? parseFloat(progress.bitrate.replace('kbits/s', '')) : 0,
335
- targetSize: parseInt(progress.size || progress.Lsize, 10),
336
- timemark: progress.time
337
- };
338
-
339
- // calculate percent progress using duration
340
- if (command._ffprobeData && command._ffprobeData.format && command._ffprobeData.format.duration) {
341
- var duration = Number(command._ffprobeData.format.duration);
342
- if (!isNaN(duration))
343
- ret.percent = (utils.timemarkToSeconds(ret.timemark) / duration) * 100;
344
- }
345
- command.emit('progress', ret);
346
- }
347
- },
348
-
349
-
350
- /**
351
- * Extract error message(s) from ffmpeg stderr
352
- *
353
- * @param {String} stderr ffmpeg stderr data
354
- * @return {String}
355
- * @private
356
- */
357
- extractError: function(stderr) {
358
- // Only return the last stderr lines that don't start with a space or a square bracket
359
- return stderr.split(nlRegexp).reduce(function(messages, message) {
360
- if (message.charAt(0) === ' ' || message.charAt(0) === '[') {
361
- return [];
362
- } else {
363
- messages.push(message);
364
- return messages;
365
- }
366
- }, []).join('\n');
367
- },
368
-
369
-
370
- /**
371
- * Creates a line ring buffer object with the following methods:
372
- * - append(str) : appends a string or buffer
373
- * - get() : returns the whole string
374
- * - close() : prevents further append() calls and does a last call to callbacks
375
- * - callback(cb) : calls cb for each line (incl. those already in the ring)
376
- *
377
- * @param {Number} maxLines maximum number of lines to store (<= 0 for unlimited)
378
- */
379
- linesRing: function(maxLines) {
380
- var cbs = [];
381
- var lines = [];
382
- var current = null;
383
- var closed = false
384
- var max = maxLines - 1;
385
-
386
- function emit(line) {
387
- cbs.forEach(function(cb) { cb(line); });
388
- }
389
-
390
- return {
391
- callback: function(cb) {
392
- lines.forEach(function(l) { cb(l); });
393
- cbs.push(cb);
394
- },
395
-
396
- append: function(str) {
397
- if (closed) return;
398
- if (str instanceof Buffer) str = '' + str;
399
- if (!str || str.length === 0) return;
400
-
401
- var newLines = str.split(nlRegexp);
402
-
403
- if (newLines.length === 1) {
404
- if (current !== null) {
405
- current = current + newLines.shift();
406
- } else {
407
- current = newLines.shift();
408
- }
409
- } else {
410
- if (current !== null) {
411
- current = current + newLines.shift();
412
- emit(current);
413
- lines.push(current);
414
- }
415
-
416
- current = newLines.pop();
417
-
418
- newLines.forEach(function(l) {
419
- emit(l);
420
- lines.push(l);
421
- });
422
-
423
- if (max > -1 && lines.length > max) {
424
- lines.splice(0, lines.length - max);
425
- }
426
- }
427
- },
428
-
429
- get: function() {
430
- if (current !== null) {
431
- return lines.concat([current]).join('\n');
432
- } else {
433
- return lines.join('\n');
434
- }
435
- },
436
-
437
- close: function() {
438
- if (closed) return;
439
-
440
- if (current !== null) {
441
- emit(current);
442
- lines.push(current);
443
-
444
- if (max > -1 && lines.length > max) {
445
- lines.shift();
446
- }
447
-
448
- current = null;
449
- }
450
-
451
- closed = true;
452
- }
453
- };
454
- }
455
- };
@@ -1,152 +0,0 @@
1
- # Changes
2
-
3
-
4
- ## 1.3.1
5
-
6
- * update deps
7
- * update travis
8
-
9
- ## v1.3.0
10
-
11
- * Add nothrow option to which.sync
12
- * update tap
13
-
14
- ## v1.2.14
15
-
16
- * appveyor: drop node 5 and 0.x
17
- * travis-ci: add node 6, drop 0.x
18
-
19
- ## v1.2.13
20
-
21
- * test: Pass missing option to pass on windows
22
- * update tap
23
- * update isexe to 2.0.0
24
- * neveragain.tech pledge request
25
-
26
- ## v1.2.12
27
-
28
- * Removed unused require
29
-
30
- ## v1.2.11
31
-
32
- * Prevent changelog script from being included in package
33
-
34
- ## v1.2.10
35
-
36
- * Use env.PATH only, not env.Path
37
-
38
- ## v1.2.9
39
-
40
- * fix for paths starting with ../
41
- * Remove unused `is-absolute` module
42
-
43
- ## v1.2.8
44
-
45
- * bullet items in changelog that contain (but don't start with) #
46
-
47
- ## v1.2.7
48
-
49
- * strip 'update changelog' changelog entries out of changelog
50
-
51
- ## v1.2.6
52
-
53
- * make the changelog bulleted
54
-
55
- ## v1.2.5
56
-
57
- * make a changelog, and keep it up to date
58
- * don't include tests in package
59
- * Properly handle relative-path executables
60
- * appveyor
61
- * Attach error code to Not Found error
62
- * Make tests pass on Windows
63
-
64
- ## v1.2.4
65
-
66
- * Fix typo
67
-
68
- ## v1.2.3
69
-
70
- * update isexe, fix regression in pathExt handling
71
-
72
- ## v1.2.2
73
-
74
- * update deps, use isexe module, test windows
75
-
76
- ## v1.2.1
77
-
78
- * Sometimes windows PATH entries are quoted
79
- * Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
80
- * doc cli
81
-
82
- ## v1.2.0
83
-
84
- * Add support for opt.all and -as cli flags
85
- * test the bin
86
- * update travis
87
- * Allow checking for multiple programs in bin/which
88
- * tap 2
89
-
90
- ## v1.1.2
91
-
92
- * travis
93
- * Refactored and fixed undefined error on Windows
94
- * Support strict mode
95
-
96
- ## v1.1.1
97
-
98
- * test +g exes against secondary groups, if available
99
- * Use windows exe semantics on cygwin & msys
100
- * cwd should be first in path on win32, not last
101
- * Handle lower-case 'env.Path' on Windows
102
- * Update docs
103
- * use single-quotes
104
-
105
- ## v1.1.0
106
-
107
- * Add tests, depend on is-absolute
108
-
109
- ## v1.0.9
110
-
111
- * which.js: root is allowed to execute files owned by anyone
112
-
113
- ## v1.0.8
114
-
115
- * don't use graceful-fs
116
-
117
- ## v1.0.7
118
-
119
- * add license to package.json
120
-
121
- ## v1.0.6
122
-
123
- * isc license
124
-
125
- ## 1.0.5
126
-
127
- * Awful typo
128
-
129
- ## 1.0.4
130
-
131
- * Test for path absoluteness properly
132
- * win: Allow '' as a pathext if cmd has a . in it
133
-
134
- ## 1.0.3
135
-
136
- * Remove references to execPath
137
- * Make `which.sync()` work on Windows by honoring the PATHEXT variable.
138
- * Make `isExe()` always return true on Windows.
139
- * MIT
140
-
141
- ## 1.0.2
142
-
143
- * Only files can be exes
144
-
145
- ## 1.0.1
146
-
147
- * Respect the PATHEXT env for win32 support
148
- * should 0755 the bin
149
- * binary
150
- * guts
151
- * package
152
- * 1st
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,51 +0,0 @@
1
- # which
2
-
3
- Like the unix `which` utility.
4
-
5
- Finds the first instance of a specified executable in the PATH
6
- environment variable. Does not cache the results, so `hash -r` is not
7
- needed when the PATH changes.
8
-
9
- ## USAGE
10
-
11
- ```javascript
12
- var which = require('which')
13
-
14
- // async usage
15
- which('node', function (er, resolvedPath) {
16
- // er is returned if no "node" is found on the PATH
17
- // if it is found, then the absolute path to the exec is returned
18
- })
19
-
20
- // sync usage
21
- // throws if not found
22
- var resolved = which.sync('node')
23
-
24
- // if nothrow option is used, returns null if not found
25
- resolved = which.sync('node', {nothrow: true})
26
-
27
- // Pass options to override the PATH and PATHEXT environment vars.
28
- which('node', { path: someOtherPath }, function (er, resolved) {
29
- if (er)
30
- throw er
31
- console.log('found at %j', resolved)
32
- })
33
- ```
34
-
35
- ## CLI USAGE
36
-
37
- Same as the BSD `which(1)` binary.
38
-
39
- ```
40
- usage: which [-as] program ...
41
- ```
42
-
43
- ## OPTIONS
44
-
45
- You may pass an options object as the second argument.
46
-
47
- - `path`: Use instead of the `PATH` environment variable.
48
- - `pathExt`: Use instead of the `PATHEXT` environment variable.
49
- - `all`: Return all matches, instead of just the first one. Note that
50
- this means the function returns an array of strings instead of a
51
- single string.