@axiumine/koa-utils 9.1.1 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/files/GLB_POLICY_DEFAULTS.d.mts +49 -0
- package/dist/files/GLB_POLICY_DEFAULTS.mjs +45 -0
- package/dist/files/GLB_REJECT_CODES.d.mts +29 -0
- package/dist/files/GLB_REJECT_CODES.mjs +51 -0
- package/dist/files/IGlbContainer.d.mts +12 -0
- package/dist/files/IGlbContainer.mjs +2 -0
- package/dist/files/IGlbSanitiseResult.d.mts +56 -0
- package/dist/files/IGlbSanitiseResult.mjs +2 -0
- package/dist/files/checkGlbContainer.d.mts +11 -0
- package/dist/files/checkGlbContainer.mjs +68 -0
- package/dist/files/sanitiseGlb.d.mts +22 -0
- package/dist/files/sanitiseGlb.mjs +66 -0
- package/dist/files/sanitiseGlbFile.d.mts +16 -0
- package/dist/files/sanitiseGlbFile.mjs +36 -0
- package/dist/files/validateGlbExtension.d.mts +1 -0
- package/dist/files/validateGlbExtension.mjs +9 -0
- package/dist/files/validateMimeTypeGlb.d.mts +5 -0
- package/dist/files/validateMimeTypeGlb.mjs +9 -0
- package/dist/private/glb/IImageSize.d.mts +5 -0
- package/dist/private/glb/IImageSize.mjs +2 -0
- package/dist/private/glb/checkGlbCounts.d.mts +15 -0
- package/dist/private/glb/checkGlbCounts.mjs +53 -0
- package/dist/private/glb/checkGlbExtensions.d.mts +7 -0
- package/dist/private/glb/checkGlbExtensions.mjs +26 -0
- package/dist/private/glb/checkGlbGeometry.d.mts +9 -0
- package/dist/private/glb/checkGlbGeometry.mjs +56 -0
- package/dist/private/glb/checkGlbImages.d.mts +10 -0
- package/dist/private/glb/checkGlbImages.mjs +60 -0
- package/dist/private/glb/checkGlbUris.d.mts +7 -0
- package/dist/private/glb/checkGlbUris.mjs +25 -0
- package/dist/private/glb/glbExtensions.d.mts +7 -0
- package/dist/private/glb/glbExtensions.mjs +13 -0
- package/dist/private/glb/glbIo.d.mts +7 -0
- package/dist/private/glb/glbIo.mjs +16 -0
- package/dist/private/glb/glbReason.d.mts +7 -0
- package/dist/private/glb/glbReason.mjs +14 -0
- package/dist/private/glb/glbStats.d.mts +5 -0
- package/dist/private/glb/glbStats.mjs +24 -0
- package/dist/private/glb/inspectGlbJson.d.mts +8 -0
- package/dist/private/glb/inspectGlbJson.mjs +21 -0
- package/dist/private/glb/jsonAccess.d.mts +17 -0
- package/dist/private/glb/jsonAccess.mjs +24 -0
- package/dist/private/glb/parseGlbJson.d.mts +11 -0
- package/dist/private/glb/parseGlbJson.mjs +14 -0
- package/dist/private/glb/reEncodeImage.d.mts +13 -0
- package/dist/private/glb/reEncodeImage.mjs +24 -0
- package/dist/private/glb/readImageHeader.d.mts +25 -0
- package/dist/private/glb/readImageHeader.mjs +68 -0
- package/dist/private/glb/readJpegSize.d.mts +3 -0
- package/dist/private/glb/readJpegSize.mjs +27 -0
- package/dist/private/glb/readKtx2Size.d.mts +3 -0
- package/dist/private/glb/readKtx2Size.mjs +23 -0
- package/dist/private/glb/reencodeTextures.d.mts +9 -0
- package/dist/private/glb/reencodeTextures.mjs +34 -0
- package/dist/private/glb/resolveGlbPolicy.d.mts +6 -0
- package/dist/private/glb/resolveGlbPolicy.mjs +48 -0
- package/dist/private/glb/rewriteGlb.d.mts +16 -0
- package/dist/private/glb/rewriteGlb.mjs +49 -0
- package/dist/private/glb/stripExtras.d.mts +8 -0
- package/dist/private/glb/stripExtras.mjs +16 -0
- package/dist/private/glb/validateKhronos.d.mts +12 -0
- package/dist/private/glb/validateKhronos.mjs +32 -0
- package/dist/private/glb/verifyGlbOutput.d.mts +8 -0
- package/dist/private/glb/verifyGlbOutput.mjs +20 -0
- package/package.json +62 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { detectImageFormat } from './readImageHeader.mjs';
|
|
2
|
+
import { reEncodeImage } from './reEncodeImage.mjs';
|
|
3
|
+
async function tryReEncode(image, format, policy) {
|
|
4
|
+
try {
|
|
5
|
+
return await reEncodeImage(image, format, policy.textureQuality, policy.maxTextureSide);
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Decode and re-encode every PNG, JPEG and WebP texture with `sharp`, and put the new bytes in the document. A texture
|
|
13
|
+
* that does not decode is a reason, never a throw. KTX2 textures (`KHR_texture_basisu`) cannot be decoded here: their
|
|
14
|
+
* header and level index were checked before, and the bytes go through untouched. Counts into `stats.texturesReencoded`.
|
|
15
|
+
*/
|
|
16
|
+
export async function reencodeTextures(document, policy, stats) {
|
|
17
|
+
const reasons = [];
|
|
18
|
+
for (const [position, texture] of document.getRoot().listTextures().entries()) {
|
|
19
|
+
const image = texture.getImage() ?? new Uint8Array();
|
|
20
|
+
const format = detectImageFormat(image);
|
|
21
|
+
if (format !== null && format.name === 'ktx2') {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const bytes = format === null ? null : await tryReEncode(image, format, policy);
|
|
25
|
+
if (bytes === null) {
|
|
26
|
+
reasons.push({ code: 'IMAGE_DECODE_FAILED', message: `texture ${position} could not be decoded and re-encoded` });
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
texture.setImage(bytes);
|
|
30
|
+
stats.texturesReencoded += 1;
|
|
31
|
+
}
|
|
32
|
+
return reasons;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=reencodeTextures.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IGlbPolicy } from '../../files/GLB_POLICY_DEFAULTS.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* The defaults with the caller's options on top. Throws on misuse: an unknown option, a limit that is not a positive
|
|
4
|
+
* integer, a quality out of range, or an extension the sanitiser has no code for. A field set to `undefined` keeps its default.
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveGlbPolicy(options: Partial<IGlbPolicy>): IGlbPolicy;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GLB_POLICY_DEFAULTS } from '../../files/GLB_POLICY_DEFAULTS.mjs';
|
|
2
|
+
import { GLB_SUPPORTED_EXTENSIONS } from './glbExtensions.mjs';
|
|
3
|
+
function assertKnownKeys(options) {
|
|
4
|
+
for (const key of Object.keys(options)) {
|
|
5
|
+
if (!Object.hasOwn(GLB_POLICY_DEFAULTS, key)) {
|
|
6
|
+
throw new TypeError(`sanitiseGlb: unknown option ${key}`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const NOT_LIMITS = new Set(['allowedExtensions', 'textureQuality']);
|
|
11
|
+
function assertLimits(policy) {
|
|
12
|
+
const fields = { ...policy };
|
|
13
|
+
for (const [name, value] of Object.entries(fields)) {
|
|
14
|
+
if (!NOT_LIMITS.has(name) && (!Number.isSafeInteger(value) || value <= 0)) {
|
|
15
|
+
throw new TypeError(`sanitiseGlb: option ${name} must be a positive integer`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function assertQuality(quality) {
|
|
20
|
+
if (!Number.isInteger(quality) || quality < 1 || quality > 100) {
|
|
21
|
+
throw new TypeError('sanitiseGlb: option textureQuality must be an integer from 1 to 100');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const isSupported = (name) => typeof name === 'string' && GLB_SUPPORTED_EXTENSIONS.includes(name);
|
|
25
|
+
function assertExtensions(allowed) {
|
|
26
|
+
if (!Array.isArray(allowed)) {
|
|
27
|
+
throw new TypeError('sanitiseGlb: option allowedExtensions must be an array of names');
|
|
28
|
+
}
|
|
29
|
+
const unsupported = allowed.filter((name) => !isSupported(name));
|
|
30
|
+
if (unsupported.length > 0) {
|
|
31
|
+
throw new RangeError(`sanitiseGlb: allowedExtensions holds names the sanitiser cannot rewrite: ${unsupported.map(String).join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The defaults with the caller's options on top. Throws on misuse: an unknown option, a limit that is not a positive
|
|
36
|
+
* integer, a quality out of range, or an extension the sanitiser has no code for. A field set to `undefined` keeps its default.
|
|
37
|
+
*/
|
|
38
|
+
export function resolveGlbPolicy(options) {
|
|
39
|
+
assertKnownKeys(options);
|
|
40
|
+
const given = { ...options };
|
|
41
|
+
const defined = Object.fromEntries(Object.entries(given).filter(([, value]) => value !== undefined));
|
|
42
|
+
const policy = { ...GLB_POLICY_DEFAULTS, ...defined };
|
|
43
|
+
assertLimits(policy);
|
|
44
|
+
assertQuality(policy.textureQuality);
|
|
45
|
+
assertExtensions(policy.allowedExtensions);
|
|
46
|
+
return policy;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=resolveGlbPolicy.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WebIO } from '@gltf-transform/core';
|
|
2
|
+
import type { IGlbPolicy } from '../../files/GLB_POLICY_DEFAULTS.mjs';
|
|
3
|
+
import type { IGlbReason, IGlbStats } from '../../files/IGlbSanitiseResult.mjs';
|
|
4
|
+
export type IRewriteResult = {
|
|
5
|
+
glb: Uint8Array;
|
|
6
|
+
reasons: [];
|
|
7
|
+
} | {
|
|
8
|
+
glb: null;
|
|
9
|
+
reasons: IGlbReason[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Read the file with glTF Transform (which decodes the meshopt data, so a stream that does not decode is rejected
|
|
13
|
+
* here), then write a new one: no `extras`, no extension nobody allowed, no unused data, textures re-encoded by
|
|
14
|
+
* `sharp`, one embedded buffer. Never throws on a hostile file.
|
|
15
|
+
*/
|
|
16
|
+
export declare function rewriteGlb(io: WebIO, input: Uint8Array, policy: IGlbPolicy, stats: IGlbStats): Promise<IRewriteResult>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { EXTMeshoptCompression } from '@gltf-transform/extensions';
|
|
2
|
+
import { prune } from '@gltf-transform/functions';
|
|
3
|
+
import { reencodeTextures } from './reencodeTextures.mjs';
|
|
4
|
+
import { stripExtras } from './stripExtras.mjs';
|
|
5
|
+
const failed = (reasons) => ({ glb: null, reasons });
|
|
6
|
+
/** The meshopt decoder throws "Malformed buffer data: <code>" on a stream it cannot decode. */
|
|
7
|
+
const isMeshoptFailure = (error) => /malformed buffer data/i.test(String(error));
|
|
8
|
+
async function readDocument(io, input) {
|
|
9
|
+
try {
|
|
10
|
+
return { document: await io.readBinary(input) };
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
return isMeshoptFailure(error)
|
|
14
|
+
? { reason: { code: 'MESHOPT_DECODE_FAILED', message: 'the EXT_meshopt_compression data does not decode' } }
|
|
15
|
+
: { reason: { code: 'READ_FAILED', message: 'the glTF reader could not read the file' } };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A file that came in with meshopt compression goes out with it: required, and encoded again from the decoded data.
|
|
20
|
+
* Without it the geometry of a 10 MB model would grow several times over.
|
|
21
|
+
*/
|
|
22
|
+
function keepMeshopt(document) {
|
|
23
|
+
document
|
|
24
|
+
.getRoot()
|
|
25
|
+
.listExtensionsUsed()
|
|
26
|
+
.find((extension) => extension.extensionName === EXTMeshoptCompression.EXTENSION_NAME)
|
|
27
|
+
?.setRequired(true);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Read the file with glTF Transform (which decodes the meshopt data, so a stream that does not decode is rejected
|
|
31
|
+
* here), then write a new one: no `extras`, no extension nobody allowed, no unused data, textures re-encoded by
|
|
32
|
+
* `sharp`, one embedded buffer. Never throws on a hostile file.
|
|
33
|
+
*/
|
|
34
|
+
export async function rewriteGlb(io, input, policy, stats) {
|
|
35
|
+
const read = await readDocument(io, input);
|
|
36
|
+
if ('reason' in read) {
|
|
37
|
+
return failed([read.reason]);
|
|
38
|
+
}
|
|
39
|
+
const { document } = read;
|
|
40
|
+
stripExtras(document);
|
|
41
|
+
await document.transform(prune({ keepLeaves: true, keepAttributes: true, keepSolidTextures: true }));
|
|
42
|
+
const reasons = await reencodeTextures(document, policy, stats);
|
|
43
|
+
if (reasons.length > 0) {
|
|
44
|
+
return failed(reasons);
|
|
45
|
+
}
|
|
46
|
+
keepMeshopt(document);
|
|
47
|
+
return { glb: await io.writeBinary(document), reasons: [] };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=rewriteGlb.mjs.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Document } from '@gltf-transform/core';
|
|
2
|
+
/**
|
|
3
|
+
* Empty the `extras` of the root and of every property in the graph: scenes, nodes, meshes, primitives, accessors,
|
|
4
|
+
* materials, texture infos, animations, skins, cameras, buffers and the extension properties. `extras` is free-form
|
|
5
|
+
* JSON that tools and users fill with anything. The writer only reaches a property through the edge of its parent, so
|
|
6
|
+
* the children of the edges, plus the root, are every property that is written.
|
|
7
|
+
*/
|
|
8
|
+
export declare function stripExtras(document: Document): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empty the `extras` of the root and of every property in the graph: scenes, nodes, meshes, primitives, accessors,
|
|
3
|
+
* materials, texture infos, animations, skins, cameras, buffers and the extension properties. `extras` is free-form
|
|
4
|
+
* JSON that tools and users fill with anything. The writer only reaches a property through the edge of its parent, so
|
|
5
|
+
* the children of the edges, plus the root, are every property that is written.
|
|
6
|
+
*/
|
|
7
|
+
export function stripExtras(document) {
|
|
8
|
+
const properties = new Set([document.getRoot()]);
|
|
9
|
+
for (const edge of document.getGraph().listEdges()) {
|
|
10
|
+
properties.add(edge.getChild());
|
|
11
|
+
}
|
|
12
|
+
for (const property of properties) {
|
|
13
|
+
property.setExtras({});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=stripExtras.mjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import validator from 'gltf-validator';
|
|
2
|
+
import type { IGlbReason } from '../../files/IGlbSanitiseResult.mjs';
|
|
3
|
+
type IValidate = typeof validator.validateBytes;
|
|
4
|
+
/**
|
|
5
|
+
* Run the Khronos glTF Validator on a whole GLB. Every error (severity 0) becomes a `VALIDATOR_ERROR` reason, up to
|
|
6
|
+
* `MAX_REASONS`. Warnings, infos and hints never reject. A crash of the validator is `VALIDATOR_FAILED`, not a throw.
|
|
7
|
+
*
|
|
8
|
+
* @param glb the whole GLB file, container and chunks
|
|
9
|
+
* @param validate the validator entry point, a parameter so a spec can make it fail
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateKhronos(glb: Uint8Array, validate?: IValidate): Promise<IGlbReason[]>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import validator from 'gltf-validator';
|
|
2
|
+
import { MAX_REASONS } from './glbReason.mjs';
|
|
3
|
+
/** Messages the validator collects before it stops. Errors come with the structure checks, so they come early. */
|
|
4
|
+
const MAX_ISSUES = 100;
|
|
5
|
+
/**
|
|
6
|
+
* Run the Khronos glTF Validator on a whole GLB. Every error (severity 0) becomes a `VALIDATOR_ERROR` reason, up to
|
|
7
|
+
* `MAX_REASONS`. Warnings, infos and hints never reject. A crash of the validator is `VALIDATOR_FAILED`, not a throw.
|
|
8
|
+
*
|
|
9
|
+
* @param glb the whole GLB file, container and chunks
|
|
10
|
+
* @param validate the validator entry point, a parameter so a spec can make it fail
|
|
11
|
+
*/
|
|
12
|
+
export async function validateKhronos(glb, validate = (bytes, options) => validator.validateBytes(bytes, options)) {
|
|
13
|
+
let issues;
|
|
14
|
+
try {
|
|
15
|
+
issues = (await validate(glb, { maxIssues: MAX_ISSUES })).issues;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return [{ code: 'VALIDATOR_FAILED', message: 'the glTF Validator crashed on the file' }];
|
|
19
|
+
}
|
|
20
|
+
const errors = issues.messages
|
|
21
|
+
.filter((issue) => issue.severity === 0)
|
|
22
|
+
.slice(0, MAX_REASONS)
|
|
23
|
+
.map((issue) => ({
|
|
24
|
+
code: 'VALIDATOR_ERROR',
|
|
25
|
+
message: `${issue.code}: ${issue.message}`,
|
|
26
|
+
...(issue.pointer === undefined ? {} : { pointer: issue.pointer })
|
|
27
|
+
}));
|
|
28
|
+
return errors.length === 0 && issues.numErrors > 0
|
|
29
|
+
? [{ code: 'VALIDATOR_ERROR', message: `the glTF Validator reported ${issues.numErrors} errors` }]
|
|
30
|
+
: errors;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=validateKhronos.mjs.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WebIO } from '@gltf-transform/core';
|
|
2
|
+
import type { IGlbReason } from '../../files/IGlbSanitiseResult.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* Check the file the sanitiser wrote the way an outsider would: the Khronos validator must find no error, and glTF
|
|
5
|
+
* Transform must read it back, meshopt decoding included. Every output must decode, so a file that fails here is never
|
|
6
|
+
* returned, whatever the input looked like.
|
|
7
|
+
*/
|
|
8
|
+
export declare function verifyGlbOutput(io: WebIO, glb: Uint8Array): Promise<IGlbReason[]>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { validateKhronos } from './validateKhronos.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* Check the file the sanitiser wrote the way an outsider would: the Khronos validator must find no error, and glTF
|
|
4
|
+
* Transform must read it back, meshopt decoding included. Every output must decode, so a file that fails here is never
|
|
5
|
+
* returned, whatever the input looked like.
|
|
6
|
+
*/
|
|
7
|
+
export async function verifyGlbOutput(io, glb) {
|
|
8
|
+
const problems = await validateKhronos(glb);
|
|
9
|
+
if (problems.length > 0) {
|
|
10
|
+
return problems.map((problem) => ({ ...problem, code: 'OUTPUT_INVALID' }));
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
await io.readBinary(glb);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return [{ code: 'OUTPUT_INVALID', message: 'the sanitised file does not decode' }];
|
|
17
|
+
}
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=verifyGlbOutput.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiumine/koa-utils",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "Koa Utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -206,6 +206,42 @@
|
|
|
206
206
|
"import": "./dist/files/validatePdfExtension.mjs",
|
|
207
207
|
"types": "./dist/files/validatePdfExtension.d.mts"
|
|
208
208
|
},
|
|
209
|
+
"./files/validateGlbExtension": {
|
|
210
|
+
"import": "./dist/files/validateGlbExtension.mjs",
|
|
211
|
+
"types": "./dist/files/validateGlbExtension.d.mts"
|
|
212
|
+
},
|
|
213
|
+
"./files/validateMimeTypeGlb": {
|
|
214
|
+
"import": "./dist/files/validateMimeTypeGlb.mjs",
|
|
215
|
+
"types": "./dist/files/validateMimeTypeGlb.d.mts"
|
|
216
|
+
},
|
|
217
|
+
"./files/checkGlbContainer": {
|
|
218
|
+
"import": "./dist/files/checkGlbContainer.mjs",
|
|
219
|
+
"types": "./dist/files/checkGlbContainer.d.mts"
|
|
220
|
+
},
|
|
221
|
+
"./files/sanitiseGlb": {
|
|
222
|
+
"import": "./dist/files/sanitiseGlb.mjs",
|
|
223
|
+
"types": "./dist/files/sanitiseGlb.d.mts"
|
|
224
|
+
},
|
|
225
|
+
"./files/sanitiseGlbFile": {
|
|
226
|
+
"import": "./dist/files/sanitiseGlbFile.mjs",
|
|
227
|
+
"types": "./dist/files/sanitiseGlbFile.d.mts"
|
|
228
|
+
},
|
|
229
|
+
"./files/GLB_POLICY_DEFAULTS": {
|
|
230
|
+
"import": "./dist/files/GLB_POLICY_DEFAULTS.mjs",
|
|
231
|
+
"types": "./dist/files/GLB_POLICY_DEFAULTS.d.mts"
|
|
232
|
+
},
|
|
233
|
+
"./files/GLB_REJECT_CODES": {
|
|
234
|
+
"import": "./dist/files/GLB_REJECT_CODES.mjs",
|
|
235
|
+
"types": "./dist/files/GLB_REJECT_CODES.d.mts"
|
|
236
|
+
},
|
|
237
|
+
"./files/IGlbSanitiseResult": {
|
|
238
|
+
"import": "./dist/files/IGlbSanitiseResult.mjs",
|
|
239
|
+
"types": "./dist/files/IGlbSanitiseResult.d.mts"
|
|
240
|
+
},
|
|
241
|
+
"./files/IGlbContainer": {
|
|
242
|
+
"import": "./dist/files/IGlbContainer.mjs",
|
|
243
|
+
"types": "./dist/files/IGlbContainer.d.mts"
|
|
244
|
+
},
|
|
209
245
|
"./graphQL/schema/types/MidNameType": {
|
|
210
246
|
"import": "./dist/graphQL/schema/types/MidNameType.mjs",
|
|
211
247
|
"types": "./dist/graphQL/schema/types/MidNameType.d.mts"
|
|
@@ -1213,6 +1249,9 @@
|
|
|
1213
1249
|
"!dist/**/*.js.map"
|
|
1214
1250
|
],
|
|
1215
1251
|
"peerDependencies": {
|
|
1252
|
+
"@gltf-transform/core": "<5",
|
|
1253
|
+
"@gltf-transform/extensions": "<5",
|
|
1254
|
+
"@gltf-transform/functions": "<5",
|
|
1216
1255
|
"@node-rs/bcrypt": "<2",
|
|
1217
1256
|
"@sentry/node": "<11",
|
|
1218
1257
|
"@socketlabs/email": "<2",
|
|
@@ -1220,10 +1259,12 @@
|
|
|
1220
1259
|
"dotenv": "<18",
|
|
1221
1260
|
"file-type": "<23",
|
|
1222
1261
|
"fs-extra": "<12",
|
|
1262
|
+
"gltf-validator": ">=2.0.0-0 <3",
|
|
1223
1263
|
"graphql": "<18",
|
|
1224
1264
|
"keygrip": "^1.1.0",
|
|
1225
1265
|
"koa": "<4",
|
|
1226
1266
|
"mariadb": "<4",
|
|
1267
|
+
"meshoptimizer": "<2",
|
|
1227
1268
|
"mongoose": "<10",
|
|
1228
1269
|
"pg": "<9",
|
|
1229
1270
|
"redis": "<7",
|
|
@@ -1233,6 +1274,15 @@
|
|
|
1233
1274
|
"sharp": "<1"
|
|
1234
1275
|
},
|
|
1235
1276
|
"peerDependenciesMeta": {
|
|
1277
|
+
"@gltf-transform/core": {
|
|
1278
|
+
"optional": true
|
|
1279
|
+
},
|
|
1280
|
+
"@gltf-transform/extensions": {
|
|
1281
|
+
"optional": true
|
|
1282
|
+
},
|
|
1283
|
+
"@gltf-transform/functions": {
|
|
1284
|
+
"optional": true
|
|
1285
|
+
},
|
|
1236
1286
|
"@node-rs/bcrypt": {
|
|
1237
1287
|
"optional": true
|
|
1238
1288
|
},
|
|
@@ -1254,6 +1304,9 @@
|
|
|
1254
1304
|
"fs-extra": {
|
|
1255
1305
|
"optional": true
|
|
1256
1306
|
},
|
|
1307
|
+
"gltf-validator": {
|
|
1308
|
+
"optional": true
|
|
1309
|
+
},
|
|
1257
1310
|
"graphql": {
|
|
1258
1311
|
"optional": true
|
|
1259
1312
|
},
|
|
@@ -1266,6 +1319,9 @@
|
|
|
1266
1319
|
"mariadb": {
|
|
1267
1320
|
"optional": true
|
|
1268
1321
|
},
|
|
1322
|
+
"meshoptimizer": {
|
|
1323
|
+
"optional": true
|
|
1324
|
+
},
|
|
1269
1325
|
"mongoose": {
|
|
1270
1326
|
"optional": true
|
|
1271
1327
|
},
|
|
@@ -1293,6 +1349,9 @@
|
|
|
1293
1349
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.8.1",
|
|
1294
1350
|
"@eslint/eslintrc": "^3.3.7",
|
|
1295
1351
|
"@eslint/js": "^10.0.1",
|
|
1352
|
+
"@gltf-transform/core": "^4.5.1",
|
|
1353
|
+
"@gltf-transform/extensions": "^4.5.1",
|
|
1354
|
+
"@gltf-transform/functions": "^4.5.1",
|
|
1296
1355
|
"@node-rs/bcrypt": "^1.10.9",
|
|
1297
1356
|
"@sentry/node": "^10.78.0",
|
|
1298
1357
|
"@socketlabs/email": "^1.4.4",
|
|
@@ -1325,11 +1384,13 @@
|
|
|
1325
1384
|
"file-type": "^22.3.0",
|
|
1326
1385
|
"fs-extra": "^11.4.1",
|
|
1327
1386
|
"fta-cli": "^3.1.0",
|
|
1387
|
+
"gltf-validator": "^2.0.0-dev.3.10",
|
|
1328
1388
|
"graphql": "^16.15.0",
|
|
1329
1389
|
"keygrip": "^1.1.0",
|
|
1330
1390
|
"knip": "^6.44.2",
|
|
1331
1391
|
"koa": "^3.3.0",
|
|
1332
1392
|
"mariadb": "^3.5.5",
|
|
1393
|
+
"meshoptimizer": "^1.3.0",
|
|
1333
1394
|
"mocha": "^12.0.3",
|
|
1334
1395
|
"mongodb-memory-server": "^11.3.0",
|
|
1335
1396
|
"mongoose": "^9.12.1",
|