Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Add validator to check correct version of extension for PS and AE #397

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Dec 9, 2021

Requires ynput/OpenPype#2387

Contains also #391 which should be merged first.

@mkolar
Copy link
Member

mkolar commented Dec 9, 2021

@kalisp kalisp self-assigned this Dec 9, 2021
}
}
}
return version
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

'text/xml');
const children = xmlDoc.children;

for (let i = 0; i <= children.length; i++) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

const parser = new DOMParser();
const xmlDoc = parser.parseFromString(result.data.toString(),
'text/xml');
const children = xmlDoc.children;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

if(result.err === 0){
if (window.DOMParser) {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(result.data.toString(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

var version = undefined;
if(result.err === 0){
if (window.DOMParser) {
const parser = new DOMParser();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

log.debug("extension path " + path);

var result = window.cep.fs.readFile(path + "/CSXS/manifest.xml");
var version = undefined;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to initialize 'version' to 'undefined'.

@@ -28,6 +28,33 @@ async function startUp(url){
main(res);
}

function get_extension_version(){
/** Returns version number from extension manifest.xml **/
log.debug("get_extension_version")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

@kalisp kalisp requested review from 64qam and mkolar December 9, 2021 13:22
}
}
}
return version
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

@64qam 64qam self-requested a review December 14, 2021 13:45
@kalisp kalisp merged commit 363f010 into develop Dec 14, 2021
@kalisp kalisp deleted the feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE branch December 14, 2021 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants