@machinal/scenes 0.1.1 → 0.1.2
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/CHANGELOG.md +4 -0
- package/LICENSING.md +3 -3
- package/bin/machinal-scenes.mjs +4 -13
- package/examples/quickstart/package.json +1 -1
- package/native/darwin-arm64/scene-render +0 -0
- package/native/darwin-x64/scene-render +0 -0
- package/native/linux-x64/scene-render +0 -0
- package/native/manifest.json +5 -5
- package/native/win32-x64/scene-render.exe +0 -0
- package/node/init.mjs +20 -0
- package/package.json +12 -10
- package/renderer/cmd/scene-render/main.go +1 -1
- package/renderer/go.mod +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- Fix `init` failing with `Target already exists: cp returned EEXIST` on newer Node.js releases: copy starter entries into the newly created directory instead of copying over the directory itself. Existing destinations are still refused without changing their files.
|
|
6
|
+
|
|
3
7
|
## 0.1.1
|
|
4
8
|
|
|
5
9
|
- Show readable setup/doctor status and a concise render result by default; use `--json` for complete tool and scene metadata. The Node API and saved scene manifests are unchanged.
|
package/LICENSING.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# License scope
|
|
2
2
|
|
|
3
|
-
The Apache License, Version 2.0 applies to the original `@machinal/scenes` library and renderer code
|
|
3
|
+
The Apache License, Version 2.0 applies to the original `@machinal/scenes` library and renderer code: the combined library in `dist/`, Node API in `node/`, CLI in `bin/`, renderer sources and original-code portions of the native binaries, public documentation and `examples/quickstart/`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
In this repository, the corresponding licensed sources are `runtime/src/`, `svelte/src/`, `node/`, `bin/`, `renderer/`, `examples/quickstart/`, `scripts/build-package.mjs`, `scripts/build-renderer.mjs`, `tests/cli.test.mjs`, `tests/package.test.mjs` and package metadata/public documentation. Copyright belongs to the respective contributors.
|
|
6
6
|
|
|
7
7
|
The native executables also contain Go standard-library and third-party code under their respective licenses, reproduced in `native/THIRD_PARTY_NOTICES.txt`. Those notices are not replaced by the Apache license for the project's original code.
|
|
8
8
|
|
|
9
9
|
Chrome/Chromium and FFmpeg are separate external programs, downloaded only by explicit `setup` or supplied by the user. They are not included in the npm tarball and are not relicensed under Apache-2.0. FFmpeg builds may be GPL/LGPL licensed; their license and build/source information are downloaded, checksum-verified and retained in the tool cache. Anyone redistributing those programs must comply with their own applicable terms.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This license grant does not cover the surrounding Machinal application, `service/`, other repository-only examples, application integration adapters, generated user scenes or project media. Those are not included in the npm package, and this package's license does not grant rights to them. Their existing or separately stated terms continue to apply.
|
|
12
12
|
|
|
13
13
|
Other npm dependencies retain their respective licenses. No permission to use Machinal trademarks is granted beyond the Apache License's provisions.
|
package/bin/machinal-scenes.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
5
4
|
import { parseArgs } from 'node:util';
|
|
6
5
|
import { doctor, renderVideo, setup } from '../node/index.mjs';
|
|
7
6
|
import { formatRenderResult, formatToolchainStatus } from '../node/cli-output.mjs';
|
|
7
|
+
import { initProject } from '../node/init.mjs';
|
|
8
8
|
|
|
9
9
|
const help = `@machinal/scenes
|
|
10
10
|
|
|
@@ -52,16 +52,7 @@ async function run(args) {
|
|
|
52
52
|
if (args.length !== 2 || args[0] !== 'init' || !args[1].trim() || args[1].startsWith('-')) throw new Error(`Expected a supported command.\n\n${help}`);
|
|
53
53
|
|
|
54
54
|
const destination = resolve(args[1]);
|
|
55
|
-
|
|
56
|
-
await mkdir(destination);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
if (error.code === 'EEXIST') throw new Error(`Destination already exists: ${destination}. No files were changed.`);
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
await cp(fileURLToPath(new URL('../examples/quickstart/', import.meta.url)), destination, {
|
|
62
|
-
recursive: true, errorOnExist: true, force: false,
|
|
63
|
-
});
|
|
64
|
-
await rename(join(destination, 'gitignore'), join(destination, '.gitignore'));
|
|
55
|
+
await initProject(destination);
|
|
65
56
|
console.log(`Created ${destination}\n\nOpen this directory, then run:\n npm install\n npm run dev\n\nIn the browser, use Download rendering tools (once), Render MP4, then Download MP4.\n\nTerminal alternative:\n npm run setup\n npm run render`);
|
|
66
57
|
}
|
|
67
58
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/native/manifest.json
CHANGED
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
"platform": "win32",
|
|
6
6
|
"arch": "x64",
|
|
7
7
|
"file": "win32-x64/scene-render.exe",
|
|
8
|
-
"size":
|
|
9
|
-
"sha256": "
|
|
8
|
+
"size": 8544256,
|
|
9
|
+
"sha256": "462d422cfec1724eb700effeb758c6ad9dd9f695a577464a205f4946682159c6"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"platform": "linux",
|
|
13
13
|
"arch": "x64",
|
|
14
14
|
"file": "linux-x64/scene-render",
|
|
15
15
|
"size": 8274080,
|
|
16
|
-
"sha256": "
|
|
16
|
+
"sha256": "b898cdf3a64d078e132cdd33eb4c00df42e9a335b29c012f6fe112e7d91341b7"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"platform": "darwin",
|
|
20
20
|
"arch": "x64",
|
|
21
21
|
"file": "darwin-x64/scene-render",
|
|
22
22
|
"size": 8497744,
|
|
23
|
-
"sha256": "
|
|
23
|
+
"sha256": "e96ee02651f6e1c06e14fe7df80f38ae3beabcc884d4a6d3081013cea28bb534"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"platform": "darwin",
|
|
27
27
|
"arch": "arm64",
|
|
28
28
|
"file": "darwin-arm64/scene-render",
|
|
29
29
|
"size": 7940450,
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "97b15efacd64557f469775f0dd64ef6fd7ecec45462a6ca3a9e6b586373baa3e"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
}
|
|
Binary file
|
package/node/init.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cp, mkdir, readdir } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const template = fileURLToPath(new URL('../examples/quickstart/', import.meta.url));
|
|
6
|
+
|
|
7
|
+
export async function initProject(destination) {
|
|
8
|
+
try {
|
|
9
|
+
await mkdir(destination);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
if (error.code === 'EEXIST') throw new Error(`Destination already exists: ${destination}. No files were changed.`);
|
|
12
|
+
throw error;
|
|
13
|
+
}
|
|
14
|
+
for (const name of await readdir(template)) {
|
|
15
|
+
const target = name === 'gitignore' ? '.gitignore' : name;
|
|
16
|
+
await cp(join(template, name), join(destination, target), {
|
|
17
|
+
recursive: true, errorOnExist: true, force: false,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@machinal/scenes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Author, preview and render frame-driven Svelte, HTML and Three.js scenes to MP4 and WebM",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"homepage": "https://github.com/catalinfl/machinal-scenes#readme",
|
|
7
|
-
"repository": { "type": "git", "url": "git+https://github.com/catalinfl/machinal-scenes.git" },
|
|
8
|
-
"bugs": { "url": "https://github.com/catalinfl/machinal-scenes/issues" },
|
|
9
|
-
"packageManager": "pnpm@11.9.0",
|
|
10
6
|
"type": "module",
|
|
11
7
|
"types": "./dist/index.d.ts",
|
|
12
8
|
"svelte": "./dist/index.js",
|
|
@@ -62,16 +58,20 @@
|
|
|
62
58
|
"keywords": ["svelte", "svelte5", "animation", "motion-graphics", "video", "threejs", "scenes", "frame-driven"],
|
|
63
59
|
"publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
|
|
64
60
|
"scripts": {
|
|
65
|
-
"
|
|
61
|
+
"dev": "pnpm --filter @direction/scene-studio dev",
|
|
62
|
+
"build": "pnpm run build:package && pnpm --filter @direction/scene-studio build",
|
|
66
63
|
"build:package": "pnpm --filter @direction/scene-runtime build && pnpm --filter @direction/scene-svelte build && node scripts/build-package.mjs",
|
|
67
64
|
"build:renderer": "node scripts/build-renderer.mjs",
|
|
68
|
-
"check": "pnpm --filter @direction/scene-runtime check && pnpm --filter @direction/scene-
|
|
69
|
-
"test": "
|
|
65
|
+
"check": "pnpm --filter @direction/scene-runtime check && pnpm --filter @direction/scene-svelte check && pnpm --filter @direction/scene-studio check",
|
|
66
|
+
"test": "vitest run",
|
|
70
67
|
"test:package": "pnpm run build:package && pnpm run build:renderer && node --test tests/package.test.mjs",
|
|
71
|
-
"test:cli": "
|
|
68
|
+
"test:cli": "node --test tests/cli.test.mjs tests/init.test.mjs tests/local-export.test.mjs",
|
|
69
|
+
"test:evaluation": "node --test scripts/evaluate-production.test.mjs",
|
|
70
|
+
"test:browser": "playwright test",
|
|
72
71
|
"test:go": "go -C renderer test ./...",
|
|
72
|
+
"test:native": "node scripts/test-native.mjs",
|
|
73
73
|
"prepack": "pnpm run build:package && pnpm run build:renderer",
|
|
74
|
-
"prepublishOnly": "pnpm check && pnpm test && pnpm test:cli && pnpm test:
|
|
74
|
+
"prepublishOnly": "pnpm check && pnpm test && pnpm test:cli && pnpm test:package"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@puppeteer/browsers": "3.2.6",
|
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
"@playwright/test": "^1.62.0",
|
|
85
85
|
"@types/node": "^26.1.2",
|
|
86
86
|
"cross-spawn": "^7.0.6",
|
|
87
|
+
"ffmpeg-static": "^5.3.0",
|
|
88
|
+
"ffprobe-static": "^3.1.0",
|
|
87
89
|
"svelte": "^5.15.0",
|
|
88
90
|
"typescript": "^5.9.3",
|
|
89
91
|
"vitest": "^4.1.12"
|
package/renderer/go.mod
CHANGED