fix(core): Update CI workflows and dependencies; apply small bugfixes and formatting improvements

This commit is contained in:
2025-08-28 16:06:44 +00:00
parent dda83e35c0
commit 97232adbb0
20 changed files with 4118 additions and 2939 deletions

View File

@@ -24,15 +24,21 @@ export class CacheS3Manager extends AbstractCache {
public async init() {
if (this.levelCacheRef.options.s3Config) {
this.smartbucket = new plugins.smartbucket.SmartBucket(this.levelCacheRef.options.s3Config);
this.smartbucket = new plugins.smartbucket.SmartBucket(
this.levelCacheRef.options.s3Config,
);
this.s3CacheBucket = await this.smartbucket.getBucketByName('');
this.s3CacheDir = await (
await this.s3CacheBucket.getBaseDirectory()
).getSubDirectoryByName(this.levelCacheRef.options.cacheId);
if (this.levelCacheRef.options.maxS3StorageInMB) {
console.log(`cache level S3 activated with ${this.levelCacheRef.options.maxS3StorageInMB}`);
console.log(
`cache level S3 activated with ${this.levelCacheRef.options.maxS3StorageInMB}`,
);
} else {
console.log(`s3 cache started without limit. Automatically applying timebox of 1 month`);
console.log(
`s3 cache started without limit. Automatically applying timebox of 1 month`,
);
}
this.status = 'active';
} else {
@@ -42,9 +48,11 @@ export class CacheS3Manager extends AbstractCache {
}
public async retrieveCacheEntryByKey(keyArg: string): Promise<CacheEntry> {
const jsonFileString = (await this.s3CacheDir.fastGet({
path: encodeURIComponent(keyArg),
})).toString();
const jsonFileString = (
await this.s3CacheDir.fastGet({
path: encodeURIComponent(keyArg),
})
).toString();
const cacheEntry = CacheEntry.fromStorageJsonString(jsonFileString);
return cacheEntry;
}
@@ -52,7 +60,7 @@ export class CacheS3Manager extends AbstractCache {
public async storeCacheEntryByKey(keyArg: string, cacheEntryArg: CacheEntry) {
await this.s3CacheDir.fastPut({
path: encodeURIComponent(keyArg),
contents: cacheEntryArg.toStorageJsonString()
contents: cacheEntryArg.toStorageJsonString(),
});
}