@byline/core 0.10.3 → 0.10.4

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/core.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  import { type AbilityDescriptor, AbilityRegistry, type SessionProvider } from '@byline/auth';
9
- import { type Logger as PinoLogger } from 'pino';
9
+ import type { Logger as PinoLogger } from 'pino';
10
10
  import { type BylineLogger } from './lib/logger.js';
11
11
  import { type CollectionRecord } from './services/collection-bootstrap.js';
12
12
  import type { CollectionDefinition, IDbAdapter, IStorageProvider, ServerConfig } from './@types/index.js';
@@ -73,7 +73,9 @@ export interface BylineCore<TAdminStore = unknown> {
73
73
  * backward compatibility with `getServerConfig()`.
74
74
  *
75
75
  * @param config - Server configuration (collections, db, storage, i18n).
76
- * @param pinoLogger - Optional raw Pino instance. Defaults to `pino({ level: 'info' })`.
76
+ * @param pinoLogger - Optional raw Pino instance. When omitted a default
77
+ * `pino({ level: 'info' })` is constructed via dynamic import so the
78
+ * pino runtime stays out of the client bundle (see import comment above).
77
79
  */
78
80
  export declare const initBylineCore: <TAdminStore = unknown>(config: ServerConfig<TAdminStore>, pinoLogger?: PinoLogger) => Promise<BylineCore<TAdminStore>>;
79
81
  /**
package/dist/core.js CHANGED
@@ -6,7 +6,6 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  import { AbilityRegistry } from '@byline/auth';
9
- import { pino } from 'pino';
10
9
  import { registerCollectionAbilities } from './auth/register-collection-abilities.js';
11
10
  import { defineBylineCore, defineServerConfig, getBylineCoreUnsafe } from './config/config.js';
12
11
  import { createBylineLogger, defineLogger } from './lib/logger.js';
@@ -21,9 +20,15 @@ import { validateRichTextFieldFlags } from './services/richtext-populate.js';
21
20
  * backward compatibility with `getServerConfig()`.
22
21
  *
23
22
  * @param config - Server configuration (collections, db, storage, i18n).
24
- * @param pinoLogger - Optional raw Pino instance. Defaults to `pino({ level: 'info' })`.
23
+ * @param pinoLogger - Optional raw Pino instance. When omitted a default
24
+ * `pino({ level: 'info' })` is constructed via dynamic import so the
25
+ * pino runtime stays out of the client bundle (see import comment above).
25
26
  */
26
- export const initBylineCore = async (config, pinoLogger = pino({ level: 'info' })) => {
27
+ export const initBylineCore = async (config, pinoLogger) => {
28
+ if (!pinoLogger) {
29
+ const { pino } = await import('pino');
30
+ pinoLogger = pino({ level: 'info' });
31
+ }
27
32
  const registry = new Registry()
28
33
  .addValue('config', config)
29
34
  .addValue('collections', config.collections)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/core",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "0.10.3",
5
+ "version": "0.10.4",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -73,7 +73,7 @@
73
73
  "pino": "^10.3.1",
74
74
  "uuid": "^14.0.0",
75
75
  "zod": "^4.4.2",
76
- "@byline/auth": "0.10.3"
76
+ "@byline/auth": "0.10.4"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@biomejs/biome": "2.4.14",