Skip to content
JS Client 12.6.13: Matomo versions, clients of your own, and lighter bundles

JS Client 12.6.13: Matomo versions, clients of your own, and lighter bundles

December 1, 2026·David Legrand
David Legrand

Clever Cloud JS client 12.6.13 is available. With the two releases before it, it moves Matomo add-ons to another version, lets you write your own clients, and lightens your bundles. Update your code if you extend a client, use TypeScript before 5.0, or read Matomo’s redisId or kvId.

Matomo versions

CheckMatomoVersionCommand returns the installed version of a Matomo add-on, the versions it can move to in availableVersions, and whether a newer one exists. UpdateMatomoVersionCommand moves the add-on to one of them, and returns it as it stands once updated. The add-on rebuilds on the target version, so it’s unavailable for the duration.

Matomo doesn’t run a version older than its database, so you can’t go back after a major update. Before one, check the backups of the MySQL add-on and that your plugins support the new version:

import { CheckMatomoVersionCommand } from '@clevercloud/client/cc-api-commands/matomo/check-matomo-version-command.js';
import { UpdateMatomoVersionCommand } from '@clevercloud/client/cc-api-commands/matomo/update-matomo-version-command.js';

const { needUpdate, latest } = await client.send(new CheckMatomoVersionCommand({ addonId }));
if (needUpdate) {
  await client.send(new UpdateMatomoVersionCommand({ addonId, targetVersion: latest }));
}

New Matomo add-ons run without Redis, and moving a single instance to Matomo 6 deletes its Redis add-on. MatomoInfo.resources.redisId is optional, and undefined instead of null without Redis, like kvId without Materia KV. Check them:

-const redisId: string = matomo.resources.redisId;
+const redisId: string | undefined = matomo.resources.redisId;
+if (redisId != null) {
+  linkToRedis(redisId);
+}

Clients of your own

@clevercloud/client/cc-client.js publishes CcClient and the base command classes, SimpleCommand, CompositeCommand, and StreamCommand. Use them to write a client for another HTTP API, such as a backend of your own. It gets the request pipeline of the Clever Cloud clients: hooks, timeouts, caching, cancellation, and the same errors. The guide of the client shows a complete example.

CcApiClient, CcApiBridgeClient, and RedisHttpClient now type their internal methods as private, such as _send(), _compose(), or _handleResponse(). They have no replacement: a subclass must stop overriding or calling them, even in JavaScript, where nothing prevents it. Act on requests and responses with the onRequest and onResponse hooks instead.

Lighter bundles and TypeScript 5

The package now declares itself free of side effects, so that your build tool drops the modules your application imports but doesn’t use. An application that sends commands without opening streams no longer bundles fetch-event-stream either.

The type declarations now require TypeScript 5.0 or later. With an older version, the imports of @clevercloud/client fail to resolve with TS2691, or lose their types with skipLibCheck. The clients, commands, streams, and errors also keep their private state in properties prefixed with _, instead of # private fields. These properties now show when you inspect an instance, list its keys, or serialize it with JSON.stringify(). They aren’t part of the public API, so don’t rely on them.

New commands and fields

  • GetMysqlInfoCommand, GetPostgresqlInfoCommand, and GetRedisInfoCommand return the details of an add-on
  • KeycloakInfo gains monthlyActiveUsers
  • OtoroshiInfo gains resources.cellarId and resources.postgresqlId
  • The commands of cc-api-commands/notice/ list the notices the Console shows on its pages

The Get…InfoCommand, Update…VersionCommand, and Create…NetworkGroupCommand of Keycloak and Otoroshi return these types. monthlyActiveUsers counts the distinct users active since midnight UTC on the first day of the current month, and is undefined when the API can’t read it. cellarId and postgresqlId are undefined on an instance without Cellar or PostgreSQL exporter.

The MySQL and PostgreSQL commands return the version, plan, region, status, credentials, read-only users, and features of the add-on. The Redis command returns the version, plan, region, status, replication role, port, and features of the add-on, without credentials. Each notice command returns the notices of a page in the user’s language, oldest first.

How to upgrade

Update @clevercloud/client in your project:

npm install @clevercloud/client@12.6.13
Last updated on