cookieconsent::resource_info (public)
cookieconsent::resource_info [ -version version ]
Defined in packages/cookie-consent/tcl/cookie-consent-procs.tcl
Get information about available version(s) of the cookieconsent packages, either from the local filesystem, or from CDN.
- Switches:
- -version (optional)
- Returns:
- dict containing resourceDir, resourceName, cdn, cdnHost, prefix, cssFiles, jsFiles and extraFiles.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- cookie_consent__setup
Source code: variable parameter_info # # If no version of the cookie consent library was specified, # use the name-spaced variable as default. # if {$version eq ""} { dict with parameter_info { set version [::parameter::get_global_value -package_key $package_key -parameter $parameter_name -default $default_value] } } # # Provide paths for loading either via resources or CDN # # "resourceDir" is the absolute path in the filesystem # "versionSegment" is the version-specific element both in the # URL and in the filesystem. set resourceDir [acs_package_root_dir cookie-consent/www/resources] set cdn //cdnjs.cloudflare.com/ajax/libs/cookieconsent2 # # If the resources are not available locally, these will be # loaded via CDN and the CDN host is set (necessary for CSP). # The returned "prefix" indicates the place, from where the # resource will be loaded. # if {[file exists $resourceDir/$version]} { set prefix /resources/cookie-consent/$version/ set cdnHost "" } else { set prefix $cdn/$version/ set cdnHost cdnjs.cloudflare.com } lappend result resourceName "Cookie Consent Widget" resourceDir $resourceDir cdn $cdn cdnHost $cdnHost prefix $prefix cssFiles {cookieconsent.min.css} jsFiles {cookieconsent.min.js} extraFiles {} versionCheckAPI {cdn cdnjs library cookieconsent2 count 5} vulnerabilityCheck {service snyk library cookieconsent2} parameterInfo $parameter_info configuredVersion $version return $resultXQL Not present: Generic, PostgreSQL, Oracle