The printf template of config/logger.ts becomes formatLogLine, with the same
logic, so it can be unit tested without winston.
No behaviour change.
Refs libretech/mp#71
src/checkout/ holds code without the PayPal SDK or Strapi at runtime, so it can be
unit tested without node_modules:
- vat.ts: vatIncludedDecimal and vatDecimal. config/constants.ts re-exports them
under the same names and keeps vatDecimalExcluded.
- pricing.ts: calculateTotalProductPrice, unchanged. The product service
re-exports it, so every importer keeps working.
- paypal-order.ts: the order request createSessionOrThrow builds, in two halves.
buildPayPalOrderItems (the total guard and the unsent items) still runs
before the try block, and buildPayPalOrderRequest inside it. Errors and log
lines stay as they were, for every input. The SDK enums are replaced by their
string values (CAPTURE, SET_PROVIDED_ADDRESS).
No behaviour change.
Refs libretech/mp#71
Recovered work in progress from 2026-05. A product-cover can be marked
standalone, and a standalone product (Journaling Booklet) prices as the
cover price without the pattern/pages/ruling lookups, which do not exist
for it. The remaining component lookups are now guarded so a missing
relation yields null instead of calling findOne with undefined.
Source moved verbatim from mp/cms/ on 2026-04-29; mp was the first
concrete adapter consuming the libreshop toolkit. Builds and publishes
git.librete.ch/libreshop/cms on every main / v* push via the standard
.gitea/workflows/build.yml shared across libreshop components.