@rendiv/cli 0.1.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.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import { renderCommand } from './commands/render.js';
4
+ import { stillCommand } from './commands/still.js';
5
+ import { compositionsCommand } from './commands/compositions.js';
6
+ import { studioCommand } from './commands/studio.js';
7
+ const program = new Command();
8
+ program
9
+ .name('rendiv')
10
+ .description('Rendiv - Create videos programmatically with React')
11
+ .version('0.1.0');
12
+ program.addCommand(renderCommand);
13
+ program.addCommand(stillCommand);
14
+ program.addCommand(compositionsCommand);
15
+ program.addCommand(studioCommand);
16
+ program.parse();
17
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,oDAAoD,CAAC;KACjE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACxC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAElC,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const compositionsCommand: Command;
3
+ //# sourceMappingURL=compositions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../src/commands/compositions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,mBAAmB,SA4B5B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { Command } from 'commander';
2
+ import { bundle } from '@rendiv/bundler';
3
+ import { getCompositions, closeBrowser } from '@rendiv/renderer';
4
+ import chalk from 'chalk';
5
+ export const compositionsCommand = new Command('compositions')
6
+ .description('List all registered compositions')
7
+ .argument('<entry>', 'Entry file (e.g. src/index.tsx)')
8
+ .action(async (entry) => {
9
+ try {
10
+ const bundlePath = await bundle({ entryPoint: entry });
11
+ const compositions = await getCompositions(bundlePath);
12
+ if (compositions.length === 0) {
13
+ console.log(chalk.yellow('No compositions found.'));
14
+ return;
15
+ }
16
+ console.log(chalk.bold(`\nFound ${compositions.length} composition(s):\n`));
17
+ for (const comp of compositions) {
18
+ const duration = (comp.durationInFrames / comp.fps).toFixed(2);
19
+ console.log(` ${chalk.cyan(comp.id)} — ${comp.width}x${comp.height} @ ${comp.fps}fps, ${comp.durationInFrames} frames (${duration}s) [${comp.type}]`);
20
+ }
21
+ console.log();
22
+ }
23
+ catch (error) {
24
+ console.error(chalk.red(`Error: ${error.message}`));
25
+ process.exitCode = 1;
26
+ }
27
+ finally {
28
+ await closeBrowser();
29
+ }
30
+ });
31
+ //# sourceMappingURL=compositions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compositions.js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,OAAO,IAAI,CAAC,IAAI,GAAG,CAC1I,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAW,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC/D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;YAAS,CAAC;QACT,MAAM,YAAY,EAAE,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const renderCommand: Command;
3
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/commands/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,aAAa,SAqEtB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { Command } from 'commander';
2
+ import { bundle } from '@rendiv/bundler';
3
+ import { renderMedia, selectComposition, closeBrowser } from '@rendiv/renderer';
4
+ import ora from 'ora';
5
+ import chalk from 'chalk';
6
+ export const renderCommand = new Command('render')
7
+ .description('Render a composition to video')
8
+ .argument('<entry>', 'Entry file (e.g. src/index.tsx)')
9
+ .argument('<compositionId>', 'Composition ID')
10
+ .argument('[output]', 'Output file path', 'out/video.mp4')
11
+ .option('--props <json>', 'Input props as JSON', '{}')
12
+ .option('--codec <codec>', 'Output codec (mp4, webm)', 'mp4')
13
+ .option('--concurrency <n>', 'Parallel browser tabs', '1')
14
+ .option('--frames <range>', 'Frame range (e.g. 0-59)')
15
+ .action(async (entry, compositionId, output, options) => {
16
+ const spinner = ora('Bundling project...').start();
17
+ try {
18
+ // 1. Bundle
19
+ const bundlePath = await bundle({
20
+ entryPoint: entry,
21
+ onProgress: (p) => {
22
+ if (p < 1)
23
+ spinner.text = `Bundling... ${Math.round(p * 100)}%`;
24
+ },
25
+ });
26
+ spinner.text = 'Fetching composition metadata...';
27
+ // 2. Get composition info
28
+ const inputProps = JSON.parse(options.props);
29
+ const composition = await selectComposition(bundlePath, compositionId, inputProps);
30
+ const totalFrames = composition.durationInFrames;
31
+ spinner.text = `Rendering ${totalFrames} frames at ${composition.fps}fps (${composition.width}x${composition.height})...`;
32
+ // Parse frame range
33
+ let frameRange;
34
+ if (options.frames) {
35
+ const [start, end] = options.frames.split('-').map(Number);
36
+ frameRange = [start, end];
37
+ }
38
+ // 3. Render
39
+ await renderMedia({
40
+ composition,
41
+ serveUrl: bundlePath,
42
+ codec: options.codec,
43
+ outputLocation: output,
44
+ inputProps,
45
+ concurrency: parseInt(options.concurrency, 10),
46
+ frameRange,
47
+ onProgress: ({ progress, renderedFrames, totalFrames }) => {
48
+ if (progress < 0.9) {
49
+ spinner.text = `Rendering frames... ${renderedFrames}/${totalFrames} (${Math.round(progress * 100)}%)`;
50
+ }
51
+ else if (progress < 1) {
52
+ spinner.text = 'Encoding video with FFmpeg...';
53
+ }
54
+ },
55
+ });
56
+ spinner.succeed(`${chalk.green('Done!')} Video rendered to ${chalk.bold(output)} (${totalFrames} frames)`);
57
+ }
58
+ catch (error) {
59
+ spinner.fail(chalk.red(`Render failed: ${error.message}`));
60
+ process.exitCode = 1;
61
+ }
62
+ finally {
63
+ await closeBrowser();
64
+ }
65
+ });
66
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/commands/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,K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AO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAmB,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;YAAS,CAAC;QACT,MAAM,YAAY,EAAE,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const stillCommand: Command;
3
+ //# sourceMappingURL=still.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"still.d.ts","sourceRoot":"","sources":["../../src/commands/still.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,YAAY,SA6CrB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { Command } from 'commander';
2
+ import { bundle } from '@rendiv/bundler';
3
+ import { renderStill, selectComposition, closeBrowser } from '@rendiv/renderer';
4
+ import ora from 'ora';
5
+ import chalk from 'chalk';
6
+ export const stillCommand = new Command('still')
7
+ .description('Render a single frame to an image')
8
+ .argument('<entry>', 'Entry file (e.g. src/index.tsx)')
9
+ .argument('<compositionId>', 'Composition ID')
10
+ .argument('[output]', 'Output file path', 'out/still.png')
11
+ .option('--props <json>', 'Input props as JSON', '{}')
12
+ .option('--frame <n>', 'Frame number to render', '0')
13
+ .option('--format <format>', 'Image format (png, jpeg)', 'png')
14
+ .option('--quality <n>', 'JPEG quality (1-100)', '80')
15
+ .action(async (entry, compositionId, output, options) => {
16
+ const spinner = ora('Bundling project...').start();
17
+ try {
18
+ const bundlePath = await bundle({ entryPoint: entry });
19
+ spinner.text = 'Fetching composition metadata...';
20
+ const inputProps = JSON.parse(options.props);
21
+ const composition = await selectComposition(bundlePath, compositionId, inputProps);
22
+ spinner.text = `Rendering frame ${options.frame}...`;
23
+ await renderStill({
24
+ serveUrl: bundlePath,
25
+ composition,
26
+ output,
27
+ frame: parseInt(options.frame, 10),
28
+ inputProps,
29
+ imageFormat: options.format,
30
+ quality: parseInt(options.quality, 10),
31
+ });
32
+ spinner.succeed(`${chalk.green('Done!')} Still rendered to ${chalk.bold(output)}`);
33
+ }
34
+ catch (error) {
35
+ spinner.fail(chalk.red(`Render failed: ${error.message}`));
36
+ process.exitCode = 1;
37
+ }
38
+ finally {
39
+ await closeBrowser();
40
+ }
41
+ });
42
+ //# sourceMappingURL=still.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"still.js","sourceRoot":"","sources":["../../src/commands/still.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;KAC7C,WAAW,CAAC,mCAAmC,CAAC;KAChD,QAAQ,CAAC,SAAS,EAAE,iCAAiC,CAAC;KACtD,QAAQ,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;KAC7C,QAAQ,CAAC,UAAU,EAAE,kBAAkB,EAAE,eAAe,CAAC;KACzD,MAAM,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,IAAI,CAAC;KACrD,MAAM,CAAC,aAAa,EAAE,wBAAwB,EAAE,GAAG,CAAC;KACpD,MAAM,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAC9D,MAAM,CAAC,eAAe,EAAE,sBAAsB,EAAE,IAAI,CAAC;KACrD,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,aAAqB,EAAE,MAAc,EAAE,OAKpE,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,EAAE,CAAC;IAEnD,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;QAEvD,OAAO,CAAC,IAAI,GAAG,kCAAkC,CAAC;QAClD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,UAAU,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;QAEnF,OAAO,CAAC,IAAI,GAAG,mBAAmB,OAAO,CAAC,KAAK,KAAK,CAAC;QAErD,MAAM,WAAW,CAAC;YAChB,QAAQ,EAAE,UAAU;YACpB,WAAW;YACX,MAAM;YACN,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;YAClC,UAAU;YACV,WAAW,EAAE,OAAO,CAAC,MAAwB;YAC7C,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;SACvC,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CACb,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,sBAAsB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAClE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAmB,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;YAAS,CAAC;QACT,MAAM,YAAY,EAAE,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const studioCommand: Command;
3
+ //# sourceMappingURL=studio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,eAAO,MAAM,aAAa,SAyBtB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Command } from 'commander';
2
+ import chalk from 'chalk';
3
+ export const studioCommand = new Command('studio')
4
+ .description('Start the Rendiv Studio development server')
5
+ .argument('<entry>', 'Entry file (e.g., src/index.tsx)')
6
+ .option('--port <number>', 'Port number', '3000')
7
+ .action(async (entry, options) => {
8
+ const { startStudio } = await import('@rendiv/studio');
9
+ console.log(chalk.cyan('\n Starting Rendiv Studio...\n'));
10
+ const { url, close } = await startStudio({
11
+ entryPoint: entry,
12
+ port: parseInt(options.port, 10),
13
+ });
14
+ console.log(chalk.green(` Rendiv Studio running at ${chalk.bold(url)}\n`));
15
+ console.log(chalk.gray(' Press Ctrl+C to stop\n'));
16
+ const shutdown = async () => {
17
+ console.log(chalk.gray('\n Shutting down...\n'));
18
+ await close();
19
+ process.exit(0);
20
+ };
21
+ process.on('SIGINT', shutdown);
22
+ process.on('SIGTERM', shutdown);
23
+ });
24
+ //# sourceMappingURL=studio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio.js","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,4CAA4C,CAAC;KACzD,QAAQ,CAAC,SAAS,EAAE,kCAAkC,CAAC;KACvD,MAAM,CAAC,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC;KAChD,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,OAAyB,EAAE,EAAE;IACzD,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAE3D,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,MAAM,WAAW,CAAC;QACvC,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KACjC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,8BAA8B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAEpD,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;QAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAClD,MAAM,KAAK,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { renderCommand } from './commands/render.js';
2
+ export { stillCommand } from './commands/still.js';
3
+ export { compositionsCommand } from './commands/compositions.js';
4
+ export { studioCommand } from './commands/studio.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { renderCommand } from './commands/render.js';
2
+ export { stillCommand } from './commands/still.js';
3
+ export { compositionsCommand } from './commands/compositions.js';
4
+ export { studioCommand } from './commands/studio.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@rendiv/cli",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "bin": {
7
+ "rendiv": "./dist/cli.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "dependencies": {
21
+ "commander": "^12.1.0",
22
+ "chalk": "^5.3.0",
23
+ "ora": "^8.1.0",
24
+ "@rendiv/bundler": "0.1.0",
25
+ "@rendiv/studio": "0.1.0",
26
+ "@rendiv/renderer": "0.1.0"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^22.0.0",
30
+ "typescript": "^5.7.0",
31
+ "@rendiv/tsconfig": "0.0.0"
32
+ },
33
+ "scripts": {
34
+ "build": "tsc",
35
+ "dev": "tsc --watch",
36
+ "typecheck": "tsc --noEmit",
37
+ "clean": "rm -rf dist"
38
+ }
39
+ }