@roost2d/tooling 0.1.0-rc.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # @roost2d/tooling
2
+
3
+ Node-only CLI and APIs for asset inspection, deterministic atlas building, schema/rights validation, budgets, and project scaffolding.
4
+
5
+ ```sh
6
+ npm install --save-dev @roost2d/tooling
7
+ npx roost2d assets validate ./runtime/manifest.json
8
+ ```
9
+
10
+ Never import this package from browser code. Its only Roost2D runtime dependency is `@roost2d/contracts`. [Tooling and release guide](https://github.com/Roost2D/roost2d/blob/main/docs/tooling-releases.md).
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,73 @@
1
+ #!/usr/bin/env node
2
+ import { writeFile } from 'node:fs/promises';
3
+ import { resolve } from 'node:path';
4
+ import { buildAtlases, createInventory, createProject, findDuplicateImages, inspectImages, readJsonFile, validateAnimationFile, validateAtlasFiles, validateRigFile, verifyManifestFiles, verifyRightsFiles, verifyToolingBoundary, verifyToolingPackageGraph } from './index.js';
5
+ const [area, action, ...args] = process.argv.slice(2);
6
+ if (area === 'assets' && action === 'scan') {
7
+ const [directory, output = 'asset-inventory.json'] = args;
8
+ requireValue(directory, 'roost2d assets scan <directory> [output]');
9
+ const images = await inspectImages(resolve(directory));
10
+ await writeJson(output, { files: await createInventory(resolve(directory)), images, duplicates: findDuplicateImages(images) });
11
+ }
12
+ else if (area === 'assets' && action === 'validate') {
13
+ const [manifestFile, assetRoot] = args;
14
+ requireValue(manifestFile && assetRoot, 'roost2d assets validate <manifest.json> <asset-root>');
15
+ fail(await verifyManifestFiles(await readJson(resolve(manifestFile)), resolve(assetRoot)));
16
+ }
17
+ else if (area === 'assets' && action === 'manifest') {
18
+ const [directory, output = 'asset-inventory.json'] = args;
19
+ requireValue(directory, 'roost2d assets manifest <directory> [output]');
20
+ await writeJson(output, await createInventory(resolve(directory)));
21
+ }
22
+ else if (area === 'atlas' && action === 'build') {
23
+ const [configFile] = args;
24
+ requireValue(configFile, 'roost2d atlas build <config.json> [--dry-run]');
25
+ const config = await readJson(resolve(configFile));
26
+ console.log(JSON.stringify(await buildAtlases(config, { dryRun: args.includes('--dry-run') }), null, 2));
27
+ }
28
+ else if (area === 'atlas' && action === 'validate') {
29
+ const [atlasFile] = args;
30
+ requireValue(atlasFile, 'roost2d atlas validate <atlas.json>');
31
+ fail(await validateAtlasFiles(resolve(atlasFile)));
32
+ }
33
+ else if (area === 'rig' && action === 'validate') {
34
+ const [rigFile] = args;
35
+ requireValue(rigFile, 'roost2d rig validate <rig.json>');
36
+ fail(await validateRigFile(resolve(rigFile)));
37
+ }
38
+ else if (area === 'animation' && action === 'validate') {
39
+ const [animationFile, rigFile] = args;
40
+ requireValue(animationFile, 'roost2d animation validate <animations.json> [rig.json]');
41
+ fail(await validateAnimationFile(resolve(animationFile), rigFile ? resolve(rigFile) : undefined));
42
+ }
43
+ else if (area === 'licenses' && action === 'validate') {
44
+ const [rightsFile, sourceRoot] = args;
45
+ requireValue(rightsFile && sourceRoot, 'roost2d licenses validate <rights.json> <source-root>');
46
+ fail(await verifyRightsFiles(await readJson(resolve(rightsFile)), resolve(sourceRoot)));
47
+ }
48
+ else if (area === 'project' && action === 'create') {
49
+ const [directory] = args;
50
+ requireValue(directory, 'roost2d project create <directory>');
51
+ await createProject(resolve(directory));
52
+ }
53
+ else if (area === 'verify-boundary') {
54
+ const [sourceRoot] = [action, ...args];
55
+ requireValue(sourceRoot, 'roost2d verify-boundary <source-root>');
56
+ fail(await verifyToolingBoundary(resolve(sourceRoot)));
57
+ }
58
+ else if (area === 'verify-package-boundary') {
59
+ const [packageFile] = [action, ...args];
60
+ requireValue(packageFile, 'roost2d verify-package-boundary <package.json>');
61
+ fail(await verifyToolingPackageGraph(resolve(packageFile)));
62
+ }
63
+ else {
64
+ throw new Error('commands: assets scan|validate|manifest, atlas build|validate, rig validate, animation validate, licenses validate, project create');
65
+ }
66
+ function requireValue(value, usage) { if (!value)
67
+ throw new Error(`usage: ${usage}`); }
68
+ async function readJson(path) { const parsed = await readJsonFile(path); if (!parsed.ok)
69
+ throw new Error(parsed.errors.join('\n')); return parsed.value; }
70
+ function fail(errors) { if (errors.length)
71
+ throw new Error(errors.join('\n')); }
72
+ async function writeJson(path, value) { await writeFile(resolve(path), `${JSON.stringify(value, null, 2)}\n`); }
73
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,YAAY,EAC9F,qBAAqB,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,EAC/E,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,EACpE,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEtD,IAAI,IAAI,KAAK,QAAQ,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;IAC3C,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,CAAC,GAAG,IAAI,CAAC;IAAC,YAAY,CAAC,SAAS,EAAE,0CAA0C,CAA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,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACpL,SAAS,IAAI,CAAC,MAAgB,IAAU,IAAI,MAAM,CAAC,MAAM;IAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAChG,KAAK,UAAU,SAAS,CAAC,IAAY,EAAE,KAAc,IAAmB,MAAM,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,67 @@
1
+ export type JsonReadResult = {
2
+ ok: true;
3
+ value: unknown;
4
+ } | {
5
+ ok: false;
6
+ errors: string[];
7
+ };
8
+ /** Reads and parses JSON without ever handing a malformed value to a validator. */
9
+ export declare function readJsonFile(path: string): Promise<JsonReadResult>;
10
+ export interface InventoryEntry {
11
+ path: string;
12
+ bytes: number;
13
+ sha256: string;
14
+ }
15
+ export interface ImageInspection extends InventoryEntry {
16
+ width: number;
17
+ height: number;
18
+ alpha: boolean;
19
+ pixelsSha256: string;
20
+ }
21
+ export declare function sha256Hex(bytes: Uint8Array): string;
22
+ export declare function sha256SRI(bytes: Uint8Array): string;
23
+ /** Rights hashes for portable text sources use UTF-8 LF bytes, independent of checkout EOLs. */
24
+ export declare function sourceSha256Hex(bytes: Uint8Array, sourcePath: string): string;
25
+ export declare function createInventory(root: string): Promise<InventoryEntry[]>;
26
+ export declare function inspectImages(root: string): Promise<ImageInspection[]>;
27
+ export declare function findDuplicateImages(images: readonly ImageInspection[]): Array<{
28
+ pixelsSha256: string;
29
+ paths: string[];
30
+ }>;
31
+ export declare function verifyManifestFiles(manifest: unknown, assetRoot: string): Promise<string[]>;
32
+ export declare function verifyRightsFiles(manifest: unknown, sourceRoot: string): Promise<string[]>;
33
+ export interface AtlasSourceConfig {
34
+ directory: string;
35
+ prefix?: string;
36
+ }
37
+ export interface AtlasProfileConfig {
38
+ id: string;
39
+ maxSize: number;
40
+ scale: number;
41
+ padding?: number;
42
+ extrude?: number;
43
+ powerOfTwo?: boolean;
44
+ }
45
+ export interface AtlasBuildConfig {
46
+ sources: AtlasSourceConfig[];
47
+ output: string;
48
+ name: string;
49
+ profiles: AtlasProfileConfig[];
50
+ rotation?: false;
51
+ }
52
+ export declare function buildAtlases(config: AtlasBuildConfig, options?: {
53
+ dryRun?: boolean;
54
+ }): Promise<Array<{
55
+ image: string;
56
+ json: string;
57
+ frames: number;
58
+ }>>;
59
+ export declare function validateAtlasFiles(atlasFile: string): Promise<string[]>;
60
+ export declare function validateRigFile(path: string): Promise<string[]>;
61
+ export declare function validateAnimationFile(path: string, rigPath?: string): Promise<string[]>;
62
+ export declare function assertBudgets(label: string, actualBytes: number, maximumBytes: number): void;
63
+ export declare function createProject(directory: string): Promise<void>;
64
+ /** Ensures the Node-only package does not accidentally take a browser runtime dependency. */
65
+ export declare function verifyToolingBoundary(sourceRoot: string): Promise<string[]>;
66
+ export declare function verifyToolingPackageGraph(packageFile: string): Promise<string[]>;
67
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAE5F,mFAAmF;AACnF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAIxE;AAED,MAAM,WAAW,cAAc;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAA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M,EAAE,CAAC,CAGtF"}
package/dist/index.js ADDED
@@ -0,0 +1,316 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { mkdir, readFile, readdir, realpath, stat, writeFile } from 'node:fs/promises';
3
+ import { basename, dirname, relative, resolve, sep } from 'node:path';
4
+ import sharp from 'sharp';
5
+ import { isSha256SRI, validateAnimationClip, validateAssetManifest, validateAtlasManifest, validateRigDefinition, validateRightsManifest } from '@roost2d/contracts';
6
+ /** Reads and parses JSON without ever handing a malformed value to a validator. */
7
+ export async function readJsonFile(path) {
8
+ let text;
9
+ try {
10
+ text = await readFile(path, 'utf8');
11
+ }
12
+ catch {
13
+ return { ok: false, errors: [`missing or unreadable file: ${path}`] };
14
+ }
15
+ try {
16
+ return { ok: true, value: JSON.parse(text) };
17
+ }
18
+ catch (error) {
19
+ return { ok: false, errors: [`invalid JSON in ${path}: ${error.message}`] };
20
+ }
21
+ }
22
+ export function sha256Hex(bytes) { return createHash('sha256').update(bytes).digest('hex'); }
23
+ export function sha256SRI(bytes) { return `sha256-${createHash('sha256').update(bytes).digest('base64')}`; }
24
+ /** Rights hashes for portable text sources use UTF-8 LF bytes, independent of checkout EOLs. */
25
+ export function sourceSha256Hex(bytes, sourcePath) {
26
+ const canonical = /\.(?:json|txt|md|csv|xml|ya?ml)$/i.test(sourcePath)
27
+ ? Buffer.from(Buffer.from(bytes).toString('utf8').replace(/\r\n?/g, '\n'), 'utf8')
28
+ : bytes;
29
+ return sha256Hex(canonical);
30
+ }
31
+ export async function createInventory(root) {
32
+ const entries = [];
33
+ for (const absolute of await walk(resolve(root))) {
34
+ const bytes = await readFile(absolute);
35
+ entries.push({ path: relative(root, absolute).split(sep).join('/'), bytes: bytes.byteLength, sha256: sha256Hex(bytes) });
36
+ }
37
+ return entries.sort((a, b) => a.path.localeCompare(b.path));
38
+ }
39
+ export async function inspectImages(root) {
40
+ const result = [];
41
+ for (const absolute of (await walk(resolve(root))).filter((path) => /\.(?:png|jpe?g|webp)$/i.test(path))) {
42
+ const bytes = await readFile(absolute);
43
+ const image = sharp(bytes);
44
+ const metadata = await image.metadata();
45
+ const pixels = await image.ensureAlpha().raw().toBuffer();
46
+ if (!metadata.width || !metadata.height)
47
+ throw new Error(`Cannot read image dimensions: ${absolute}`);
48
+ result.push({ path: relative(root, absolute).split(sep).join('/'), bytes: bytes.byteLength, sha256: sha256Hex(bytes), width: metadata.width, height: metadata.height, alpha: metadata.hasAlpha ?? false, pixelsSha256: sha256Hex(pixels) });
49
+ }
50
+ return result.sort((a, b) => a.path.localeCompare(b.path));
51
+ }
52
+ export function findDuplicateImages(images) {
53
+ return [...images.reduce((groups, image) => { const paths = groups.get(image.pixelsSha256) ?? []; paths.push(image.path); groups.set(image.pixelsSha256, paths); return groups; }, new Map())]
54
+ .filter(([, paths]) => paths.length > 1).map(([pixelsSha256, paths]) => ({ pixelsSha256, paths }));
55
+ }
56
+ export async function verifyManifestFiles(manifest, assetRoot) {
57
+ const errors = validateAssetManifest(manifest);
58
+ if (errors.length)
59
+ return errors; // Structural failure: never walk the filesystem with rejected data.
60
+ const { files } = manifest;
61
+ const root = resolve(assetRoot);
62
+ for (const file of files)
63
+ for (const variant of file.variants) {
64
+ const absolute = await containedPath(root, variant.path);
65
+ if (!absolute) {
66
+ errors.push(`${file.id}: path escapes asset root`);
67
+ continue;
68
+ }
69
+ try {
70
+ const [bytes, info] = await Promise.all([readFile(absolute), stat(absolute)]);
71
+ if (info.size !== variant.bytes)
72
+ errors.push(`${file.id}: expected ${variant.bytes} bytes, got ${info.size}`);
73
+ const integrity = sha256SRI(bytes);
74
+ if (!isSha256SRI(variant.integrity.value) || integrity !== variant.integrity.value)
75
+ errors.push(`${file.id}: SHA-256 integrity mismatch`);
76
+ }
77
+ catch {
78
+ errors.push(`${file.id}: missing ${variant.path}`);
79
+ }
80
+ }
81
+ return errors;
82
+ }
83
+ export async function verifyRightsFiles(manifest, sourceRoot) {
84
+ const errors = validateRightsManifest(manifest);
85
+ if (errors.length)
86
+ return errors; // Structural failure: never walk the filesystem with rejected data.
87
+ const { assets, excludedPaths } = manifest;
88
+ const root = resolve(sourceRoot);
89
+ const listed = new Set();
90
+ const excluded = new Set(excludedPaths.map((path) => path.replace(/^sources\//, '')));
91
+ for (const asset of assets) {
92
+ const path = asset.sourcePath.replace(/^sources\//, '');
93
+ listed.add(path);
94
+ const absolute = await containedPath(root, path);
95
+ if (!absolute) {
96
+ errors.push(`${asset.id}: path escapes source root`);
97
+ continue;
98
+ }
99
+ try {
100
+ if (sourceSha256Hex(await readFile(absolute), asset.sourcePath) !== asset.sha256)
101
+ errors.push(`${asset.id}: source SHA-256 mismatch`);
102
+ }
103
+ catch {
104
+ errors.push(`${asset.id}: missing ${asset.sourcePath}`);
105
+ }
106
+ }
107
+ for (const entry of await createInventory(root))
108
+ if (!listed.has(entry.path) && !excluded.has(entry.path))
109
+ errors.push(`unclassified source file: sources/${entry.path}`);
110
+ return errors;
111
+ }
112
+ export async function buildAtlases(config, options = {}) {
113
+ if (!config.sources.length || !config.profiles.length || !config.name)
114
+ throw new Error('Atlas config requires sources, profiles, and name');
115
+ const inputs = [];
116
+ for (const source of config.sources)
117
+ for (const path of (await walk(resolve(source.directory))).filter((value) => /\.(?:png|jpe?g|webp)$/i.test(value))) {
118
+ const metadata = await sharp(path).metadata();
119
+ if (!metadata.width || !metadata.height)
120
+ throw new Error(`Unable to inspect ${path}`);
121
+ const id = [source.prefix, relative(source.directory, path).replace(/\.[^.]+$/, '').split(sep).join('/')].filter(Boolean).join('/');
122
+ inputs.push({ id, path, width: metadata.width, height: metadata.height, bytes: await readFile(path) });
123
+ }
124
+ inputs.sort((a, b) => a.id.localeCompare(b.id));
125
+ const duplicate = inputs.find((input, index) => inputs.findIndex(({ id }) => id === input.id) !== index);
126
+ if (duplicate)
127
+ throw new Error(`Duplicate atlas id: ${duplicate.id}`);
128
+ const outputs = [];
129
+ for (const profile of config.profiles) {
130
+ const pages = pack(inputs, profile);
131
+ for (let index = 0; index < pages.length; index += 1) {
132
+ const page = pages[index];
133
+ const base = `${config.name}-${profile.id}-${String(index + 1).padStart(3, '0')}`;
134
+ const imagePath = resolve(config.output, `${base}.png`);
135
+ const jsonPath = resolve(config.output, `${base}.json`);
136
+ if (!options.dryRun) {
137
+ await mkdir(dirname(imagePath), { recursive: true });
138
+ const composites = await Promise.all(page.items.map(async (item) => {
139
+ const extrude = profile.extrude ?? 0;
140
+ let image = sharp(item.input.bytes).resize(item.width, item.height, { kernel: sharp.kernel.nearest });
141
+ if (extrude)
142
+ image = image.extend({ top: extrude, bottom: extrude, left: extrude, right: extrude, extendWith: 'copy' });
143
+ return { input: await image.png().toBuffer(), left: item.x - extrude, top: item.y - extrude };
144
+ }));
145
+ const png = await sharp({ create: { width: page.width, height: page.height, channels: 4, background: { r: 0, g: 0, b: 0, alpha: 0 } } }).composite(composites).png({ compressionLevel: 9, adaptiveFiltering: false, palette: false }).toBuffer();
146
+ await writeFile(imagePath, png);
147
+ const frames = Object.fromEntries(page.items.map((item) => [item.input.id, { x: item.x, y: item.y, width: item.width, height: item.height, sourceWidth: item.input.width, sourceHeight: item.input.height }]));
148
+ const atlas = { schema: 'roost2d.atlas/v1', profile: profile.id, image: basename(imagePath), integrity: { algorithm: 'sha256', value: sha256SRI(png) }, width: page.width, height: page.height, frames };
149
+ await writeFile(jsonPath, `${JSON.stringify(atlas, null, 2)}\n`);
150
+ }
151
+ outputs.push({ image: imagePath, json: jsonPath, frames: page.items.length });
152
+ }
153
+ }
154
+ return outputs;
155
+ }
156
+ export async function validateAtlasFiles(atlasFile) {
157
+ const parsed = await readJsonFile(atlasFile);
158
+ if (!parsed.ok)
159
+ return parsed.errors;
160
+ const errors = validateAtlasManifest(parsed.value);
161
+ if (errors.length)
162
+ return errors; // The image path is only trustworthy once the contract accepts it.
163
+ const atlas = parsed.value;
164
+ const imagePath = await containedPath(dirname(resolve(atlasFile)), atlas.image);
165
+ if (!imagePath)
166
+ return [`atlas image escapes the atlas directory: ${atlas.image}`];
167
+ try {
168
+ const [bytes, metadata] = await Promise.all([readFile(imagePath), sharp(imagePath).metadata()]);
169
+ if (sha256SRI(bytes) !== atlas.integrity.value)
170
+ errors.push('atlas image integrity mismatch');
171
+ if (metadata.width !== atlas.width || metadata.height !== atlas.height)
172
+ errors.push('atlas image dimensions mismatch');
173
+ }
174
+ catch {
175
+ errors.push(`missing atlas image ${atlas.image}`);
176
+ }
177
+ return errors;
178
+ }
179
+ export async function validateRigFile(path) {
180
+ const parsed = await readJsonFile(path);
181
+ return parsed.ok ? validateRigDefinition(parsed.value) : parsed.errors;
182
+ }
183
+ export async function validateAnimationFile(path, rigPath) {
184
+ const parsed = await readJsonFile(path);
185
+ if (!parsed.ok)
186
+ return parsed.errors;
187
+ let rig;
188
+ if (rigPath) {
189
+ const parsedRig = await readJsonFile(rigPath);
190
+ if (!parsedRig.ok)
191
+ return parsedRig.errors;
192
+ const rigErrors = validateRigDefinition(parsedRig.value);
193
+ if (rigErrors.length)
194
+ return rigErrors;
195
+ rig = parsedRig.value;
196
+ }
197
+ const clips = animationClips(parsed.value);
198
+ if (!clips)
199
+ return [`${path}: expected a clip, an array of clips, or { animations: [...] }`];
200
+ return clips.flatMap((clip) => validateAnimationClip(clip, rig));
201
+ }
202
+ function animationClips(value) {
203
+ if (Array.isArray(value))
204
+ return value;
205
+ if (typeof value !== 'object' || value === null)
206
+ return undefined;
207
+ const animations = value.animations;
208
+ if (animations === undefined)
209
+ return [value];
210
+ return Array.isArray(animations) ? animations : undefined;
211
+ }
212
+ export function assertBudgets(label, actualBytes, maximumBytes) { if (actualBytes > maximumBytes)
213
+ throw new Error(`${label} is ${actualBytes} bytes; budget is ${maximumBytes} bytes`); }
214
+ export async function createProject(directory) {
215
+ const root = resolve(directory);
216
+ try {
217
+ if ((await readdir(root)).length)
218
+ throw new Error(`Project directory is not empty: ${root}`);
219
+ }
220
+ catch (error) {
221
+ if (error.code !== 'ENOENT')
222
+ throw error;
223
+ }
224
+ await mkdir(resolve(root, 'src'), { recursive: true });
225
+ await writeFile(resolve(root, 'package.json'), `${JSON.stringify({ name: basename(root), private: true, type: 'module', scripts: { dev: 'vite', build: 'vite build' }, dependencies: { '@roost2d/core': '^0.1.0', '@roost2d/pixi': '^0.1.0', 'pixi.js': '^8.0.0' }, devDependencies: { typescript: '^5.8.0', vite: '^8.0.0' } }, null, 2)}\n`);
226
+ await writeFile(resolve(root, 'index.html'), '<div id="game"></div><script type="module" src="/src/main.ts"></script>\n');
227
+ await writeFile(resolve(root, 'src/main.ts'), "import { GameRuntime } from '@roost2d/core';\nconst runtime = new GameRuntime();\nconsole.log('Roost2D ready', runtime);\n");
228
+ }
229
+ /** Ensures the Node-only package does not accidentally take a browser runtime dependency. */
230
+ export async function verifyToolingBoundary(sourceRoot) {
231
+ const forbidden = [/from\s+['"]pixi\.js['"]/, /from\s+['"]gsap['"]/, /from\s+['"]@roost2d\/(?:pixi|rig2d)['"]/];
232
+ const findings = [];
233
+ for (const entry of await createInventory(sourceRoot)) {
234
+ if (!entry.path.endsWith('.ts'))
235
+ continue;
236
+ const source = await readFile(resolve(sourceRoot, entry.path), 'utf8');
237
+ if (forbidden.some((pattern) => pattern.test(source)))
238
+ findings.push(`forbidden runtime import: ${entry.path}`);
239
+ }
240
+ return findings;
241
+ }
242
+ export async function verifyToolingPackageGraph(packageFile) {
243
+ const manifest = JSON.parse(await readFile(packageFile, 'utf8'));
244
+ const allowed = new Set(['@roost2d/contracts', 'sharp']);
245
+ const findings = [];
246
+ for (const group of [manifest.dependencies, manifest.peerDependencies, manifest.optionalDependencies])
247
+ for (const dependency of Object.keys(group ?? {}))
248
+ if (!allowed.has(dependency))
249
+ findings.push(`tooling package dependency is not allowed: ${dependency}`);
250
+ return findings;
251
+ }
252
+ function pack(inputs, profile) {
253
+ const padding = profile.padding ?? 2;
254
+ const extrude = profile.extrude ?? 1;
255
+ const pages = [];
256
+ let page = { x: padding + extrude, y: padding + extrude, rowHeight: 0, usedWidth: 1, usedHeight: 1, items: [] };
257
+ const ordered = [...inputs].sort((a, b) => (b.height - a.height) || (b.width - a.width) || a.id.localeCompare(b.id));
258
+ for (const input of ordered) {
259
+ const width = Math.max(1, Math.round(input.width * profile.scale));
260
+ const height = Math.max(1, Math.round(input.height * profile.scale));
261
+ const outerWidth = width + padding * 2 + extrude * 2;
262
+ const outerHeight = height + padding * 2 + extrude * 2;
263
+ if (outerWidth > profile.maxSize || outerHeight > profile.maxSize)
264
+ throw new Error(`${input.id} exceeds atlas size ${profile.maxSize}`);
265
+ if (page.x + width + padding + extrude > profile.maxSize) {
266
+ page.x = padding + extrude;
267
+ page.y += page.rowHeight;
268
+ page.rowHeight = 0;
269
+ }
270
+ if (page.y + height + padding + extrude > profile.maxSize) {
271
+ pages.push(finishPage(page, profile));
272
+ page = { x: padding + extrude, y: padding + extrude, rowHeight: 0, usedWidth: 1, usedHeight: 1, items: [] };
273
+ }
274
+ page.items.push({ input, x: page.x, y: page.y, width, height, outerWidth, outerHeight });
275
+ page.x += outerWidth;
276
+ page.rowHeight = Math.max(page.rowHeight, outerHeight);
277
+ page.usedWidth = Math.max(page.usedWidth, page.x);
278
+ page.usedHeight = Math.max(page.usedHeight, page.y + height + padding + extrude);
279
+ }
280
+ if (page.items.length)
281
+ pages.push(finishPage(page, profile));
282
+ return pages;
283
+ }
284
+ function finishPage(page, profile) { const size = (value) => profile.powerOfTwo ? 2 ** Math.ceil(Math.log2(value)) : value; return { width: Math.min(profile.maxSize, size(page.usedWidth)), height: Math.min(profile.maxSize, size(page.usedHeight)), items: page.items }; }
285
+ async function walk(directory) { const result = []; for (const entry of await readdir(directory, { withFileTypes: true })) {
286
+ const absolute = resolve(directory, entry.name);
287
+ if (entry.isDirectory())
288
+ result.push(...await walk(absolute));
289
+ else if (entry.isFile())
290
+ result.push(absolute);
291
+ } return result; }
292
+ function isInside(root, path) { return path === root || path.startsWith(root + sep); }
293
+ /**
294
+ * Resolves `relativePath` under `root` and returns it only when it is genuinely contained. A lexical
295
+ * prefix test alone is not enough: a symlink or Windows junction inside the root can point anywhere,
296
+ * so the candidate itself (including a final-file symlink) is canonicalised before the comparison.
297
+ * Returns `undefined` — never a path — when containment cannot be established, so callers fail closed.
298
+ */
299
+ async function containedPath(root, relativePath) {
300
+ const absoluteRoot = resolve(root);
301
+ const lexical = resolve(absoluteRoot, relativePath);
302
+ if (!isInside(absoluteRoot, lexical))
303
+ return undefined;
304
+ const realRoot = await realpath(absoluteRoot).catch(() => undefined);
305
+ if (!realRoot)
306
+ return undefined;
307
+ const realCandidate = await realpath(lexical).catch(() => undefined);
308
+ if (realCandidate)
309
+ return isInside(realRoot, realCandidate) ? realCandidate : undefined;
310
+ const realDirectory = await realpath(dirname(lexical)).catch(() => undefined);
311
+ if (!realDirectory)
312
+ return lexical; // Directory does not exist; the read below reports it as missing.
313
+ const canonical = resolve(realDirectory, basename(lexical));
314
+ return isInside(realRoot, canonical) ? canonical : undefined;
315
+ }
316
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAIrK,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QAAC,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EA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1.0-rc.0",
4
+ "description": "Node-only manifest, inventory, integrity, and architecture tooling for Roost2D.",
5
+ "license": "Apache-2.0",
6
+ "repository": { "type": "git", "url": "git+https://github.com/Roost2D/roost2d.git", "directory": "packages/tooling" },
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "files": [
10
+ "dist",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ }
19
+ },
20
+ "bin": {
21
+ "roost2d": "dist/cli.js",
22
+ "roost2d-tooling": "dist/cli.js"
23
+ },
24
+ "dependencies": {
25
+ "@roost2d/contracts": "0.1.0-rc.0",
26
+ "sharp": "^0.35.3"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "scripts": {
32
+ "build": "tsc -p tsconfig.json",
33
+ "check": "tsc --noEmit -p tsconfig.json",
34
+ "test": "node --test test/*.test.mjs"
35
+ }
36
+ }