Skip to content

Commit

Permalink
[WIP] Building updated Cook File Validator
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaslowskiQ committed Aug 9, 2024
1 parent bdc6330 commit 2831983
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions server/job/impl/Cook/JobCookSIGenerateDownloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,21 @@ export class JobCookSIGenerateDownloads extends JobCook<JobCookSIGenerateDownloa
return JobCookSIGenerateDownloads.vocabAssetTypeModelGeometryFile;
}

protected async verifyIncomingCookData_NEW(sceneSource: DBAPI.Scene, fileMap: Map<string,string>): Promise<H.IOResults> {

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<string,string>): Promise<H.IOResults> {

const result: H.IOResults = await super.verifyIncomingCookData(sceneSource, fileMap);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"strictFunctionTypes": true,
"noImplicitThis": true,
"alwaysStrict": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true
Expand Down

0 comments on commit 2831983

Please sign in to comment.