dcl-ops-lib 9.9.0 → 9.9.1

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.
Files changed (2) hide show
  1. package/buildStatic.js +7 -3
  2. package/package.json +1 -1
package/buildStatic.js CHANGED
@@ -97,9 +97,13 @@ function buildStatic(staticSite) {
97
97
  },
98
98
  cachePolicyId: staticSite.cachePolicyId,
99
99
  responseHeadersPolicyId: staticSite.responseHeadersPolicyId,
100
- minTtl: 0,
101
- defaultTtl: tenMinutes,
102
- maxTtl: aYear,
100
+ // Only set the legacy inline TTLs when there is no cache policy. When a
101
+ // cachePolicyId is provided the policy governs TTLs and CloudFront ignores
102
+ // these, so setting them produces a permanent no-op diff (0 => 600 / 0 => aYear)
103
+ // on every preview. Mirrors the forwardedValues handling above.
104
+ minTtl: staticSite.cachePolicyId ? undefined : 0,
105
+ defaultTtl: staticSite.cachePolicyId ? undefined : tenMinutes,
106
+ maxTtl: staticSite.cachePolicyId ? undefined : aYear,
103
107
  compress: true,
104
108
  },
105
109
  // "All" is the most broad distribution, and also the most expensive.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "9.9.0",
3
+ "version": "9.9.1",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "test": "tsc -p tsconfig.test.json && ENVIRONMENT=dev node bin-test/rateLimiting.test.js",