Index: openacs-4/packages/bootstrap-icons/bootstrap-icons.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bootstrap-icons/bootstrap-icons.info,v
diff -u -r1.1.2.11 -r1.1.2.12
--- openacs-4/packages/bootstrap-icons/bootstrap-icons.info 24 Jul 2024 17:07:54 -0000 1.1.2.11
+++ openacs-4/packages/bootstrap-icons/bootstrap-icons.info 11 Aug 2024 07:34:45 -0000 1.1.2.12
@@ -9,15 +9,15 @@
f
f
-
+
Gustaf Neumann
Free, high-quality, open-source icon library with over 1,600 icons. Include them anyway you like—SVGs, SVG sprite, or web fonts. Use them with or without Bootstrap in any project.
2023-05-12
0
-
+
-
+
Index: openacs-4/packages/bootstrap-icons/tcl/resource-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bootstrap-icons/tcl/resource-init.tcl,v
diff -u -r1.1.2.10 -r1.1.2.11
--- openacs-4/packages/bootstrap-icons/tcl/resource-init.tcl 30 Jul 2024 10:25:44 -0000 1.1.2.10
+++ openacs-4/packages/bootstrap-icons/tcl/resource-init.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.11
@@ -2,52 +2,8 @@
Initialization for Bootstrap Icons
}
-set resource_info [::bootstrap_icons::resource_info]
+::util::resources::register_urns -namespace bootstrap_icons
-if {[dict exists $resource_info cdnHost] && [dict get $resource_info cdnHost] ne ""} {
- #
- # The .min.css is just on the CDN
- #
- set fn bootstrap-icons.min.css
-
- #
- # Add global CSP rules.
- #
- lappend ::security::csp::default_directives \
- style-src [dict get $resource_info cdnHost] \
- font-src [dict get $resource_info cdnHost]
-
-} else {
- #
- # Unfortunately, the structure of the distributed .zip file is a
- # moving target. Sometimes, a sub folder "fonts" is used,
- # sometimes, minifiled versions are included. Check in the
- # filesystem, what we have actually got.
- #
- set version [dict get $resource_info configuredVersion]
- set fspath [dict get $resource_info resourceDir]/bootstrap-icons-$version
-
- #
- # Do we have the subdirectory "font"? If yes, use it.
- #
- set subdir [expr {[file isdirectory $fspath/font] ? "font/" : ""}]
- #
- # Do we have a minified version? If yes, use it.
- #
- set fn [expr {[file exists $fspath/${subdir}bootstrap-icons.min.css]
- ? "${subdir}bootstrap-icons.min.css"
- : "${subdir}bootstrap-icons.css"}]
-}
-
-set URN urn:ad:css:bootstrap-icons
-ns_log notice "CSS [dict get $resource_info prefix]/$fn "
-template::register_urn \
- -urn $URN \
- -resource [dict get $resource_info prefix]/$fn \
- -csp_list [expr {[dict exists $resource_info cspMap $URN]
- ? [dict get $resource_info cspMap $URN]
- : ""}]
-
# Local variables:
# mode: tcl
# tcl-indent-level: 4
Index: openacs-4/packages/bootstrap-icons/tcl/resource-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bootstrap-icons/tcl/resource-procs.tcl,v
diff -u -r1.1.2.16 -r1.1.2.17
--- openacs-4/packages/bootstrap-icons/tcl/resource-procs.tcl 30 Jul 2024 10:25:44 -0000 1.1.2.16
+++ openacs-4/packages/bootstrap-icons/tcl/resource-procs.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.17
@@ -64,33 +64,52 @@
set prefix /resources/bootstrap-icons/bootstrap-icons-$version
set cdnHost ""
set cspMap ""
+
+ #
+ # Unfortunately, the structure of the distributed .zip file is a
+ # moving target. Sometimes, a sub folder "fonts" is used,
+ # sometimes, minifiled versions are included. Check in the
+ # filesystem, what we have actually got.
+ #
+ set fspath $resourceDir/bootstrap-icons-$version
+
+ #
+ # Do we have the subdirectory "font"? If yes, use it.
+ #
+ set subdir [expr {[file isdirectory $fspath/font] ? "font/" : ""}]
+ #
+ # Do we have a minified version? If yes, use it.
+ #
+ set fn [expr {[file exists $fspath/${subdir}bootstrap-icons.min.css]
+ ? "${subdir}bootstrap-icons.min.css"
+ : "${subdir}bootstrap-icons.css"}]
+
+ dict set URNs urn:ad:css:bootstrap-icons $fn
} else {
#
# Use CDN
#
- # cloudflare has the following resources:
+ # cloudflare has e.g. the following resources:
#
# https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/bootstrap-icons.svg
# https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/font/bootstrap-icons.min.css
# https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/icons/123.svg
#
# We just need the CSS file, which is on the CDN in the
# "font" directory.
+ #
set prefix $cdn/ajax/libs/bootstrap-icons/$version/font
+
+ #
+ # Use always the minified version over the CDN
+ #
+ dict set URNs urn:ad:css:bootstrap-icons bootstrap-icons.min.css
+
set cspMap [subst {
urn:ad:css:bootstrap-icons {
style-src $cdnHost
font-src $cdnHost
}}]
- #
- #
- # Other potential source:
- #
- # @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css");
- #
- #
- #set cdnHost cdn.jsdelivr.net
-
}
#
@@ -107,7 +126,7 @@
extraFiles {} \
downloadURLs https://github.com/twbs/icons/releases/download/v${version}/bootstrap-icons-${version}.zip \
cspMap $cspMap \
- urnMap {} \
+ urnMap $URNs \
versionCheckAPI {cdn cdnjs library bootstrap-icons count 1} \
parameterInfo $parameter_info \
configuredVersion $version
Index: openacs-4/packages/fa-icons/fa-icons.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/fa-icons/fa-icons.info,v
diff -u -r1.1.2.10 -r1.1.2.11
--- openacs-4/packages/fa-icons/fa-icons.info 30 Jul 2024 17:45:23 -0000 1.1.2.10
+++ openacs-4/packages/fa-icons/fa-icons.info 11 Aug 2024 07:34:45 -0000 1.1.2.11
@@ -9,16 +9,16 @@
f
f
-
+
Gustaf Neumann
2023-07-06
Free, high-quality,
open-source icon library with over 2,000 free icons. As of 2020, Font Awesome was used by 38% of sites that use third-party font scripts, placing Font Awesome in second place after Google Fonts.
0
-
+
-
+
Index: openacs-4/packages/fa-icons/tcl/resource-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/fa-icons/tcl/resource-init.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/fa-icons/tcl/resource-init.tcl 17 Apr 2022 10:41:37 -0000 1.1.2.1
+++ openacs-4/packages/fa-icons/tcl/resource-init.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.2
@@ -1,22 +1,5 @@
-
-set resource_info [::fa_icons::resource_info]
-
-set fn all.min.css
-
-if {[dict exists $resource_info cdnHost] && [dict get $resource_info cdnHost] ne ""} {
- #
- # Add global CSP rules.
- #
- #lappend ::security::csp::default_directives \
- # style-src [dict get $resource_info cdnHost] \
- # font-src [dict get $resource_info cdnHost]
-
+ad_library {
+ Initialization for fa-icons
}
-set URN urn:ad:css:fa-icons
-template::register_urn \
- -urn $URN \
- -resource [dict get $resource_info prefix]/$fn \
- -csp_list [expr {[dict exists $resource_info cspMap $URN]
- ? [dict get $resource_info cspMap $URN]
- : ""}]
+::util::resources::register_urns -namespace fa_icons
Index: openacs-4/packages/fa-icons/tcl/resource-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/fa-icons/tcl/resource-procs.tcl,v
diff -u -r1.1.2.12 -r1.1.2.13
--- openacs-4/packages/fa-icons/tcl/resource-procs.tcl 30 Jul 2024 10:25:44 -0000 1.1.2.12
+++ openacs-4/packages/fa-icons/tcl/resource-procs.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.13
@@ -74,12 +74,14 @@
# We just need the CSS file, which is on the CDN in the
# "font" directory.
set prefix $cdn/ajax/libs/font-awesome/$version/css
+
set cspMap [subst {
urn:ad:css:fa-icons {
style-src $cdnHost
font-src $cdnHost
}}]
}
+ dict set URNs urn:ad:css:fa-icons all.min.css
#
# Return the dict with at least the required fields
@@ -95,7 +97,7 @@
extraFiles {} \
downloadURLs https://github.com/FortAwesome/Font-Awesome/releases/download/${version}/fontawesome-free-${version}-web.zip \
cspMap $cspMap \
- urnMap {} \
+ urnMap $URNs \
versionCheckAPI {cdn cdnjs library font-awesome count 5} \
parameterInfo $parameter_info \
configuredVersion $version
Index: openacs-4/packages/highcharts/highcharts.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/highcharts/highcharts.info,v
diff -u -r1.1.2.7 -r1.1.2.8
--- openacs-4/packages/highcharts/highcharts.info 24 Jul 2024 17:07:55 -0000 1.1.2.7
+++ openacs-4/packages/highcharts/highcharts.info 11 Aug 2024 07:34:45 -0000 1.1.2.8
@@ -9,13 +9,13 @@
f
f
-
+
Gustaf Neumann
The Highcharts library is a JavaScript and TypeScript package for producing data visualizations (line/bar/pie charts etc.). The OpenACS package offers support to load this library either via CDN or from a local installation (via acs-admin and global administration UI).
0
-
-
+
+
Index: openacs-4/packages/highcharts/tcl/resource-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/highcharts/tcl/resource-init.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/highcharts/tcl/resource-init.tcl 23 Oct 2022 18:41:18 -0000 1.1.2.1
+++ openacs-4/packages/highcharts/tcl/resource-init.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.2
@@ -1 +1 @@
-::highcharts::register_urns
+::util::resources::register_urns -namespace highcharts
Index: openacs-4/packages/highcharts/tcl/resource-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/highcharts/tcl/resource-procs.tcl,v
diff -u -r1.1.2.18 -r1.1.2.19
--- openacs-4/packages/highcharts/tcl/resource-procs.tcl 30 Jul 2024 10:25:44 -0000 1.1.2.18
+++ openacs-4/packages/highcharts/tcl/resource-procs.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.19
@@ -62,6 +62,11 @@
set prefix /resources/highcharts/$version/code
set cdnHost ""
set cspMap ""
+ dict set URNs urn:ad:js:highcharts $prefix/highcharts.js
+ dict set URNs urn:ad:js:highcharts-more $prefix/highcharts-more.js
+ dict set URNs urn:ad:js:highcharts/modules/exporting $prefix/modules/exporting.js
+ dict set URNs urn:ad:js:highcharts/modules/accessibility $prefix/modules/accessibility.js
+
} else {
#
# Use CDN
@@ -72,11 +77,12 @@
script-src $cdnHost
}}]
#
+ # Use minified versions from CDN
#
- # Other potential sources:
- #
- # https://www.highcharts.com/blog/download/
- # https://www.jsdelivr.com/package/npm/highcharts
+ dict set URNs urn:ad:js:highcharts $prefix/highcharts.min.js
+ dict set URNs urn:ad:js:highcharts-more $prefix/highcharts-more.min.js
+ dict set URNs urn:ad:js:highcharts/modules/exporting $prefix/modules/exporting.min.js
+ dict set URNs urn:ad:js:highcharts/modules/accessibility $prefix/modules/accessibility.min.js
}
#
@@ -95,7 +101,7 @@
https://code.highcharts.com/zips/Highcharts-$version.zip
}] \
cspMap $cspMap \
- urnMap {} \
+ urnMap $URNs \
versionCheckAPI {cdn cdnjs library highcharts count 5} \
vulnerabilityCheck {service snyk library highcharts} \
parameterInfo $parameter_info \
@@ -149,44 +155,8 @@
-destination $resourceDir/$versionSegment
}
}
-
- ad_proc -private ::highcharts::register_urns {} {
- Register URNs either with local or with CDN URLs.
- } {
- set resource_info [::highcharts::resource_info]
- set prefix [dict get $resource_info prefix]
-
- if {[dict exists $resource_info cdnHost] && [dict get $resource_info cdnHost] ne ""} {
- #
- # Settings for the CDN, in case it differs
- #
- dict set URNs urn:ad:js:highcharts $prefix/highcharts.min.js
- dict set URNs urn:ad:js:highcharts-more $prefix/highcharts-more.min.js
- dict set URNs urn:ad:js:highcharts/modules/exporting $prefix/modules/exporting.min.js
- dict set URNs urn:ad:js:highcharts/modules/accessibility $prefix/modules/accessibility.min.js
-
- } else {
- #
- # Settings for local installs
- #
- dict set URNs urn:ad:js:highcharts $prefix/highcharts.js
- dict set URNs urn:ad:js:highcharts-more $prefix/highcharts-more.js
- dict set URNs urn:ad:js:highcharts/modules/exporting $prefix/modules/exporting.js
- dict set URNs urn:ad:js:highcharts/modules/accessibility $prefix/modules/accessibility.js
- }
-
- foreach {URN resource} $URNs {
- template::register_urn \
- -urn $URN \
- -resource $resource \
- -csp_list [expr {[dict exists $resource_info cspMap $URN]
- ? [dict get $resource_info cspMap $URN]
- : ""}]
- }
- }
}
-
# Local variables:
# mode: tcl
# tcl-indent-level: 4
Index: openacs-4/packages/openacs-bootstrap5-theme/openacs-bootstrap5-theme.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap5-theme/openacs-bootstrap5-theme.info,v
diff -u -r1.1.2.10 -r1.1.2.11
--- openacs-4/packages/openacs-bootstrap5-theme/openacs-bootstrap5-theme.info 24 Jul 2024 17:07:55 -0000 1.1.2.10
+++ openacs-4/packages/openacs-bootstrap5-theme/openacs-bootstrap5-theme.info 11 Aug 2024 07:34:45 -0000 1.1.2.11
@@ -9,7 +9,7 @@
f
f
-
+
manderga
Gustaf Neumann
Theme for OpenACS based on Twitter Bootstrap 5
@@ -23,8 +23,8 @@
GPL version 2
2
-
-
+
+
Index: openacs-4/packages/openacs-bootstrap5-theme/tcl/resource-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap5-theme/tcl/resource-init.tcl,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/packages/openacs-bootstrap5-theme/tcl/resource-init.tcl 30 Jul 2024 10:25:44 -0000 1.1.2.4
+++ openacs-4/packages/openacs-bootstrap5-theme/tcl/resource-init.tcl 11 Aug 2024 07:34:45 -0000 1.1.2.5
@@ -1,25 +1,8 @@
#
# Register some URNs that we are providing for sharing.
#
-set resource_info [::openacs_bootstrap5_theme::resource_info]
-set version [dict get $resource_info configuredVersion]
-set prefix [dict get $resource_info prefix]
+::util::resources::register_urns -namespace openacs_bootstrap5_theme
-foreach URN [dict keys [dict get $resource_info urnMap]] {
- ns_log notice REGISTER=[list template::register_urn \
- -urn $URN \
- -resource $prefix/[dict get $resource_info urnMap $URN] \
- -csp_list [expr {[dict exists $resource_info cspMap $URN]
- ? [dict get $resource_info cspMap $URN]
- : ""}]]
- template::register_urn \
- -urn $URN \
- -resource $prefix/[dict get $resource_info urnMap $URN] \
- -csp_list [expr {[dict exists $resource_info cspMap $URN]
- ? [dict get $resource_info cspMap $URN]
- : ""}]
-}
-
#
# Strictly speaking, jquery is not necessary for bootstrap 5. However,
# to ease the migration from bootstrap 3 to 5, we still include it.