@effect-motion/cli 0.5.0 → 0.6.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/README.md +1 -1
- package/dist/bin.js +0 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +3 -3
- package/dist/commands/render.js +1 -1
- package/dist/commands/studio.js +3 -3
- package/package.json +61 -61
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Command line for [effect-motion](https://github.com/julia-script/effect-motion): preview scenes in the browser and render videos — all driven by one `motion.config.ts`.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
|
|
6
|
+
bun create effect-motion # scaffold a project (npm/pnpm/yarn create work too)
|
|
7
7
|
motion studio # preview scenes with hot reload
|
|
8
8
|
motion render # render every target to MP4
|
|
9
9
|
```
|
package/dist/bin.js
CHANGED
|
File without changes
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import { CliError, Command } from "effect/unstable/cli";
|
|
3
3
|
import { type MotionCliError } from "./MotionCliError.js";
|
|
4
|
-
export declare const rootCommand: Command.Command<"motion", {}, {}, MotionCliError,
|
|
4
|
+
export declare const rootCommand: Command.Command<"motion", {}, {}, MotionCliError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
|
|
5
5
|
export declare const CLI_VERSION: string;
|
|
6
6
|
/**
|
|
7
7
|
* The single exhaustive failure boundary (design D3a): MotionCliError
|
package/dist/cli.js
CHANGED
|
@@ -7,10 +7,10 @@ import { studioCommand } from "./commands/studio.js";
|
|
|
7
7
|
import { renderForTerminal } from "./MotionCliError.js";
|
|
8
8
|
// registered globally so `--verbose` parses anywhere on the command line;
|
|
9
9
|
// the reporter reads argv directly because it sits outside handler context
|
|
10
|
-
const verboseFlag = GlobalFlag.
|
|
11
|
-
flag: Flag.
|
|
10
|
+
const verboseFlag = GlobalFlag.Setting("verbose")({
|
|
11
|
+
flag: Flag.Boolean("verbose").pipe(Flag.withDefault(false), Flag.withDescription("Print full error cause chains")),
|
|
12
12
|
});
|
|
13
|
-
export const rootCommand = Command.make("motion").pipe(Command.withDescription("effect-motion: preview scenes and render videos (scaffold new projects with `
|
|
13
|
+
export const rootCommand = Command.make("motion").pipe(Command.withDescription("effect-motion: preview scenes and render videos (scaffold new projects with `bun create effect-motion`)"), Command.withSubcommands([studioCommand, renderCommand]), Command.withGlobalFlags([verboseFlag]));
|
|
14
14
|
export const CLI_VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
15
15
|
/**
|
|
16
16
|
* The single exhaustive failure boundary (design D3a): MotionCliError
|
package/dist/commands/render.js
CHANGED
|
@@ -19,7 +19,7 @@ import { makeViteLoader } from "../ViteLoader.js";
|
|
|
19
19
|
* self-providing `NodeServices` (documented in `@effect-motion/export`).
|
|
20
20
|
*/
|
|
21
21
|
const renderArgs = {
|
|
22
|
-
file: Argument.optional(Argument.
|
|
22
|
+
file: Argument.optional(Argument.String("file").pipe(Argument.withDescription("Render entrypoint (default ./render.ts) — a module default-exporting an Effect"))),
|
|
23
23
|
};
|
|
24
24
|
const handler = (input) => Effect.gen(function* () {
|
|
25
25
|
const path = yield* Path;
|
package/dist/commands/studio.js
CHANGED
|
@@ -6,9 +6,9 @@ import { Path } from "effect/Path";
|
|
|
6
6
|
import { Argument, Command, Flag } from "effect/unstable/cli";
|
|
7
7
|
import { MotionCliError } from "../MotionCliError.js";
|
|
8
8
|
const studioArgs = {
|
|
9
|
-
file: Argument.optional(Argument.
|
|
10
|
-
port: Flag.optional(Flag.
|
|
11
|
-
host: Flag.optional(Flag.
|
|
9
|
+
file: Argument.optional(Argument.String("file").pipe(Argument.withDescription("Studio entrypoint (default ./studio.ts) — a module default-exporting studioConfig({ scenes, layers })"))),
|
|
10
|
+
port: Flag.optional(Flag.Int("port")),
|
|
11
|
+
host: Flag.optional(Flag.String("host")),
|
|
12
12
|
};
|
|
13
13
|
/** Shipped studio app source (dist/commands/studio.js → ../../studio-app). */
|
|
14
14
|
const studioAppSource = (path) => path.join(path.dirname(new URL(import.meta.url).pathname), "..", "..", "studio-app");
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
2
|
+
"name": "@effect-motion/cli",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Command line for effect-motion: preview scenes with hot reload (studio) and render videos from motion.config.ts (render). Scaffold new projects with `bun create effect-motion`",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/julia-script/effect-motion.git",
|
|
10
|
+
"directory": "packages/cli"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/julia-script/effect-motion#readme",
|
|
13
|
+
"bugs": "https://github.com/julia-script/effect-motion/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"effect",
|
|
16
|
+
"motion",
|
|
17
|
+
"cli",
|
|
18
|
+
"scaffold",
|
|
19
|
+
"studio",
|
|
20
|
+
"render",
|
|
21
|
+
"video"
|
|
22
|
+
],
|
|
23
|
+
"bin": {
|
|
24
|
+
"motion": "./dist/bin.js"
|
|
25
|
+
},
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"studio-app"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -p tsconfig.build.json",
|
|
38
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"check": "tsc --noEmit"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@effect-motion/export": "workspace:^",
|
|
47
|
+
"@effect/platform-node": "4.0.0-rc.115",
|
|
48
|
+
"effect": "4.0.0-rc.115",
|
|
49
|
+
"effect-motion": "workspace:^",
|
|
50
|
+
"vite": "^7.0.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@effect-motion/react": "workspace:^",
|
|
54
|
+
"@types/node": "^26.1.1",
|
|
55
|
+
"@types/react": "^19.2.0",
|
|
56
|
+
"@types/react-dom": "^19.2.0",
|
|
57
|
+
"react": "^19.2.0",
|
|
58
|
+
"react-dom": "^19.2.0",
|
|
59
|
+
"typescript": "^7.0.2",
|
|
60
|
+
"vitest": "^4.1.10"
|
|
61
|
+
}
|
|
62
|
+
}
|