@rimelight/config 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/astro/index.js CHANGED
@@ -206,7 +206,11 @@ function rimelightIntegration(options, imageDomains, domain, site) {
206
206
 
207
207
  if (options.security) {
208
208
  const secMod = await import("@rimelight/security")
209
- const { security: securityFn } = secMod
209
+ const secFn =
210
+ secMod.rimelightSecurity ||
211
+ secMod.default?.rimelightSecurity ||
212
+ secMod.default ||
213
+ secMod
210
214
  const secOpts = typeof options.security === "object" ? options.security : {}
211
215
  const defaultImgSrc = imageDomains.map((d) =>
212
216
  d.startsWith("http://") || d.startsWith("https://") ? d : `https://${d}`
@@ -215,8 +219,8 @@ function rimelightIntegration(options, imageDomains, domain, site) {
215
219
  ? Array.from(new Set([...defaultImgSrc, ...secOpts.imgSrc]))
216
220
  : defaultImgSrc
217
221
 
218
- plugins.push(
219
- securityFn({
222
+ integrations.push(
223
+ secFn({
220
224
  domain: secOpts.domain || domain,
221
225
  imgSrc,
222
226
  ...secOpts
package/astro/index.ts CHANGED
@@ -309,7 +309,11 @@ function rimelightIntegration(
309
309
 
310
310
  if (options.security) {
311
311
  const secMod = await import("@rimelight/security")
312
- const { security: securityFn } = secMod as any
312
+ const secFn =
313
+ (secMod as any).rimelightSecurity ||
314
+ (secMod as any).default?.rimelightSecurity ||
315
+ (secMod as any).default ||
316
+ secMod
313
317
  const secOpts = typeof options.security === "object" ? options.security : {}
314
318
  const defaultImgSrc = imageDomains.map((d: string) =>
315
319
  d.startsWith("http://") || d.startsWith("https://") ? d : `https://${d}`
@@ -318,8 +322,8 @@ function rimelightIntegration(
318
322
  ? Array.from(new Set([...defaultImgSrc, ...secOpts.imgSrc]))
319
323
  : defaultImgSrc
320
324
 
321
- plugins.push(
322
- securityFn({
325
+ integrations.push(
326
+ secFn({
323
327
  domain: secOpts.domain || domain,
324
328
  imgSrc,
325
329
  ...secOpts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimelight/config",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "private": false,
5
5
  "description": "Rimelight Entertainment's shared configuration package",
6
6
  "homepage": "https://rimelight.com/docs",
@@ -58,7 +58,7 @@
58
58
  "@rimelight/auth": "0.0.10",
59
59
  "@rimelight/cms": "0.0.17",
60
60
  "@rimelight/i18n": "0.0.17",
61
- "@rimelight/security": "0.0.19",
61
+ "@rimelight/security": "0.0.20",
62
62
  "@rimelight/seo": "0.0.13",
63
63
  "@rimelight/ui": "0.0.57",
64
64
  "astro": ">=7.0.0",