From 283198312a4f58469942063f9b61328eadc1dac5 Mon Sep 17 00:00:00 2001 From: Eric Maslowski Date: Fri, 9 Aug 2024 11:54:34 -0400 Subject: [PATCH] [WIP] Building updated Cook File Validator --- .../job/impl/Cook/JobCookSIGenerateDownloads.ts | 15 +++++++++++++++ tsconfig.json | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/server/job/impl/Cook/JobCookSIGenerateDownloads.ts b/server/job/impl/Cook/JobCookSIGenerateDownloads.ts index d3d1d10e0..23bed532a 100644 --- a/server/job/impl/Cook/JobCookSIGenerateDownloads.ts +++ b/server/job/impl/Cook/JobCookSIGenerateDownloads.ts @@ -999,6 +999,21 @@ export class JobCookSIGenerateDownloads extends JobCook): Promise { + + const result: H.IOResults = await super.verifyIncomingCookData(sceneSource, fileMap); + if(result.success == false) + return this.logError('verifyIncomingCookData base failed'); + + // fileMap is the list of received downloads. make sure we have all of the expected files + console.log(fileMap); + // const suffixes: string[] = ['-150k-4096_std.glb','-100k-2048_std_draco.glb','.svx.json','-100k-2048_std.usdz','-full_resolution-obj_std.zip','-150k-4096-gltf_std.zip','-150k-4096-obj_std.zip']; + + // make sure we have all downloads accounted for. if 'count' differs then we fail + + // get all assets from scene. if we have asset with the same suffix as in Map then we check the basenames (different = fail) + } + protected async verifyIncomingCookData(sceneSource: DBAPI.Scene, fileMap: Map): Promise { const result: H.IOResults = await super.verifyIncomingCookData(sceneSource, fileMap); diff --git a/tsconfig.json b/tsconfig.json index 6656e145a..e58521ba9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,8 @@ "strictFunctionTypes": true, "noImplicitThis": true, "alwaysStrict": true, - // "noUnusedLocals": true, - // "noUnusedParameters": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "esModuleInterop": true