@skilldeck/studio 0.1.0 → 1.0.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studio",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Make videos from HTML, deterministically: compositions with a seekable clock, timed scenes and SRT/VTT captions, a linter for timeline gaps, overlaps, missing assets and non-deterministic code, and a frame-by-frame renderer that drives local headless Chrome over CDP and encodes with ffmpeg. Zero-dependency Node.js 22, no cloud services.",
5
5
  "author": {
6
6
  "name": "SkillDeck"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilldeck/studio",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Turn HTML into video, deterministically: author compositions with a seekable clock, scenes and captions, lint them for timeline and determinism bugs, then render frame by frame with local headless Chrome and ffmpeg. Zero-dependency Node.js, nothing uploaded.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "LICENSE"
20
20
  ],
21
21
  "dependencies": {
22
- "@skilldeck/core": "^0.1.1"
22
+ "@skilldeck/core": "^1.0.0"
23
23
  },
24
24
  "engines": {
25
25
  "node": ">=22"
@@ -9,9 +9,10 @@
9
9
  // `path` defaults to ./composition.html; a directory gets composition.html inside it.
10
10
  // Exit 0 on success, 1 when the target exists (use --force), 2 on bad usage.
11
11
 
12
+ import { realpathSync } from 'node:fs'
12
13
  import fs from 'node:fs'
13
14
  import path from 'node:path'
14
- import { fileURLToPath, pathToFileURL } from 'node:url'
15
+ import { fileURLToPath } from 'node:url'
15
16
  import { parseArgs } from 'node:util'
16
17
 
17
18
  export const TEMPLATE = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'templates', 'composition.html')
@@ -117,4 +118,11 @@ function main(argv) {
117
118
  }
118
119
  }
119
120
 
120
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = main(process.argv.slice(2))
121
+ // Run only when this file is the entry point. Real paths are compared because
122
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
123
+ // skills folder), and then it never equals the module's own URL.
124
+ function isEntryPoint(url) {
125
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
126
+ }
127
+
128
+ if (isEntryPoint(import.meta.url)) process.exitCode = main(process.argv.slice(2))
@@ -11,8 +11,9 @@
11
11
  // (render prints the command instead of encoding), 2 when rendering cannot work
12
12
  // (Node too old, no Chrome, or the launch check failed).
13
13
 
14
+ import { realpathSync } from 'node:fs'
15
+ import { fileURLToPath } from 'node:url'
14
16
  import { spawnSync } from 'node:child_process'
15
- import { pathToFileURL } from 'node:url'
16
17
  import { chromeVersion, findChrome, withChrome } from './lib/cdp.mjs'
17
18
  import { which } from './render.mjs'
18
19
 
@@ -93,4 +94,11 @@ async function main(argv) {
93
94
  return r.status
94
95
  }
95
96
 
96
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = await main(process.argv.slice(2))
97
+ // Run only when this file is the entry point. Real paths are compared because
98
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
99
+ // skills folder), and then it never equals the module's own URL.
100
+ function isEntryPoint(url) {
101
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
102
+ }
103
+
104
+ if (isEntryPoint(import.meta.url)) process.exitCode = await main(process.argv.slice(2))
@@ -13,9 +13,10 @@
13
13
  // composition has findings that fail, 2 on bad usage or an unreadable file.
14
14
  // Zero dependencies. Node 22+.
15
15
 
16
+ import { realpathSync } from 'node:fs'
17
+ import { fileURLToPath } from 'node:url'
16
18
  import fs from 'node:fs'
17
19
  import path from 'node:path'
18
- import { pathToFileURL } from 'node:url'
19
20
 
20
21
  const HELP = `lint-comp: check an HTML video composition before rendering
21
22
 
@@ -455,4 +456,11 @@ function main(argv) {
455
456
  return report.errors || (argv.includes('--strict') && report.warnings) ? 1 : 0
456
457
  }
457
458
 
458
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = main(process.argv.slice(2))
459
+ // Run only when this file is the entry point. Real paths are compared because
460
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
461
+ // skills folder), and then it never equals the module's own URL.
462
+ function isEntryPoint(url) {
463
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
464
+ }
465
+
466
+ if (isEntryPoint(import.meta.url)) process.exitCode = main(process.argv.slice(2))
@@ -14,6 +14,8 @@
14
14
  // Exit 0 on success, 1 when rendering or encoding fails, 2 on bad usage or a
15
15
  // missing environment piece (Chrome, Node 22). Zero dependencies. Node 22+.
16
16
 
17
+ import { realpathSync } from 'node:fs'
18
+ import { fileURLToPath } from 'node:url'
17
19
  import { spawnSync } from 'node:child_process'
18
20
  import fs from 'node:fs'
19
21
  import path from 'node:path'
@@ -367,4 +369,11 @@ async function main(argv) {
367
369
  }
368
370
  }
369
371
 
370
- if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) process.exitCode = await main(process.argv.slice(2))
372
+ // Run only when this file is the entry point. Real paths are compared because
373
+ // the path Node was given can be a symlink (macOS /tmp and /var, a linked
374
+ // skills folder), and then it never equals the module's own URL.
375
+ function isEntryPoint(url) {
376
+ try { return Boolean(process.argv[1]) && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(url)) } catch { return false }
377
+ }
378
+
379
+ if (isEntryPoint(import.meta.url)) process.exitCode = await main(process.argv.slice(2))