hyperframes 0.1.8 → 0.1.9

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 (2) hide show
  1. package/dist/cli.js +79 -41
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -422,7 +422,7 @@ var VERSION;
422
422
  var init_version = __esm({
423
423
  "src/version.ts"() {
424
424
  "use strict";
425
- VERSION = true ? "0.1.8" : "0.0.0-dev";
425
+ VERSION = true ? "0.1.9" : "0.0.0-dev";
426
426
  }
427
427
  });
428
428
 
@@ -24463,8 +24463,16 @@ async function handleVideoFile(videoPath, destDir, interactive) {
24463
24463
  const transcode = await Jt({
24464
24464
  message: "Transcode to H.264 MP4 for browser playback?",
24465
24465
  options: [
24466
- { value: "yes", label: "Yes, transcode", hint: "converts to H.264 MP4" },
24467
- { value: "no", label: "No, keep original", hint: "video won't play in browser" }
24466
+ {
24467
+ value: "yes",
24468
+ label: "Yes, transcode",
24469
+ hint: "converts to H.264 MP4"
24470
+ },
24471
+ {
24472
+ value: "no",
24473
+ label: "No, keep original",
24474
+ hint: "video won't play in browser"
24475
+ }
24468
24476
  ]
24469
24477
  });
24470
24478
  if (Ct(transcode)) {
@@ -24550,7 +24558,11 @@ async function nextStepLoop(destDir) {
24550
24558
  const next = await Jt({
24551
24559
  message: "What do you want to do?",
24552
24560
  options: [
24553
- { value: "dev", label: "Open in studio", hint: "full editor with timeline" },
24561
+ {
24562
+ value: "dev",
24563
+ label: "Open in studio",
24564
+ hint: "full editor with timeline"
24565
+ },
24554
24566
  { value: "render", label: "Render to MP4", hint: "export video now" },
24555
24567
  { value: "done", label: "Done for now" }
24556
24568
  ]
@@ -24599,10 +24611,10 @@ var init_init = __esm({
24599
24611
  description: `Scaffold a new composition project
24600
24612
 
24601
24613
  Examples:
24602
- hyperframes init my-video --template blank --video video.mp4
24603
- hyperframes init podcast --template warm-grain --audio episode.mp3
24604
- hyperframes init my-video --template blank --skip-skills --skip-transcribe
24605
- hyperframes init --human-friendly # interactive mode`
24614
+ hyperframes init my-video # interactive wizard
24615
+ hyperframes init my-video --template warm-grain # pick a template
24616
+ hyperframes init my-video --video video.mp4 # with video file
24617
+ hyperframes init my-video --non-interactive # skip prompts (CI/agents)`
24606
24618
  },
24607
24619
  args: {
24608
24620
  name: { type: "positional", description: "Project name", required: false },
@@ -24611,11 +24623,28 @@ Examples:
24611
24623
  description: `Template (${ALL_TEMPLATE_IDS.join(", ")})`,
24612
24624
  alias: "t"
24613
24625
  },
24614
- video: { type: "string", description: "Path to a video file (MP4, WebM, MOV)", alias: "V" },
24615
- audio: { type: "string", description: "Path to an audio file (MP3, WAV, M4A)", alias: "a" },
24616
- "skip-skills": { type: "boolean", description: "Skip AI coding skills installation" },
24617
- "skip-transcribe": { type: "boolean", description: "Skip whisper transcription" },
24618
- "human-friendly": { type: "boolean", description: "Enable interactive terminal UI" }
24626
+ video: {
24627
+ type: "string",
24628
+ description: "Path to a video file (MP4, WebM, MOV)",
24629
+ alias: "V"
24630
+ },
24631
+ audio: {
24632
+ type: "string",
24633
+ description: "Path to an audio file (MP3, WAV, M4A)",
24634
+ alias: "a"
24635
+ },
24636
+ "skip-skills": {
24637
+ type: "boolean",
24638
+ description: "Skip AI coding skills installation"
24639
+ },
24640
+ "skip-transcribe": {
24641
+ type: "boolean",
24642
+ description: "Skip whisper transcription"
24643
+ },
24644
+ "non-interactive": {
24645
+ type: "boolean",
24646
+ description: "Disable interactive prompts (for CI/agents)"
24647
+ }
24619
24648
  },
24620
24649
  async run({ args }) {
24621
24650
  const templateFlag = args.template;
@@ -24623,21 +24652,16 @@ Examples:
24623
24652
  const audioFlag = args.audio;
24624
24653
  const skipSkills = args["skip-skills"] === true;
24625
24654
  const skipTranscribe = args["skip-transcribe"] === true;
24626
- const humanFriendly = args["human-friendly"] === true;
24627
- if (!humanFriendly) {
24628
- if (!templateFlag) {
24629
- console.error(c.error("Missing required flag: --template"));
24630
- console.error(`Available: ${ALL_TEMPLATE_IDS.join(", ")}`);
24631
- console.error(`
24632
- Example: hyperframes init my-video --template blank --video video.mp4`);
24633
- process.exit(1);
24634
- }
24635
- if (!ALL_TEMPLATE_IDS.includes(templateFlag)) {
24636
- console.error(c.error(`Unknown template: ${templateFlag}`));
24655
+ const nonInteractive = args["non-interactive"] === true;
24656
+ const interactive = !nonInteractive && process.stdout.isTTY === true;
24657
+ if (!interactive) {
24658
+ const resolvedTemplate = templateFlag ?? "blank";
24659
+ if (!ALL_TEMPLATE_IDS.includes(resolvedTemplate)) {
24660
+ console.error(c.error(`Unknown template: ${resolvedTemplate}`));
24637
24661
  console.error(`Available: ${ALL_TEMPLATE_IDS.join(", ")}`);
24638
24662
  process.exit(1);
24639
24663
  }
24640
- const templateId2 = templateFlag;
24664
+ const templateId2 = resolvedTemplate;
24641
24665
  const name2 = args.name ?? "my-video";
24642
24666
  const destDir2 = resolve14(name2);
24643
24667
  if (existsSync26(destDir2) && readdirSync7(destDir2).length > 0) {
@@ -24772,7 +24796,11 @@ Example: hyperframes init my-video --template blank --video video.mp4`);
24772
24796
  options: [
24773
24797
  { value: "video", label: "Video", hint: "MP4, WebM, MOV" },
24774
24798
  { value: "audio", label: "Audio only", hint: "MP3, WAV, M4A" },
24775
- { value: "no", label: "No", hint: "Start with motion graphics or text" }
24799
+ {
24800
+ value: "no",
24801
+ label: "No",
24802
+ hint: "Start with motion graphics or text"
24803
+ }
24776
24804
  ],
24777
24805
  initialValue: "no"
24778
24806
  });
@@ -24829,7 +24857,9 @@ Example: hyperframes init my-video --template blank --video video.mp4`);
24829
24857
  await ensureWhisper2({
24830
24858
  onProgress: (msg) => spin.message(msg)
24831
24859
  });
24832
- await ensureModel2(void 0, { onProgress: (msg) => spin.message(msg) });
24860
+ await ensureModel2(void 0, {
24861
+ onProgress: (msg) => spin.message(msg)
24862
+ });
24833
24863
  spin.message("Transcribing audio...");
24834
24864
  const { transcribe: runTranscribe } = await Promise.resolve().then(() => (init_transcribe(), transcribe_exports));
24835
24865
  const transcribeResult = await runTranscribe(sourceFilePath, destDir, {
@@ -24845,21 +24875,29 @@ Example: hyperframes init my-video --template blank --video video.mp4`);
24845
24875
  }
24846
24876
  }
24847
24877
  }
24848
- const defaultTemplate = isAudioOnly ? "warm-grain" : "blank";
24849
- const templateResult = await Jt({
24850
- message: "Pick a template",
24851
- options: TEMPLATES.map((t2) => ({
24852
- value: t2.id,
24853
- label: t2.label,
24854
- hint: t2.hint
24855
- })),
24856
- initialValue: defaultTemplate
24857
- });
24858
- if (Ct(templateResult)) {
24859
- Nt("Setup cancelled.");
24860
- process.exit(0);
24878
+ let templateId;
24879
+ if (templateFlag && ALL_TEMPLATE_IDS.includes(templateFlag)) {
24880
+ templateId = templateFlag;
24881
+ } else {
24882
+ if (templateFlag) {
24883
+ R2.warn(`Unknown template "${templateFlag}" \u2014 pick from the list below`);
24884
+ }
24885
+ const defaultTemplate = isAudioOnly ? "warm-grain" : "blank";
24886
+ const templateResult = await Jt({
24887
+ message: "Pick a template",
24888
+ options: TEMPLATES.map((t2) => ({
24889
+ value: t2.id,
24890
+ label: t2.label,
24891
+ hint: t2.hint
24892
+ })),
24893
+ initialValue: defaultTemplate
24894
+ });
24895
+ if (Ct(templateResult)) {
24896
+ Nt("Setup cancelled.");
24897
+ process.exit(0);
24898
+ }
24899
+ templateId = templateResult;
24861
24900
  }
24862
- const templateId = templateResult;
24863
24901
  scaffoldProject(destDir, name, templateId, localVideoName, videoDuration);
24864
24902
  trackInitTemplate(templateId);
24865
24903
  const transcriptFile = resolve14(destDir, "transcript.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperframes",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "HyperFrames CLI — create, preview, and render HTML video compositions",
5
5
  "repository": {
6
6
  "type": "git",