util::resources::cdnjs_get_newest_version (public)
util::resources::cdnjs_get_newest_version -resource_info resource_info
Defined in packages/acs-tcl/tcl/utilities-procs.tcl
Return the newest version for the library denoted by 'resource_info' from cdnjs.
- Switches:
- -resource_info (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set version unknown if {![dict exists $resource_info versionCheckAPI]} { return $version } set versionCheckAPI [dict get $resource_info versionCheckAPI] dict with resource_info { set library [dict get $versionCheckAPI library] #ns_log notice ... versionCheckAPI $versionCheckAPI configuredVersion $configuredVersion if {[dict get $versionCheckAPI cdn] eq "cdnjs"} { set url [::util::resources::cdnjs_version_API -library $library -count [dict get $versionCheckAPI count]] set json [http_get_with_default -url $url -key versionCheck-$library -default {{"results": ""}}] set jsonDict [util::json2dict $json] #ns_log notice "=== jsonDict $library: $jsonDict" foreach entry [dict get $jsonDict results] { #ns_log notice "... $library compare with '[dict get $entry name]' -> [expr {[dict get $entry name] eq $library}]" if {[dict get $entry name] eq $library} { set version [dict get $entry version] break } } } } return $versionXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/utilities-procs.xql