-
Notifications
You must be signed in to change notification settings - Fork 6
Add validator to check correct version of extension for PS and AE #397
Add validator to check correct version of extension for PS and AE #397
Conversation
…e/OP-2019_Create-test-publish-class-for-AE
…feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE
} | ||
} | ||
} | ||
return version |
There was a problem hiding this comment.
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++) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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(), |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
} | ||
} | ||
} | ||
return version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
Requires ynput/OpenPype#2387
Contains also #391 which should be merged first.