renovate 44.110.0 → 44.110.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.
- package/dist/util/cache/repository/http-cache.js +8 -7
- package/dist/util/cache/repository/http-cache.js.map +1 -1
- package/dist/util/http/cache/abstract-http-cache-provider.js +1 -3
- package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
- package/dist/util/http/cache/package-http-cache-provider.js.map +1 -1
- package/dist/util/http/cache/schema.js +10 -2
- package/dist/util/http/cache/schema.js.map +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
|
@@ -18,13 +18,14 @@ function cleanupHttpCache(cacheData) {
|
|
|
18
18
|
const now = DateTime.now();
|
|
19
19
|
for (const [url, item] of Object.entries(httpCache)) {
|
|
20
20
|
const parsed = HttpCache.safeParse(item);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
21
|
+
if (!parsed.success || !parsed.data) {
|
|
22
|
+
logger.debug(`http cache: removing invalid cache for ${url}`);
|
|
23
|
+
delete httpCache[url];
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (DateTime.fromISO(parsed.data.timestamp).plus({ days: ttlDays }) < now) {
|
|
27
|
+
logger.debug(`http cache: removing expired cache for ${url}`);
|
|
28
|
+
delete httpCache[url];
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-cache.js","names":[],"sources":["../../../../lib/util/cache/repository/http-cache.ts"],"sourcesContent":["import { DateTime } from 'luxon';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { HttpCache } from '../../http/cache/schema.ts';\nimport type { RepoCacheData } from './types.ts';\n\nexport function cleanupHttpCache(cacheData: RepoCacheData): void {\n const { httpCache } = cacheData;\n if (!httpCache) {\n logger.trace('cleanupHttpCache: no http cache to clean up');\n return;\n }\n\n const ttlDays = GlobalConfig.get('httpCacheTtlDays');\n if (ttlDays === 0) {\n logger.trace('cleanupHttpCache: zero value received, removing the cache');\n delete cacheData.httpCache;\n return;\n }\n\n const now = DateTime.now();\n for (const [url, item] of Object.entries(httpCache)) {\n const parsed = HttpCache.safeParse(item);\n
|
|
1
|
+
{"version":3,"file":"http-cache.js","names":[],"sources":["../../../../lib/util/cache/repository/http-cache.ts"],"sourcesContent":["import { DateTime } from 'luxon';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { HttpCache } from '../../http/cache/schema.ts';\nimport type { RepoCacheData } from './types.ts';\n\nexport function cleanupHttpCache(cacheData: RepoCacheData): void {\n const { httpCache } = cacheData;\n if (!httpCache) {\n logger.trace('cleanupHttpCache: no http cache to clean up');\n return;\n }\n\n const ttlDays = GlobalConfig.get('httpCacheTtlDays');\n if (ttlDays === 0) {\n logger.trace('cleanupHttpCache: zero value received, removing the cache');\n delete cacheData.httpCache;\n return;\n }\n\n const now = DateTime.now();\n for (const [url, item] of Object.entries(httpCache)) {\n const parsed = HttpCache.safeParse(item);\n if (!parsed.success || !parsed.data) {\n logger.debug(`http cache: removing invalid cache for ${url}`);\n delete httpCache[url];\n continue;\n }\n const expiry = DateTime.fromISO(parsed.data.timestamp).plus({\n days: ttlDays,\n });\n if (expiry < now) {\n logger.debug(`http cache: removing expired cache for ${url}`);\n delete httpCache[url];\n }\n }\n}\n"],"mappings":";;;;;AAMA,SAAgB,iBAAiB,WAAgC;CAC/D,MAAM,EAAE,cAAc;CACtB,IAAI,CAAC,WAAW;EACd,OAAO,MAAM,6CAA6C;EAC1D;CACF;CAEA,MAAM,UAAU,aAAa,IAAI,kBAAkB;CACnD,IAAI,YAAY,GAAG;EACjB,OAAO,MAAM,2DAA2D;EACxE,OAAO,UAAU;EACjB;CACF;CAEA,MAAM,MAAM,SAAS,IAAI;CACzB,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,GAAG;EACnD,MAAM,SAAS,UAAU,UAAU,IAAI;EACvC,IAAI,CAAC,OAAO,WAAW,CAAC,OAAO,MAAM;GACnC,OAAO,MAAM,0CAA0C,KAAK;GAC5D,OAAO,UAAU;GACjB;EACF;EAIA,IAHe,SAAS,QAAQ,OAAO,KAAK,SAAS,CAAC,CAAC,KAAK,EAC1D,MAAM,QACR,CACS,IAAI,KAAK;GAChB,OAAO,MAAM,0CAA0C,KAAK;GAC5D,OAAO,UAAU;EACnB;CACF;AACF"}
|
|
@@ -2,7 +2,6 @@ import { logger } from "../../../logger/index.js";
|
|
|
2
2
|
import { HttpCacheStats } from "../../stats.js";
|
|
3
3
|
import { copyResponse } from "../util.js";
|
|
4
4
|
import { HttpCache } from "./schema.js";
|
|
5
|
-
import { isPlainObject } from "@sindresorhus/is";
|
|
6
5
|
import { DateTime } from "luxon";
|
|
7
6
|
//#region lib/util/http/cache/abstract-http-cache-provider.ts
|
|
8
7
|
var AbstractHttpCacheProvider = class {
|
|
@@ -10,8 +9,7 @@ var AbstractHttpCacheProvider = class {
|
|
|
10
9
|
const cache = await this.load(method, url);
|
|
11
10
|
const httpCache = HttpCache.parse(cache);
|
|
12
11
|
if (!httpCache) return null;
|
|
13
|
-
|
|
14
|
-
if (isPlainObject(httpCache.httpResponse)) httpCache.httpResponse.cached = true;
|
|
12
|
+
httpCache.httpResponse.cached = true;
|
|
15
13
|
return httpCache;
|
|
16
14
|
}
|
|
17
15
|
async setCacheHeaders(method, url, opts) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-http-cache-provider.js","names":[],"sources":["../../../../lib/util/http/cache/abstract-http-cache-provider.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"abstract-http-cache-provider.js","names":[],"sources":["../../../../lib/util/http/cache/abstract-http-cache-provider.ts"],"sourcesContent":["import { DateTime } from 'luxon';\nimport { logger } from '../../../logger/index.ts';\nimport { HttpCacheStats } from '../../stats.ts';\nimport type { GotOptions, HttpResponse } from '../types.ts';\nimport { copyResponse } from '../util.ts';\nimport { HttpCache } from './schema.ts';\nimport type { HttpCacheProvider } from './types.ts';\n\nexport abstract class AbstractHttpCacheProvider implements HttpCacheProvider {\n protected abstract load(method: string, url: string): Promise<unknown>;\n protected abstract persist(\n method: string,\n url: string,\n data: HttpCache,\n ): Promise<void>;\n\n async get(method: string, url: string): Promise<HttpCache | null> {\n const cache = await this.load(method, url);\n const httpCache = HttpCache.parse(cache);\n if (!httpCache) {\n return null;\n }\n\n httpCache.httpResponse.cached = true;\n return httpCache;\n }\n\n async setCacheHeaders<T extends Pick<GotOptions, 'headers'>>(\n method: string,\n url: string,\n opts: T,\n ): Promise<void> {\n const httpCache = await this.get(method, url);\n if (!httpCache) {\n return;\n }\n\n opts.headers ??= {};\n\n if (httpCache.etag) {\n opts.headers['If-None-Match'] = httpCache.etag;\n }\n\n if (httpCache.lastModified) {\n opts.headers['If-Modified-Since'] = httpCache.lastModified;\n }\n }\n\n // v8 ignore next -- TODO: add test #40625\n bypassServer<T>(\n _method: string,\n _url: string,\n _ignoreSoftTtl: boolean,\n ): Promise<HttpResponse<T> | null> {\n return Promise.resolve(null);\n }\n\n async wrapServerResponse<T>(\n method: string,\n url: string,\n resp: HttpResponse<T>,\n ): Promise<HttpResponse<T>> {\n if (!resp.cached && resp.statusCode === 200) {\n const etag = resp.headers?.etag;\n const lastModified = resp.headers?.['last-modified'];\n\n HttpCacheStats.incRemoteMisses(url);\n\n const httpResponse = copyResponse(resp, true);\n const timestamp = DateTime.utc().toISO();\n\n const newHttpCache = HttpCache.parse({\n etag,\n lastModified,\n httpResponse,\n timestamp,\n });\n\n /* v8 ignore next: should never happen */\n if (!newHttpCache) {\n logger.debug(`http cache: failed to persist cache for ${url}`);\n return resp;\n }\n\n logger.debug(\n `http cache: saving ${url} (etag=${etag}, lastModified=${lastModified})`,\n );\n await this.persist(method, url, newHttpCache);\n return resp;\n }\n\n if (resp.statusCode === 304) {\n const httpCache = await this.get(method, url);\n if (!httpCache) {\n return resp;\n }\n\n const timestamp = httpCache.timestamp;\n logger.debug(\n `http cache: Using cached response: ${url} from ${timestamp}`,\n );\n httpCache.timestamp = DateTime.utc().toISO();\n await this.persist(method, url, httpCache);\n\n HttpCacheStats.incRemoteHits(url);\n const cachedResp = copyResponse(\n httpCache.httpResponse as HttpResponse<T>,\n true,\n );\n cachedResp.authorization = resp.authorization;\n return cachedResp;\n }\n\n return resp;\n }\n}\n"],"mappings":";;;;;;AAQA,IAAsB,4BAAtB,MAA6E;CAQ3E,MAAM,IAAI,QAAgB,KAAwC;EAChE,MAAM,QAAQ,MAAM,KAAK,KAAK,QAAQ,GAAG;EACzC,MAAM,YAAY,UAAU,MAAM,KAAK;EACvC,IAAI,CAAC,WACH,OAAO;EAGT,UAAU,aAAa,SAAS;EAChC,OAAO;CACT;CAEA,MAAM,gBACJ,QACA,KACA,MACe;EACf,MAAM,YAAY,MAAM,KAAK,IAAI,QAAQ,GAAG;EAC5C,IAAI,CAAC,WACH;EAGF,KAAK,YAAY,CAAC;EAElB,IAAI,UAAU,MACZ,KAAK,QAAQ,mBAAmB,UAAU;EAG5C,IAAI,UAAU,cACZ,KAAK,QAAQ,uBAAuB,UAAU;CAElD;;CAGA,aACE,SACA,MACA,gBACiC;EACjC,OAAO,QAAQ,QAAQ,IAAI;CAC7B;CAEA,MAAM,mBACJ,QACA,KACA,MAC0B;EAC1B,IAAI,CAAC,KAAK,UAAU,KAAK,eAAe,KAAK;GAC3C,MAAM,OAAO,KAAK,SAAS;GAC3B,MAAM,eAAe,KAAK,UAAU;GAEpC,eAAe,gBAAgB,GAAG;GAElC,MAAM,eAAe,aAAa,MAAM,IAAI;GAC5C,MAAM,YAAY,SAAS,IAAI,CAAC,CAAC,MAAM;GAEvC,MAAM,eAAe,UAAU,MAAM;IACnC;IACA;IACA;IACA;GACF,CAAC;;GAGD,IAAI,CAAC,cAAc;IACjB,OAAO,MAAM,2CAA2C,KAAK;IAC7D,OAAO;GACT;GAEA,OAAO,MACL,sBAAsB,IAAI,SAAS,KAAK,iBAAiB,aAAa,EACxE;GACA,MAAM,KAAK,QAAQ,QAAQ,KAAK,YAAY;GAC5C,OAAO;EACT;EAEA,IAAI,KAAK,eAAe,KAAK;GAC3B,MAAM,YAAY,MAAM,KAAK,IAAI,QAAQ,GAAG;GAC5C,IAAI,CAAC,WACH,OAAO;GAGT,MAAM,YAAY,UAAU;GAC5B,OAAO,MACL,sCAAsC,IAAI,QAAQ,WACpD;GACA,UAAU,YAAY,SAAS,IAAI,CAAC,CAAC,MAAM;GAC3C,MAAM,KAAK,QAAQ,QAAQ,KAAK,SAAS;GAEzC,eAAe,cAAc,GAAG;GAChC,MAAM,aAAa,aACjB,UAAU,cACV,IACF;GACA,WAAW,gBAAgB,KAAK;GAChC,OAAO;EACT;EAEA,OAAO;CACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-http-cache-provider.js","names":["packageCache.get","packageCache.setWithRawTtl"],"sources":["../../../../lib/util/http/cache/package-http-cache-provider.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { DateTime } from 'luxon';\nimport type { ZodType } from 'zod/v4';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as packageCache from '../../cache/package/index.ts';\nimport { resolveTtlValues } from '../../cache/package/ttl.ts';\nimport type { PackageCacheNamespace } from '../../cache/package/types.ts';\nimport { regEx } from '../../regex.ts';\nimport { HttpCacheStats } from '../../stats.ts';\nimport type { HttpResponse } from '../types.ts';\nimport { copyResponse } from '../util.ts';\nimport { AbstractHttpCacheProvider } from './abstract-http-cache-provider.ts';\nimport type { HttpCache } from './schema.ts';\n\nexport interface PackageHttpCacheProviderOptions {\n namespace: PackageCacheNamespace;\n softTtlMinutes?: number;\n checkCacheControlHeader: boolean;\n checkAuthorizationHeader: boolean;\n writeSchema?: ZodType;\n}\n\nexport class PackageHttpCacheProvider extends AbstractHttpCacheProvider {\n private namespace: PackageCacheNamespace;\n private defaultTtlMinutes: number;\n private writeSchema?: ZodType;\n\n checkCacheControlHeader: boolean;\n checkAuthorizationHeader: boolean;\n\n constructor({\n namespace,\n softTtlMinutes = 15,\n checkCacheControlHeader,\n checkAuthorizationHeader,\n writeSchema,\n }: PackageHttpCacheProviderOptions) {\n super();\n this.namespace = namespace;\n this.defaultTtlMinutes = softTtlMinutes;\n this.checkCacheControlHeader = checkCacheControlHeader;\n this.checkAuthorizationHeader = checkAuthorizationHeader;\n this.writeSchema = writeSchema;\n }\n\n private get softTtlMinutes(): number {\n const { softTtlMinutes } = resolveTtlValues(\n this.namespace,\n this.defaultTtlMinutes,\n );\n return softTtlMinutes;\n }\n\n private get hardTtlMinutes(): number {\n const { hardTtlMinutes } = resolveTtlValues(\n this.namespace,\n this.defaultTtlMinutes,\n );\n return hardTtlMinutes;\n }\n\n private cacheKey(method: string, url: string): string {\n if (method !== 'get') {\n return `${method}:${url}`;\n }\n return url;\n }\n\n async load(method: string, url: string): Promise<unknown> {\n return await packageCache.get(this.namespace, this.cacheKey(method, url));\n }\n\n async persist(method: string, url: string, data: HttpCache): Promise<void> {\n if (!data) {\n return;\n }\n\n if (!this.writeSchema) {\n await packageCache.setWithRawTtl(\n this.namespace,\n this.cacheKey(method, url),\n data,\n this.hardTtlMinutes,\n );\n return;\n }\n\n const httpResponse = copyResponse(
|
|
1
|
+
{"version":3,"file":"package-http-cache-provider.js","names":["packageCache.get","packageCache.setWithRawTtl"],"sources":["../../../../lib/util/http/cache/package-http-cache-provider.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { DateTime } from 'luxon';\nimport type { ZodType } from 'zod/v4';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as packageCache from '../../cache/package/index.ts';\nimport { resolveTtlValues } from '../../cache/package/ttl.ts';\nimport type { PackageCacheNamespace } from '../../cache/package/types.ts';\nimport { regEx } from '../../regex.ts';\nimport { HttpCacheStats } from '../../stats.ts';\nimport type { HttpResponse } from '../types.ts';\nimport { copyResponse } from '../util.ts';\nimport { AbstractHttpCacheProvider } from './abstract-http-cache-provider.ts';\nimport type { HttpCache } from './schema.ts';\n\nexport interface PackageHttpCacheProviderOptions {\n namespace: PackageCacheNamespace;\n softTtlMinutes?: number;\n checkCacheControlHeader: boolean;\n checkAuthorizationHeader: boolean;\n writeSchema?: ZodType;\n}\n\nexport class PackageHttpCacheProvider extends AbstractHttpCacheProvider {\n private namespace: PackageCacheNamespace;\n private defaultTtlMinutes: number;\n private writeSchema?: ZodType;\n\n checkCacheControlHeader: boolean;\n checkAuthorizationHeader: boolean;\n\n constructor({\n namespace,\n softTtlMinutes = 15,\n checkCacheControlHeader,\n checkAuthorizationHeader,\n writeSchema,\n }: PackageHttpCacheProviderOptions) {\n super();\n this.namespace = namespace;\n this.defaultTtlMinutes = softTtlMinutes;\n this.checkCacheControlHeader = checkCacheControlHeader;\n this.checkAuthorizationHeader = checkAuthorizationHeader;\n this.writeSchema = writeSchema;\n }\n\n private get softTtlMinutes(): number {\n const { softTtlMinutes } = resolveTtlValues(\n this.namespace,\n this.defaultTtlMinutes,\n );\n return softTtlMinutes;\n }\n\n private get hardTtlMinutes(): number {\n const { hardTtlMinutes } = resolveTtlValues(\n this.namespace,\n this.defaultTtlMinutes,\n );\n return hardTtlMinutes;\n }\n\n private cacheKey(method: string, url: string): string {\n if (method !== 'get') {\n return `${method}:${url}`;\n }\n return url;\n }\n\n async load(method: string, url: string): Promise<unknown> {\n return await packageCache.get(this.namespace, this.cacheKey(method, url));\n }\n\n async persist(method: string, url: string, data: HttpCache): Promise<void> {\n if (!data) {\n return;\n }\n\n if (!this.writeSchema) {\n await packageCache.setWithRawTtl(\n this.namespace,\n this.cacheKey(method, url),\n data,\n this.hardTtlMinutes,\n );\n return;\n }\n\n const httpResponse = copyResponse(data.httpResponse, false);\n\n const { data: body, error: err } = this.writeSchema.safeParse(\n httpResponse.body,\n );\n\n if (err) {\n logger.once.debug(\n { err, method, namespace: this.namespace, url },\n 'http cache: writeSchema validation failed for response body, skipping cache write',\n );\n return;\n }\n\n httpResponse.body = body;\n\n await packageCache.setWithRawTtl(\n this.namespace,\n this.cacheKey(method, url),\n { ...data, httpResponse },\n this.hardTtlMinutes,\n );\n }\n\n override async bypassServer<T>(\n method: string,\n url: string,\n ignoreSoftTtl = false,\n ): Promise<HttpResponse<T> | null> {\n const cached = await this.get(method, url);\n if (!cached) {\n return null;\n }\n\n if (ignoreSoftTtl) {\n return cached.httpResponse as HttpResponse<T>;\n }\n\n const cachedAt = DateTime.fromISO(cached.timestamp);\n const deadline = cachedAt.plus({ minutes: this.softTtlMinutes });\n const now = DateTime.now();\n if (now >= deadline) {\n HttpCacheStats.incLocalMisses(url);\n return null;\n }\n\n HttpCacheStats.incLocalHits(url);\n return cached.httpResponse as HttpResponse<T>;\n }\n\n cacheAllowed<T>(resp: HttpResponse<T>): boolean {\n const allowedViaGlobalConfig = GlobalConfig.get('cachePrivatePackages');\n if (allowedViaGlobalConfig) {\n return true;\n }\n\n if (this.checkCacheControlHeader) {\n const cacheControl = resp.headers['cache-control'];\n const isPublic =\n isString(cacheControl) &&\n cacheControl\n .toLocaleLowerCase()\n .split(regEx(/\\s*,\\s*/))\n .includes('public');\n\n if (!isPublic) {\n return false;\n }\n }\n\n if (this.checkAuthorizationHeader && resp.authorization) {\n return false;\n }\n\n return true;\n }\n\n override async wrapServerResponse<T>(\n method: string,\n url: string,\n resp: HttpResponse<T>,\n ): Promise<HttpResponse<T>> {\n if (resp.statusCode === 200 && !this.cacheAllowed(resp)) {\n return resp;\n }\n\n return await super.wrapServerResponse(method, url, resp);\n }\n}\n"],"mappings":";;;;;;;;;;;AAuBA,IAAa,2BAAb,cAA8C,0BAA0B;CACtE;CACA;CACA;CAEA;CACA;CAEA,YAAY,EACV,WACA,iBAAiB,IACjB,yBACA,0BACA,eACkC;EAClC,MAAM;EACN,KAAK,YAAY;EACjB,KAAK,oBAAoB;EACzB,KAAK,0BAA0B;EAC/B,KAAK,2BAA2B;EAChC,KAAK,cAAc;CACrB;CAEA,IAAY,iBAAyB;EACnC,MAAM,EAAE,mBAAmB,iBACzB,KAAK,WACL,KAAK,iBACP;EACA,OAAO;CACT;CAEA,IAAY,iBAAyB;EACnC,MAAM,EAAE,mBAAmB,iBACzB,KAAK,WACL,KAAK,iBACP;EACA,OAAO;CACT;CAEA,SAAiB,QAAgB,KAAqB;EACpD,IAAI,WAAW,OACb,OAAO,GAAG,OAAO,GAAG;EAEtB,OAAO;CACT;CAEA,MAAM,KAAK,QAAgB,KAA+B;EACxD,OAAO,MAAMA,IAAiB,KAAK,WAAW,KAAK,SAAS,QAAQ,GAAG,CAAC;CAC1E;CAEA,MAAM,QAAQ,QAAgB,KAAa,MAAgC;EACzE,IAAI,CAAC,MACH;EAGF,IAAI,CAAC,KAAK,aAAa;GACrB,MAAMC,cACJ,KAAK,WACL,KAAK,SAAS,QAAQ,GAAG,GACzB,MACA,KAAK,cACP;GACA;EACF;EAEA,MAAM,eAAe,aAAa,KAAK,cAAc,KAAK;EAE1D,MAAM,EAAE,MAAM,MAAM,OAAO,QAAQ,KAAK,YAAY,UAClD,aAAa,IACf;EAEA,IAAI,KAAK;GACP,OAAO,KAAK,MACV;IAAE;IAAK;IAAQ,WAAW,KAAK;IAAW;GAAI,GAC9C,mFACF;GACA;EACF;EAEA,aAAa,OAAO;EAEpB,MAAMA,cACJ,KAAK,WACL,KAAK,SAAS,QAAQ,GAAG,GACzB;GAAE,GAAG;GAAM;EAAa,GACxB,KAAK,cACP;CACF;CAEA,MAAe,aACb,QACA,KACA,gBAAgB,OACiB;EACjC,MAAM,SAAS,MAAM,KAAK,IAAI,QAAQ,GAAG;EACzC,IAAI,CAAC,QACH,OAAO;EAGT,IAAI,eACF,OAAO,OAAO;EAIhB,MAAM,WADW,SAAS,QAAQ,OAAO,SACjB,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,eAAe,CAAC;EAE/D,IADY,SAAS,IACf,KAAK,UAAU;GACnB,eAAe,eAAe,GAAG;GACjC,OAAO;EACT;EAEA,eAAe,aAAa,GAAG;EAC/B,OAAO,OAAO;CAChB;CAEA,aAAgB,MAAgC;EAE9C,IAD+B,aAAa,IAAI,sBACvB,GACvB,OAAO;EAGT,IAAI,KAAK,yBAAyB;GAChC,MAAM,eAAe,KAAK,QAAQ;GAQlC,IAAI,EANF,SAAS,YAAY,KACrB,aACG,kBAAkB,CAAC,CACnB,MAAM,MAAM,SAAS,CAAC,CAAC,CACvB,SAAS,QAAQ,IAGpB,OAAO;EAEX;EAEA,IAAI,KAAK,4BAA4B,KAAK,eACxC,OAAO;EAGT,OAAO;CACT;CAEA,MAAe,mBACb,QACA,KACA,MAC0B;EAC1B,IAAI,KAAK,eAAe,OAAO,CAAC,KAAK,aAAa,IAAI,GACpD,OAAO;EAGT,OAAO,MAAM,MAAM,mBAAmB,QAAQ,KAAK,IAAI;CACzD;AACF"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
//#region lib/util/http/cache/schema.ts
|
|
3
|
+
const HttpCacheHeaders = z.record(z.string(), z.union([z.string(), z.array(z.string())]).optional());
|
|
4
|
+
const HttpCacheResponse = z.object({
|
|
5
|
+
statusCode: z.number(),
|
|
6
|
+
headers: HttpCacheHeaders,
|
|
7
|
+
body: z.unknown(),
|
|
8
|
+
authorization: z.boolean().optional(),
|
|
9
|
+
cached: z.boolean().optional()
|
|
10
|
+
});
|
|
3
11
|
const HttpCache = z.object({
|
|
4
12
|
etag: z.string().optional(),
|
|
5
13
|
lastModified: z.string().optional(),
|
|
6
|
-
httpResponse:
|
|
14
|
+
httpResponse: HttpCacheResponse,
|
|
7
15
|
timestamp: z.string()
|
|
8
16
|
}).nullable().catch(null);
|
|
9
17
|
//#endregion
|
|
10
|
-
export { HttpCache };
|
|
18
|
+
export { HttpCache, HttpCacheResponse };
|
|
11
19
|
|
|
12
20
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/util/http/cache/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\n\nexport const HttpCache = z\n .object({\n etag: z.string().optional(),\n lastModified: z.string().optional(),\n httpResponse:
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/util/http/cache/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\n\nconst HttpCacheHeaders = z.record(\n z.string(),\n z.union([z.string(), z.array(z.string())]).optional(),\n);\n\nexport const HttpCacheResponse = z.object({\n statusCode: z.number(),\n headers: HttpCacheHeaders,\n body: z.unknown(),\n authorization: z.boolean().optional(),\n cached: z.boolean().optional(),\n});\nexport type HttpCacheResponse = z.infer<typeof HttpCacheResponse>;\n\nexport const HttpCache = z\n .object({\n etag: z.string().optional(),\n lastModified: z.string().optional(),\n httpResponse: HttpCacheResponse,\n timestamp: z.string(),\n })\n .nullable()\n .catch(null);\nexport type HttpCache = z.infer<typeof HttpCache>;\n"],"mappings":";;AAEA,MAAM,mBAAmB,EAAE,OACzB,EAAE,OAAO,GACT,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CACtD;AAEA,MAAa,oBAAoB,EAAE,OAAO;CACxC,YAAY,EAAE,OAAO;CACrB,SAAS;CACT,MAAM,EAAE,QAAQ;CAChB,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS;CACpC,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC;AAGD,MAAa,YAAY,EACtB,OAAO;CACN,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;CAC1B,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,cAAc;CACd,WAAW,EAAE,OAAO;AACtB,CAAC,CAAC,CACD,SAAS,CAAC,CACV,MAAM,IAAI"}
|
package/package.json
CHANGED
package/renovate-schema.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"title": "JSON schema for Renovate 44.110.
|
|
3
|
+
"title": "JSON schema for Renovate 44.110.1 config files (https://renovatebot.com/)",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"x-renovate-version": "44.110.
|
|
5
|
+
"x-renovate-version": "44.110.1",
|
|
6
6
|
"allowComments": true,
|
|
7
7
|
"type": "object",
|
|
8
8
|
"definitions": {
|