@paroicms/server-image-cache-engine 1.16.1 → 1.17.0

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.
@@ -1,8 +1,8 @@
1
- import { type BasicAppLog } from "@paroicms/internal-server-lib";
1
+ import { type BasicAppLogger } from "@paroicms/internal-server-lib";
2
2
  import type { DataSource } from "typeorm";
3
- export declare function createOrOpenConnection({ sqliteFile, appLog, }: {
3
+ export declare function createOrOpenConnection({ sqliteFile, logger, }: {
4
4
  sqliteFile: string;
5
- appLog: BasicAppLog;
5
+ logger: BasicAppLogger;
6
6
  }): Promise<{
7
7
  cn: DataSource;
8
8
  logNextQuery: (count?: number) => void;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createOrOpenConnection = createOrOpenConnection;
4
- const node_path_1 = require("node:path");
5
4
  const internal_server_lib_1 = require("@paroicms/internal-server-lib");
5
+ const node_path_1 = require("node:path");
6
6
  const constants_1 = require("../constants");
7
7
  const ddl_migration_1 = require("./ddl-migration");
8
8
  const PaImageCache_entity_1 = require("./entities/PaImageCache.entity");
9
9
  const PaImageCacheUsed_entity_1 = require("./entities/PaImageCacheUsed.entity");
10
- async function createOrOpenConnection({ sqliteFile, appLog, }) {
11
- const { logNextQuery, typeOrmLogger } = (0, internal_server_lib_1.createSqlLogger)({ appLog, dbSchemaName: ddl_migration_1.dbSchemaName });
10
+ async function createOrOpenConnection({ sqliteFile, logger, }) {
11
+ const { logNextQuery, typeOrmLogger } = (0, internal_server_lib_1.createSqlLogger)({ logger, dbSchemaName: ddl_migration_1.dbSchemaName });
12
12
  const { cn, isNewDb, migrationReport } = await (0, internal_server_lib_1.createOrOpenSqliteConnection)({
13
13
  canCreate: true,
14
14
  dbSchemaName: ddl_migration_1.dbSchemaName,
@@ -16,8 +16,8 @@ async function createOrOpenConnection({ sqliteFile, appLog, }) {
16
16
  ddlFile: (0, node_path_1.join)(constants_1.packageDir, "ddl", "image-cache.ddl.sql"),
17
17
  migrateDb,
18
18
  entities: [PaImageCache_entity_1.PaImageCacheEntity, PaImageCacheUsed_entity_1.PaImageCacheUsedEntity],
19
- logger: typeOrmLogger,
20
- appLog,
19
+ typeOrmLogger,
20
+ logger,
21
21
  });
22
22
  async function migrateDb(cn) {
23
23
  const dbVersion = await (0, internal_server_lib_1.getMetadataDbSchemaVersion)(cn, { dbSchemaName: ddl_migration_1.dbSchemaName });
@@ -29,7 +29,7 @@ async function createOrOpenConnection({ sqliteFile, appLog, }) {
29
29
  }
30
30
  await (0, ddl_migration_1.migrateImageCacheDb)(cn, {
31
31
  fromVersion: dbVersion,
32
- appLog,
32
+ logger,
33
33
  });
34
34
  return {
35
35
  migrated: true,
@@ -1 +1 @@
1
- {"version":3,"file":"db-init.js","sourceRoot":"","sources":["../../src/db-init/db-init.ts"],"names":[],"mappings":";;AAcA,wDAqCC;AAnDD,yCAAiC;AACjC,uEAMuC;AAEvC,4CAA0C;AAC1C,mDAA4F;AAC5F,wEAAoE;AACpE,gFAA4E;AAErE,KAAK,UAAU,sBAAsB,CAAC,EAC3C,UAAU,EACV,MAAM,GACsC;IAC5C,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,IAAA,qCAAe,EAAC,EAAE,MAAM,EAAE,YAAY,EAAZ,4BAAY,EAAE,CAAC,CAAC;IAElF,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,kDAA4B,EAAC;QAC1E,SAAS,EAAE,IAAI;QACf,YAAY,EAAZ,4BAAY;QACZ,UAAU;QACV,OAAO,EAAE,IAAA,gBAAI,EAAC,sBAAU,EAAE,KAAK,EAAE,qBAAqB,CAAC;QACvD,SAAS;QACT,QAAQ,EAAE,CAAC,wCAAkB,EAAE,gDAAsB,CAAC;QACtD,MAAM,EAAE,aAAa;QACrB,MAAM;KACP,CAAC,CAAC;IAEH,KAAK,UAAU,SAAS,CAAC,EAAc;Q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;KACP,CAAC,CAAC;IAEH,KAAK,UAAU,SAAS,CAAC,EAAc;QACrC,MAAM,SAAS,GAAG,MAAM,IAAA,gDAA0B,EAAC,EAAE,EAAE,EAAE,YAAY,EAAZ,4BAAY,EAAE,CAAC,CAAC;QACzE,IAAI,SAAS,KAAK,sCAAsB,EAAE,CAAC;YACzC,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,aAAa,EAAE,SAAS;aACzB,CAAC;QACJ,CAAC;QACD,MAAM,IAAA,mCAAmB,EAAC,EAAE,EAAE;YAC5B,WAAW,EAAE,SAAS;YACtB,MAAM;SACP,CAAC,CAAC;QACH,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,sCAAsB;SACtC,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,IAAI,eAAe,CAAC,QAAQ,EAAE,CAAC;AAC9E,CAAC"}
@@ -1,8 +1,8 @@
1
- import { type BasicAppLog } from "@paroicms/internal-server-lib";
1
+ import { type BasicAppLogger } from "@paroicms/internal-server-lib";
2
2
  import type { DataSource } from "typeorm";
3
3
  export declare const dbSchemaName = "image-cache";
4
4
  export declare const currentDbSchemaVersion = 6;
5
- export declare function migrateImageCacheDb(cn: DataSource, { fromVersion, appLog }: {
5
+ export declare function migrateImageCacheDb(cn: DataSource, { fromVersion, logger }: {
6
6
  fromVersion: number;
7
- appLog: BasicAppLog;
7
+ logger: BasicAppLogger;
8
8
  }): Promise<void>;
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.currentDbSchemaVersion = exports.dbSchemaName = void 0;
4
4
  exports.migrateImageCacheDb = migrateImageCacheDb;
5
- const node_path_1 = require("node:path");
6
5
  const internal_server_lib_1 = require("@paroicms/internal-server-lib");
6
+ const node_path_1 = require("node:path");
7
7
  const constants_1 = require("../constants");
8
8
  exports.dbSchemaName = "image-cache";
9
9
  exports.currentDbSchemaVersion = 6;
10
- async function migrateImageCacheDb(cn, { fromVersion, appLog }) {
10
+ async function migrateImageCacheDb(cn, { fromVersion, logger }) {
11
11
  const toVersion = exports.currentDbSchemaVersion;
12
12
  let currentVersion = fromVersion;
13
13
  if (currentVersion === 4) {
@@ -16,13 +16,13 @@ async function migrateImageCacheDb(cn, { fromVersion, appLog }) {
16
16
  // We don't care losing cache data
17
17
  // Warning: don't reset the image cache until the text cache is reset too
18
18
  if (currentVersion < toVersion) {
19
- appLog.info("reset the image-cache database");
19
+ logger.info("reset the image-cache database");
20
20
  await (0, internal_server_lib_1.executeDdl)(cn, (0, node_path_1.join)(constants_1.packageDir, "ddl", "image-cache.ddl.sql"));
21
21
  currentVersion = await (0, internal_server_lib_1.getMetadataDbSchemaVersion)(cn, { dbSchemaName: exports.dbSchemaName });
22
22
  }
23
23
  if (currentVersion !== toVersion) {
24
24
  throw new Error(`version of ${exports.dbSchemaName} database should be '${toVersion}', but is '${currentVersion}'`);
25
25
  }
26
- appLog.info(`${exports.dbSchemaName} database was migrated from ${fromVersion} to ${currentVersion}`);
26
+ logger.info(`${exports.dbSchemaName} database was migrated from ${fromVersion} to ${currentVersion}`);
27
27
  }
28
28
  //# sourceMappingURL=ddl-migration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ddl-migration.js","sourceRoot":"","sources":["../../src/db-init/ddl-migration.ts"],"names":[],"mappings":";;;AAYA,kDA0BC;AAtCD,yCAAiC;AACjC,uEAIuC;AAEvC,4CAA0C;AAE7B,QAAA,YAAY,GAAG,aAAa,CAAC;AAC7B,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAEjC,KAAK,UAAU,mBAAmB,CACvC,EAAc,EACd,EAAE,WAAW,EAAE,MAAM,EAAgD;IAErE,MAAM,SAAS,GAAG,8BAAsB,CAAC;IACzC,IAAI,cAAc,GAAG,WAAW,CAAC;IAEjC,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,EAAE,C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gC,CAAC,CAAC;QAC9C,MAAM,IAAA,gCAAU,EAAC,EAAE,EAAE,IAAA,gBAAI,EAAC,sBAAU,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC;QACrE,cAAc,GAAG,MAAM,IAAA,gDAA0B,EAAC,EAAE,EAAE,EAAE,YAAY,EAAZ,oBAAY,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,cAAc,oBAAY,wBAAwB,SAAS,cAAc,cAAc,GAAG,CAC3F,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,GAAG,oBAAY,+BAA+B,WAAW,OAAO,cAAc,EAAE,CAAC,CAAC;AAChG,CAAC"}
@@ -1,11 +1,11 @@
1
- import type { AppLog } from "@paroicms/internal-server-lib";
1
+ import type { AppLogger } from "@paroicms/internal-server-lib";
2
2
  import type { ImageSize, ScImageCompressionQualityPolicyStep, VariantName } from "@paroicms/public-anywhere-lib";
3
3
  import type { GetOriginalImage, ImageRef, ImageVariant, ImageVariantStorage, ImageVariantWithBinary, NewImageProps } from "./engine-types";
4
4
  import { type VariantEngineContext } from "./internal/engine-context";
5
5
  export interface CreateImageCacheEngineOptions {
6
6
  storage: ImageVariantStorage;
7
7
  getOriginalImage: GetOriginalImage;
8
- appLog?: AppLog;
8
+ logger?: AppLogger;
9
9
  qualityPolicy: ScImageCompressionQualityPolicyStep[];
10
10
  /**
11
11
  * For example: `"14d"`. Leave `undefined` to keep cache data undefinitely.
@@ -121,13 +121,13 @@ class ImageCacheEngine {
121
121
  this.#checkStatus();
122
122
  const count = await (0, queries_1.deleteUnusedVariants)(this.#context);
123
123
  if (count !== undefined && count > 0) {
124
- this.#context.appLog.debug(`${count} unused cache image were deleted`);
124
+ this.#context.logger.debug(`${count} unused cache image were deleted`);
125
125
  }
126
126
  }
127
127
  async clearCache() {
128
128
  this.#checkStatus();
129
129
  await (0, queries_1.clearVariantCache)(this.#context);
130
- this.#context.appLog.debug("cache is cleared");
130
+ this.#context.logger.debug("cache is cleared");
131
131
  }
132
132
  #startQueue() {
133
133
  if (this.#processing)
@@ -135,7 +135,7 @@ class ImageCacheEngine {
135
135
  this.#processing = true;
136
136
  void (0, task_processor_1.processAllPending)(this.#context)
137
137
  .catch((error) => {
138
- this.#context.appLog.error("Error when proccessing =>", error);
138
+ this.#context.logger.error("Error when proccessing =>", error);
139
139
  })
140
140
  .then(() => {
141
141
  this.#processing = false;
@@ -1,8 +1,8 @@
1
- import type { AppLog } from "@paroicms/internal-server-lib";
1
+ import type { AppLogger } from "@paroicms/internal-server-lib";
2
2
  export declare let sharpQueue: <T extends () => Promise<any>>(task: T) => ReturnType<T>;
3
3
  export interface SetupImageProcessorOptions {
4
4
  cpuCoresPerFile?: number;
5
5
  allowConcurrency?: boolean;
6
- appLog: AppLog;
6
+ logger: AppLogger;
7
7
  }
8
- export declare function setupImageProcessor({ cpuCoresPerFile, allowConcurrency, appLog, }: SetupImageProcessorOptions): void;
8
+ export declare function setupImageProcessor({ cpuCoresPerFile, allowConcurrency, logger, }: SetupImageProcessorOptions): void;
@@ -8,21 +8,21 @@ exports.setupImageProcessor = setupImageProcessor;
8
8
  const async_lib_1 = require("@paroi/async-lib");
9
9
  const sharp_1 = __importDefault(require("sharp"));
10
10
  exports.sharpQueue = execImmediately;
11
- function setupImageProcessor({ cpuCoresPerFile, allowConcurrency, appLog, }) {
11
+ function setupImageProcessor({ cpuCoresPerFile, allowConcurrency, logger, }) {
12
12
  const oldValue = sharp_1.default.concurrency();
13
13
  if (cpuCoresPerFile !== undefined) {
14
14
  // https://sharp.pixelplumbing.com/api-utility#concurrency
15
15
  sharp_1.default.concurrency(cpuCoresPerFile);
16
- appLog.debug(`Set sharp concurrency (cpu cores per file) to '${cpuCoresPerFile}' (was ${oldValue})`);
16
+ logger.debug(`Set sharp concurrency (cpu cores per file) to '${cpuCoresPerFile}' (was ${oldValue})`);
17
17
  }
18
18
  else if (oldValue > 1) {
19
- appLog.debug(`Use the sharp concurrency (cpu cores per file) default value: ${oldValue}`);
19
+ logger.debug(`Use the sharp concurrency (cpu cores per file) default value: ${oldValue}`);
20
20
  }
21
21
  if (!allowConcurrency) {
22
22
  exports.sharpQueue = (0, async_lib_1.createAsyncQueue)({
23
23
  delayMs: 50,
24
24
  });
25
- appLog.debug(`Mode "one image processing at a time" is enabled`);
25
+ logger.debug(`Mode "one image processing at a time" is enabled`);
26
26
  }
27
27
  }
28
28
  function execImmediately(task) {
@@ -1,12 +1,12 @@
1
1
  import type { PromiseToHandle } from "@paroi/async-lib";
2
- import type { BasicAppLog } from "@paroicms/internal-server-lib";
2
+ import type { BasicAppLogger } from "@paroicms/internal-server-lib";
3
3
  import type { DataSource } from "typeorm";
4
4
  import type { ImageVariantWithBinary } from "../engine-types";
5
5
  import type { CreateImageCacheEngineOptions } from "../image-cache-engine";
6
6
  import type { TaskData, TaskKey } from "./internal.types";
7
- export interface VariantEngineContext extends Omit<CreateImageCacheEngineOptions, "appLog"> {
7
+ export interface VariantEngineContext extends Omit<CreateImageCacheEngineOptions, "logger"> {
8
8
  status: "ready" | "destroyed";
9
- appLog: BasicAppLog;
9
+ logger: BasicAppLogger;
10
10
  queue: TaskData[];
11
11
  pendingTasks: Map<TaskKey, PromiseToHandle<ImageVariantWithBinary>>;
12
12
  cn: DataSource;
@@ -4,15 +4,15 @@ exports.createVariantEngineContext = createVariantEngineContext;
4
4
  const internal_anywhere_lib_1 = require("@paroicms/internal-anywhere-lib");
5
5
  const db_init_1 = require("../db-init/db-init");
6
6
  async function createVariantEngineContext(options) {
7
- const appLog = options.appLog ?? console;
7
+ const logger = options.logger ?? console;
8
8
  const { cn, logNextQuery, isCleared } = await (0, db_init_1.createOrOpenConnection)({
9
9
  sqliteFile: options.storage.file,
10
- appLog,
10
+ logger,
11
11
  });
12
12
  const context = {
13
13
  ...options,
14
14
  status: "ready",
15
- appLog,
15
+ logger,
16
16
  queue: [],
17
17
  pendingTasks: new Map(),
18
18
  cn,
@@ -28,14 +28,14 @@ export declare function deleteVariants(cn: QueryBuilderConnection, options: {
28
28
  export declare function deleteVariantsByDependencies(cn: QueryBuilderConnection, options: {
29
29
  usedKeys: string[];
30
30
  }): Promise<number>;
31
- export declare function fetchImageVariant(ctx: Pick<VariantEngineContext, "cn" | "timeToIdleDays" | "appLog">, { imageUid, variantName, }: {
31
+ export declare function fetchImageVariant(ctx: Pick<VariantEngineContext, "cn" | "timeToIdleDays" | "logger">, { imageUid, variantName, }: {
32
32
  imageUid: string;
33
33
  variantName: VariantName;
34
34
  }): Promise<{
35
35
  id: string;
36
36
  variant: ImageVariant;
37
37
  } | undefined>;
38
- export declare function fetchImageVariantWithBinary(ctx: Pick<VariantEngineContext, "cn" | "timeToIdleDays" | "appLog">, { imageUid, variantName, }: {
38
+ export declare function fetchImageVariantWithBinary(ctx: Pick<VariantEngineContext, "cn" | "timeToIdleDays" | "logger">, { imageUid, variantName, }: {
39
39
  imageUid: string;
40
40
  variantName: VariantName;
41
41
  }): Promise<{
@@ -163,10 +163,10 @@ async function fetchImageVariantWithBinary(ctx, { imageUid, variantName, }) {
163
163
  };
164
164
  }
165
165
  async function updateReadAtOfImageVariant(ctx, { id, readAt, imageUid, variantName, }) {
166
- const { cn, timeToIdleDays, appLog } = ctx;
166
+ const { cn, timeToIdleDays, logger } = ctx;
167
167
  if (timeToIdleDays === undefined || (0, internal_anywhere_lib_1.isSameTimeUnit)(readAt, "day"))
168
168
  return;
169
- appLog.debug(`updating readAt of image cache: ${imageUid}, ${variantName}`);
169
+ logger.debug(`updating readAt of image cache: ${imageUid}, ${variantName}`);
170
170
  await cn
171
171
  .createQueryBuilder()
172
172
  .update("PaImageCache")
@@ -10,7 +10,7 @@ async function processAllPending(context) {
10
10
  break;
11
11
  const pth = context.pendingTasks.get(task.taskKey);
12
12
  if (!pth) {
13
- context.appLog.error(`Missing pending variant '${task.taskKey}'`);
13
+ context.logger.error(`Missing pending variant '${task.taskKey}'`);
14
14
  continue;
15
15
  }
16
16
  try {
@@ -18,7 +18,7 @@ async function processAllPending(context) {
18
18
  pth.resolve(result);
19
19
  }
20
20
  catch (error) {
21
- context.appLog.error(`[image-cache-engine] image '${task.imageUid}', '${task.variantName}':`, error, task);
21
+ context.logger.error(`[image-cache-engine] image '${task.imageUid}', '${task.variantName}':`, error, task);
22
22
  pth.reject(error);
23
23
  }
24
24
  context.pendingTasks.delete(task.taskKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/server-image-cache-engine",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "description": "The image variant engine that we use at Paroi.",
5
5
  "author": "Paroi Team",
6
6
  "main": "dist/api.js",
@@ -27,18 +27,18 @@
27
27
  "test:run": "vitest run"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/node": "~20.14.8",
30
+ "@types/node": "~22.10.7",
31
31
  "rimraf": "~6.0.1",
32
- "typescript": "~5.7.2",
33
- "vitest": "~2.0.5"
32
+ "typescript": "~5.7.3",
33
+ "vitest": "~3.0.2"
34
34
  },
35
35
  "dependencies": {
36
36
  "@paroi/async-lib": "~0.3.1",
37
37
  "@paroi/data-formatters-lib": "~0.4.0",
38
- "@paroicms/internal-anywhere-lib": "1.20.0",
39
- "@paroicms/public-anywhere-lib": "0.12.0",
40
- "@paroicms/public-server-lib": "0.20.0",
41
- "@paroicms/internal-server-lib": "1.9.1",
38
+ "@paroicms/internal-anywhere-lib": "1.21.0",
39
+ "@paroicms/public-anywhere-lib": "0.14.0",
40
+ "@paroicms/public-server-lib": "0.22.0",
41
+ "@paroicms/internal-server-lib": "1.10.0",
42
42
  "ico-endec": "~0.1.6",
43
43
  "sharp": "~0.33.4"
44
44
  },