multiplane 0.3.6 → 0.3.8
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/LICENSE +202 -202
- package/README.en.md +3 -0
- package/README.md +3 -0
- package/THIRD_PARTY_NOTICES.md +30 -30
- package/bin/multiplane +24 -14
- package/examples/alpha.html +18 -18
- package/examples/animation.html +17 -17
- package/examples/assets/OFL.txt +93 -93
- package/examples/assets/card.svg +6 -6
- package/examples/three-cards.html +17 -17
- package/examples/typography.html +17 -17
- package/licenses/GPL-3.0.txt +232 -232
- package/licenses/LGPL-3.0.txt +304 -304
- package/licenses/acorn-LICENSE +21 -21
- package/licenses/colour-LICENSE.md +82 -82
- package/licenses/detect-libc-LICENSE +201 -201
- package/licenses/entities-LICENSE +11 -11
- package/licenses/nanoid-LICENSE +20 -20
- package/licenses/parse5-LICENSE +19 -19
- package/licenses/picocolors-LICENSE +15 -15
- package/licenses/playwright-NOTICE +5 -5
- package/licenses/playwright-ThirdPartyNotices.txt +14 -14
- package/licenses/playwright-core-ThirdPartyNotices.txt +13 -13
- package/licenses/postcss-LICENSE +20 -20
- package/licenses/postcss-value-parser-LICENSE +22 -22
- package/licenses/semver-LICENSE +15 -15
- package/licenses/sharp-LICENSE +191 -191
- package/licenses/sharp-win32-x64-NOTICES.md +45 -45
- package/licenses/source-map-js-LICENSE +28 -28
- package/licenses/three-LICENSE +21 -21
- package/package.json +92 -92
- package/skills/multiplane/SKILL.md +3 -0
- package/src/alpha.mjs +69 -69
- package/src/artifacts.mjs +61 -61
- package/src/browser-recovery.mjs +26 -26
- package/src/capture-watchdog.mjs +29 -0
- package/src/capture.mjs +34 -18
- package/src/encoder.mjs +16 -16
- package/src/environment.mjs +56 -56
- package/src/errors.mjs +1 -0
- package/src/events.mjs +12 -10
- package/src/ffmpeg.mjs +32 -32
- package/src/format.mjs +27 -27
- package/src/frame-rate.mjs +28 -28
- package/src/home-migration.mjs +54 -54
- package/src/hosted.mjs +3 -3
- package/src/index.mjs +1 -0
- package/src/input-records.mjs +33 -0
- package/src/jobs.mjs +3 -1
- package/src/lint.mjs +248 -248
- package/src/output-alpha.mjs +36 -36
- package/src/output-check.mjs +110 -110
- package/src/platform.mjs +114 -114
- package/src/png-native.mjs +12 -12
- package/src/png.mjs +74 -74
- package/src/post.mjs +56 -39
- package/src/preview.mjs +23 -23
- package/src/process.mjs +9 -9
- package/src/render-pool.mjs +41 -14
- package/src/render-worker.mjs +14 -3
- package/src/render.mjs +148 -52
- package/src/resource-path.mjs +29 -29
- package/src/resources.mjs +27 -27
- package/src/resume.mjs +23 -0
- package/src/runtime/camera.js +37 -37
- package/src/runtime/shot.css +9 -9
- package/src/segment-encoder.mjs +91 -0
- package/src/segments.mjs +123 -0
- package/src/server.mjs +11 -7
- package/src/setup.mjs +51 -51
- package/src/skills.mjs +128 -128
- package/src/stills.mjs +1 -1
- package/src/three/index.js +39 -31
- package/src/verify.mjs +2 -2
- package/src/video-pipe.mjs +6 -6
- package/tools/bench/shots/canvas-2d.html +1 -1
- package/tools/bench/shots/dom-light.html +1 -1
- package/tools/bench/shots/scene.js +44 -44
- package/tools/bench/shots/webgl.html +1 -1
- package/tools/install-browser.mjs +18 -18
package/LICENSE
CHANGED
|
@@ -1,202 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright [yyyy] [name of copyright owner]
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.en.md
CHANGED
|
@@ -127,11 +127,14 @@ For the full contract, patterns that break determinism, and 3D layer usage, see
|
|
|
127
127
|
| `multiplane status <job>` | View job status |
|
|
128
128
|
| `multiplane cancel <job>` | Stop a job |
|
|
129
129
|
| `multiplane wait <job>` | Wait for a job to finish and print its events, for example after an agent session restarts |
|
|
130
|
+
| `multiplane resume <job>` | Continue an interrupted render from where it stopped |
|
|
130
131
|
| `multiplane config get\|set\|unset` | Read or change the user config |
|
|
131
132
|
| `multiplane skill status\|install\|remove` | Install, update or remove the agent skill for Claude Code and Codex |
|
|
132
133
|
|
|
133
134
|
Shot paths are relative to the resource root `--root` (the current directory by default). Each run has its own job directory, `out/jobs/<jobId>/`. Without `--out`, artifacts are written there (video, `stills/`, `verify/`), so runs do not overwrite each other. See `artifacts` in the result for the final paths. `--out` sets the output location. An existing target is rejected unless `--overwrite` is given. `render`, `stills`, and `verify` automatically run `lint` before starting and stop on errors. Use `--no-lint` to skip it. `npx multiplane <command> --help` lists all options for that command.
|
|
134
135
|
|
|
136
|
+
`render` encodes in segments of about 10 seconds and keeps each one on disk as soon as it is done. If a render stops part way (the process is killed, the machine crashes or loses power, the browser keeps crashing, or you stop it), `multiplane resume <job>` skips the segments already encoded, renders the rest and joins them without re-encoding; the frames are identical to an uninterrupted render. A resume keeps all of the original job's options. It is refused (`resume_unavailable`) when a file the shot loaded has changed or the Multiplane, Chromium or FFmpeg version differs, so a film is never joined from mismatched parts. See section 6.1 of the protocol.
|
|
137
|
+
|
|
135
138
|
Common `render` options:
|
|
136
139
|
|
|
137
140
|
| Option | Meaning |
|
package/README.md
CHANGED
|
@@ -127,11 +127,14 @@ Shot.define({
|
|
|
127
127
|
| `multiplane status <job>` | 查看作业状态 |
|
|
128
128
|
| `multiplane cancel <job>` | 停止作业 |
|
|
129
129
|
| `multiplane wait <job>` | 等一个作业结束并输出它的事件,例如 agent 会话重启之后 |
|
|
130
|
+
| `multiplane resume <job>` | 中断的渲染从停下的地方接着渲 |
|
|
130
131
|
| `multiplane config get\|set\|unset` | 读取或修改用户配置 |
|
|
131
132
|
| `multiplane skill status\|install\|remove` | 给 Claude Code 和 Codex 安装、更新、移除 agent skill |
|
|
132
133
|
|
|
133
134
|
镜头路径相对资源根 `--root`(默认当前目录)。每次运行都有自己的作业目录 `out/jobs/<jobId>/`,不给 `--out` 时产物就写在里面(视频、`stills/`、`verify/`),多次运行互不覆盖;最终路径见结果里的 `artifacts`。`--out` 指定输出位置,目标已存在时会拒绝覆盖,加 `--overwrite` 才替换。`render`、`stills`、`verify` 启动前自动跑 `lint`,有 error 就停下,`--no-lint` 跳过。`npx multiplane <command> --help` 列出该命令的全部参数。
|
|
134
135
|
|
|
136
|
+
`render` 按约 10 秒一段编码,每段编完就落盘。渲染中途停下(进程被杀、死机、断电、浏览器反复崩溃、手动停止)后,`multiplane resume <job>` 会跳过已经编好的段、只渲剩下的,最后不重新编码地拼成成片,画面与一次渲完的逐帧相同。续传沿用原作业的全部参数;镜头加载过的文件改了,或 Multiplane、Chromium、FFmpeg 版本变了,会拒绝续传(`resume_unavailable`),以免拼出前后不一致的片子。见协议第 6.1 节。
|
|
137
|
+
|
|
135
138
|
`render` 的常用参数:
|
|
136
139
|
|
|
137
140
|
| 参数 | 含义 |
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# 第三方声明
|
|
2
|
-
|
|
3
|
-
Multiplane 使用以下依赖;它们保留各自的版权和许可,不因本项目的 Apache-2.0 许可而改变。
|
|
4
|
-
|
|
5
|
-
| 组件 | 本次锁定版本 | 许可与原文 | 用途 |
|
|
6
|
-
|---|---|---|---|
|
|
7
|
-
| [Playwright](https://github.com/microsoft/playwright) / playwright-core | 1.63.0 | Apache-2.0:[LICENSE](licenses/playwright-LICENSE)、[NOTICE](licenses/playwright-NOTICE)、[Playwright 第三方声明](licenses/playwright-ThirdPartyNotices.txt)、[core 第三方声明](licenses/playwright-core-ThirdPartyNotices.txt) | 安装和控制 Chromium |
|
|
8
|
-
| [sharp](https://github.com/lovell/sharp) | 0.35.5 | Apache-2.0:[LICENSE](licenses/sharp-LICENSE) | PNG 解码和缩放 |
|
|
9
|
-
| sharp Windows x64 原生依赖 | 0.35.5 | Apache-2.0 AND LGPL-3.0-or-later:[包许可](licenses/sharp-win32-x64-LICENSE)、[上游第三方组件声明](licenses/sharp-win32-x64-NOTICES.md)、[LGPLv3](licenses/LGPL-3.0.txt)、[GPLv3](licenses/GPL-3.0.txt) | 原生图像处理,包含 libvips 等组件 |
|
|
10
|
-
| [three.js](https://github.com/mrdoob/three.js) | 0.180.0 | MIT:[LICENSE](licenses/three-LICENSE) | 可选三维层 |
|
|
11
|
-
| @img/colour | 随 lockfile 固定 | MIT:[LICENSE](licenses/colour-LICENSE.md) | sharp 间接依赖 |
|
|
12
|
-
| detect-libc | 随 lockfile 固定 | Apache-2.0:[LICENSE](licenses/detect-libc-LICENSE) | sharp 平台检测 |
|
|
13
|
-
| semver | 随 lockfile 固定 | ISC:[LICENSE](licenses/semver-LICENSE) | 版本解析 |
|
|
14
|
-
| Roboto 可变字体 | Google Fonts 原始 TTF | SIL OFL 1.1:[OFL 原文](examples/assets/OFL.txt) | 文字示例 |
|
|
15
|
-
| [Acorn](https://github.com/acornjs/acorn) | 8.15.0 | MIT:[LICENSE](licenses/acorn-LICENSE) | JavaScript 静态语法与位置解析 |
|
|
16
|
-
| [parse5](https://github.com/inikulin/parse5) | 7.3.0 | MIT:[LICENSE](licenses/parse5-LICENSE) | HTML 元素、属性和内联源码位置解析 |
|
|
17
|
-
| [PostCSS](https://github.com/postcss/postcss) | 8.5.28 | MIT:[LICENSE](licenses/postcss-LICENSE) | CSS 规则与声明解析;禁用 source map 读取 |
|
|
18
|
-
| [postcss-value-parser](https://github.com/TrySound/postcss-value-parser) | 4.2.0 | MIT:[LICENSE](licenses/postcss-value-parser-LICENSE) | CSS 资源 URL 与字符串解析 |
|
|
19
|
-
| entities | 6.0.1 | BSD-2-Clause:[LICENSE](licenses/entities-LICENSE) | parse5 间接依赖,HTML 实体解码 |
|
|
20
|
-
| nanoid | 3.3.19 | MIT:[LICENSE](licenses/nanoid-LICENSE) | PostCSS 间接依赖 |
|
|
21
|
-
| picocolors | 1.1.1 | ISC:[LICENSE](licenses/picocolors-LICENSE) | PostCSS 间接依赖,诊断颜色工具 |
|
|
22
|
-
| source-map-js | 1.2.2 | BSD-3-Clause:[LICENSE](licenses/source-map-js-LICENSE) | PostCSS 间接依赖,source map 工具 |
|
|
23
|
-
|
|
24
|
-
Roboto 文件从 [Google Fonts 的 Roboto 目录](https://github.com/google/fonts/tree/main/ofl/roboto) 获取,文件名为 `Roboto[wdth,wght].ttf`,本仓库仅将文件名改为 `Roboto-Variable.ttf`,未修改字体内容。Copyright 2011 The Roboto Project Authors。许可原文随字体保存。
|
|
25
|
-
|
|
26
|
-
`examples/assets/card.svg` 为本项目自行绘制的几何图形,采用本项目 Apache-2.0 许可。
|
|
27
|
-
|
|
28
|
-
Chromium 由 Playwright 安装或复用本机已安装的对应版本,不放入 Multiplane 包。其自身声明随浏览器发行物提供。不同平台的 sharp 原生依赖由 npm 按平台安装,不重打包进 Multiplane;应保留对应包内的许可和声明。上表原生依赖副本对应当前验收的 Windows x64 平台;其第三方库清单和使用许可详见上游声明,源码与构建信息见 [sharp-libvips](https://github.com/lovell/sharp-libvips)。Playwright 的内嵌依赖另在其安装包内 `*.js.LICENSE` 文件中声明。
|
|
29
|
-
|
|
30
|
-
本包不包含 FFmpeg 二进制,也不依赖 `ffmpeg-static`。使用方通过命令行、环境变量或 PATH 提供 FFmpeg;其具体构建的许可与功能以该发行物为准。
|
|
1
|
+
# 第三方声明
|
|
2
|
+
|
|
3
|
+
Multiplane 使用以下依赖;它们保留各自的版权和许可,不因本项目的 Apache-2.0 许可而改变。
|
|
4
|
+
|
|
5
|
+
| 组件 | 本次锁定版本 | 许可与原文 | 用途 |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| [Playwright](https://github.com/microsoft/playwright) / playwright-core | 1.63.0 | Apache-2.0:[LICENSE](licenses/playwright-LICENSE)、[NOTICE](licenses/playwright-NOTICE)、[Playwright 第三方声明](licenses/playwright-ThirdPartyNotices.txt)、[core 第三方声明](licenses/playwright-core-ThirdPartyNotices.txt) | 安装和控制 Chromium |
|
|
8
|
+
| [sharp](https://github.com/lovell/sharp) | 0.35.5 | Apache-2.0:[LICENSE](licenses/sharp-LICENSE) | PNG 解码和缩放 |
|
|
9
|
+
| sharp Windows x64 原生依赖 | 0.35.5 | Apache-2.0 AND LGPL-3.0-or-later:[包许可](licenses/sharp-win32-x64-LICENSE)、[上游第三方组件声明](licenses/sharp-win32-x64-NOTICES.md)、[LGPLv3](licenses/LGPL-3.0.txt)、[GPLv3](licenses/GPL-3.0.txt) | 原生图像处理,包含 libvips 等组件 |
|
|
10
|
+
| [three.js](https://github.com/mrdoob/three.js) | 0.180.0 | MIT:[LICENSE](licenses/three-LICENSE) | 可选三维层 |
|
|
11
|
+
| @img/colour | 随 lockfile 固定 | MIT:[LICENSE](licenses/colour-LICENSE.md) | sharp 间接依赖 |
|
|
12
|
+
| detect-libc | 随 lockfile 固定 | Apache-2.0:[LICENSE](licenses/detect-libc-LICENSE) | sharp 平台检测 |
|
|
13
|
+
| semver | 随 lockfile 固定 | ISC:[LICENSE](licenses/semver-LICENSE) | 版本解析 |
|
|
14
|
+
| Roboto 可变字体 | Google Fonts 原始 TTF | SIL OFL 1.1:[OFL 原文](examples/assets/OFL.txt) | 文字示例 |
|
|
15
|
+
| [Acorn](https://github.com/acornjs/acorn) | 8.15.0 | MIT:[LICENSE](licenses/acorn-LICENSE) | JavaScript 静态语法与位置解析 |
|
|
16
|
+
| [parse5](https://github.com/inikulin/parse5) | 7.3.0 | MIT:[LICENSE](licenses/parse5-LICENSE) | HTML 元素、属性和内联源码位置解析 |
|
|
17
|
+
| [PostCSS](https://github.com/postcss/postcss) | 8.5.28 | MIT:[LICENSE](licenses/postcss-LICENSE) | CSS 规则与声明解析;禁用 source map 读取 |
|
|
18
|
+
| [postcss-value-parser](https://github.com/TrySound/postcss-value-parser) | 4.2.0 | MIT:[LICENSE](licenses/postcss-value-parser-LICENSE) | CSS 资源 URL 与字符串解析 |
|
|
19
|
+
| entities | 6.0.1 | BSD-2-Clause:[LICENSE](licenses/entities-LICENSE) | parse5 间接依赖,HTML 实体解码 |
|
|
20
|
+
| nanoid | 3.3.19 | MIT:[LICENSE](licenses/nanoid-LICENSE) | PostCSS 间接依赖 |
|
|
21
|
+
| picocolors | 1.1.1 | ISC:[LICENSE](licenses/picocolors-LICENSE) | PostCSS 间接依赖,诊断颜色工具 |
|
|
22
|
+
| source-map-js | 1.2.2 | BSD-3-Clause:[LICENSE](licenses/source-map-js-LICENSE) | PostCSS 间接依赖,source map 工具 |
|
|
23
|
+
|
|
24
|
+
Roboto 文件从 [Google Fonts 的 Roboto 目录](https://github.com/google/fonts/tree/main/ofl/roboto) 获取,文件名为 `Roboto[wdth,wght].ttf`,本仓库仅将文件名改为 `Roboto-Variable.ttf`,未修改字体内容。Copyright 2011 The Roboto Project Authors。许可原文随字体保存。
|
|
25
|
+
|
|
26
|
+
`examples/assets/card.svg` 为本项目自行绘制的几何图形,采用本项目 Apache-2.0 许可。
|
|
27
|
+
|
|
28
|
+
Chromium 由 Playwright 安装或复用本机已安装的对应版本,不放入 Multiplane 包。其自身声明随浏览器发行物提供。不同平台的 sharp 原生依赖由 npm 按平台安装,不重打包进 Multiplane;应保留对应包内的许可和声明。上表原生依赖副本对应当前验收的 Windows x64 平台;其第三方库清单和使用许可详见上游声明,源码与构建信息见 [sharp-libvips](https://github.com/lovell/sharp-libvips)。Playwright 的内嵌依赖另在其安装包内 `*.js.LICENSE` 文件中声明。
|
|
29
|
+
|
|
30
|
+
本包不包含 FFmpeg 二进制,也不依赖 `ffmpeg-static`。使用方通过命令行、环境变量或 PATH 提供 FFmpeg;其具体构建的许可与功能以该发行物为准。
|
package/bin/multiplane
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { benchmark } from '../src/benchmark.mjs';
|
|
4
|
-
import { serve } from '../src/serve.mjs';
|
|
5
|
-
import { setup } from '../src/setup.mjs';
|
|
6
|
-
import { postArgs, scaleArgs } from '../src/post.mjs';
|
|
7
|
-
import { createEvents, version } from '../src/events.mjs';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
8
3
|
import { asError, invalidOption } from '../src/errors.mjs';
|
|
9
|
-
import { waitJob } from '../src/jobs.mjs';
|
|
10
4
|
import { claimExecutor, resultExitCode } from '../src/hosted.mjs';
|
|
11
5
|
import { fileURLToPath } from 'node:url';
|
|
12
6
|
|
|
13
7
|
const args = process.argv.slice(2), json = args.includes('--json');
|
|
8
|
+
// Keep CLI flag metadata independent of the rendering implementation.
|
|
9
|
+
const postArgs = ['quality', 'motion-blur', 'max-motion-blur', 'shutter', 'grain', 'no-post', 'adaptive-blur'];
|
|
10
|
+
const scaleArgs = ['scale', 'render-scale', 'upscale'];
|
|
14
11
|
const common = [...postArgs, ...scaleArgs, 'static-reuse', 'no-static-reuse', 'alpha', 'fps', 'raster', 'root', 'job-dir', 'no-lint', 'overwrite', 'no-hosted', 'job-dir-exact', 'hosted-executor'];
|
|
15
12
|
const allowed = {
|
|
16
13
|
inspect: ['root', 'fps', 'no-lint'], serve: ['root', 'port'],
|
|
@@ -19,6 +16,7 @@ const allowed = {
|
|
|
19
16
|
benchmark: ['raster', 'max-workers'], config: [], skill: ['host', 'force', 'expect'],
|
|
20
17
|
lint: ['root'], doctor: ['ffmpeg', 'raster'], status: ['job-dir'], cancel: ['job-dir', 'wait'],
|
|
21
18
|
wait: ['job-dir', 'timeout'],
|
|
19
|
+
resume: ['job-dir', 'workers', 'no-hosted', 'job-dir-exact', 'hosted-executor'],
|
|
22
20
|
};
|
|
23
21
|
// Internal flags used by the desktop app to start hosted executors; not listed in help.
|
|
24
22
|
const internal = ['job-dir-exact', 'hosted-executor'];
|
|
@@ -35,17 +33,18 @@ const onEvent = event => {
|
|
|
35
33
|
};
|
|
36
34
|
let command = args[0] ?? 'doctor';
|
|
37
35
|
try {
|
|
38
|
-
const executor = ['render', 'stills', 'verify'].includes(command) && args.includes('--hosted-executor');
|
|
36
|
+
const executor = ['render', 'stills', 'verify', 'resume'].includes(command) && args.includes('--hosted-executor');
|
|
39
37
|
const exactIndex = args.indexOf('--job-dir-exact');
|
|
40
38
|
const lostClaim = executor && (exactIndex < 0 || !args[exactIndex + 1]
|
|
41
39
|
|| !await claimExecutor(args[exactIndex + 1], command));
|
|
42
40
|
const onBytes = bytes => new Promise((resolve, reject) => process.stdout.write(bytes, error => error ? reject(error) : resolve()));
|
|
43
41
|
if (lostClaim) { process.exitCode = 0; }
|
|
44
|
-
else if (args.length === 1 && args[0] === '--version') console.log(version);
|
|
42
|
+
else if (args.length === 1 && args[0] === '--version') console.log(JSON.parse(readFileSync(new URL('../package.json', import.meta.url))).version);
|
|
45
43
|
else if (args.length === 0 || args[0] === '--help') {
|
|
46
44
|
console.log('Usage: multiplane <render|stills|verify|inspect|lint> <shot.html> [--json] [--option value]\n'
|
|
47
45
|
+ ' multiplane serve [--root directory] [--port number] [--json]\n'
|
|
48
46
|
+ ' multiplane <status|cancel> <jobId|jobDir> [--json] [--wait seconds]\n'
|
|
47
|
+
+ ' multiplane resume <jobId|jobDir> [--json] [--workers n] [--job-dir directory] [--no-hosted]\n'
|
|
49
48
|
+ ' multiplane wait <jobId|jobDir> [--json] [--timeout seconds]\n'
|
|
50
49
|
+ ' multiplane benchmark [--json] [--raster gpu|software] [--max-workers n]\n'
|
|
51
50
|
+ ' multiplane doctor [--json] [--ffmpeg path]\n'
|
|
@@ -56,11 +55,13 @@ try {
|
|
|
56
55
|
if (args.includes('--help')) console.log(command === 'config'
|
|
57
56
|
? 'Usage: multiplane config <get [key]|set key value|unset key> [--json]\nKeys: ffmpeg jobsDir raster encoder workers hosted'
|
|
58
57
|
: 'Usage: multiplane skill <status|install|remove> [--host claude|codex|all] [--force] [--expect signature] [--json]\nInstall and remove require --host.');
|
|
59
|
-
|
|
58
|
+
// TODO(design): setup/jobs still transitively load rendering through src/events.mjs.
|
|
59
|
+
// Removing those dependencies requires extending task 083's read-only src scope.
|
|
60
|
+
else { const { setup } = await import('../src/setup.mjs'); await setup(command, args.slice(1), onEvent); }
|
|
60
61
|
} else {
|
|
61
62
|
if (!allowed[command]) throw invalidOption('command', 'Unknown command: ' + command);
|
|
62
63
|
if (args.includes('--help')) {
|
|
63
|
-
console.log('Usage: multiplane ' + command + (['doctor', 'serve', 'benchmark'].includes(command) ? '' : ['status', 'cancel', 'wait'].includes(command) ? ' <jobId|jobDir>' : ' <shot.html>') + ' [options]\nOptions: --json --help ' + listed(allowed[command]).map(f => '--' + f + (['static-reuse', 'no-static-reuse', 'overwrite', 'no-lint', 'no-post', 'alpha', 'draft', 'no-hosted', 'hosted-executor'].includes(f) ? '' : ' <value>')).join(' '));
|
|
64
|
+
console.log('Usage: multiplane ' + command + (['doctor', 'serve', 'benchmark'].includes(command) ? '' : ['status', 'cancel', 'wait', 'resume'].includes(command) ? ' <jobId|jobDir>' : ' <shot.html>') + ' [options]\nOptions: --json --help ' + listed(allowed[command]).map(f => '--' + f + (['static-reuse', 'no-static-reuse', 'overwrite', 'no-lint', 'no-post', 'alpha', 'draft', 'no-hosted', 'hosted-executor'].includes(f) ? '' : ' <value>')).join(' '));
|
|
64
65
|
} else {
|
|
65
66
|
const needsTarget = !['doctor', 'serve', 'benchmark'].includes(command);
|
|
66
67
|
const target = needsTarget ? args[1] : undefined;
|
|
@@ -78,14 +79,23 @@ try {
|
|
|
78
79
|
delete options.json;
|
|
79
80
|
if (options['job-dir-exact'] && !executor) throw invalidOption('--job-dir-exact', '--job-dir-exact requires --hosted-executor.');
|
|
80
81
|
options.onEvent = executor ? undefined : onEvent;
|
|
81
|
-
if (['render', 'stills', 'verify'].includes(command) && !executor) options._hostedCLI = {
|
|
82
|
+
if (['render', 'stills', 'verify', 'resume'].includes(command) && !executor) options._hostedCLI = {
|
|
82
83
|
args: args.slice(1).filter(arg => arg !== '--json'), bin: fileURLToPath(import.meta.url), onBytes,
|
|
83
84
|
};
|
|
84
85
|
if (command === 'wait') {
|
|
86
|
+
const { waitJob } = await import('../src/jobs.mjs');
|
|
85
87
|
const result = await waitJob(target, { ...options, onEvent: json ? undefined : onEvent, onBytes: json ? onBytes : undefined });
|
|
86
88
|
reported = true; process.exitCode = resultExitCode(result);
|
|
87
89
|
} else {
|
|
88
|
-
|
|
90
|
+
let action;
|
|
91
|
+
if (command === 'lint') {
|
|
92
|
+
const { runCommand } = await import('../src/events.mjs');
|
|
93
|
+
const { checkLint } = await import('../src/lint.mjs');
|
|
94
|
+
action = (shot, options) => runCommand('lint', shot, options, events => checkLint(shot, events.options, events), false);
|
|
95
|
+
} else {
|
|
96
|
+
const [module, name] = { render: ['render', 'renderShot'], stills: ['stills', 'stillsShot'], verify: ['verify', 'verifyShot'], inspect: ['inspect', 'inspectShot'], serve: ['serve', 'serve'], doctor: ['doctor', 'doctor'], benchmark: ['benchmark', 'benchmark'], status: ['jobs', 'statusJob'], cancel: ['jobs', 'cancelJob'], resume: ['resume', 'resumeRender'] }[command];
|
|
97
|
+
action = (await import(`../src/${module}.mjs`))[name];
|
|
98
|
+
}
|
|
89
99
|
const result = needsTarget ? await action(target, options) : await action(options);
|
|
90
100
|
if (result?.ok !== undefined) { reported = true; process.exitCode = resultExitCode(result); }
|
|
91
101
|
}
|
|
@@ -93,6 +103,6 @@ try {
|
|
|
93
103
|
}
|
|
94
104
|
} catch (failure) {
|
|
95
105
|
const error = asError(failure);
|
|
96
|
-
if (!reported) createEvents(command, null, { onEvent }).finish({}, error);
|
|
106
|
+
if (!reported) { const { createEvents } = await import('../src/events.mjs'); createEvents(command, null, { onEvent }).finish({}, error); }
|
|
97
107
|
process.exitCode = error.exitCode;
|
|
98
108
|
}
|