@holo-js/kernel 0.3.24 → 0.3.26

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +80 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -123,6 +123,78 @@ declare function loadHoloPluginDefinitions(projectRoot: string, packageNames: re
123
123
  declare function loadHoloPluginContributionModules(projectRoot: string, plugins: readonly LoadedHoloPluginDefinition[], scope: string, key: string, options?: PluginLoadOptions): Promise<readonly HoloPluginRuntimeModule[]>;
124
124
  declare function loadHoloPluginBootModules(projectRoot: string, plugins: readonly LoadedHoloPluginDefinition[], options?: PluginLoadOptions): Promise<readonly HoloPluginRuntimeModule[]>;
125
125
 
126
+ type TransactionScopeKind = 'root' | 'transaction' | 'savepoint';
127
+ interface ConcurrencyOptions {
128
+ maxConcurrentQueries?: number;
129
+ queueLimit?: number;
130
+ workerThreads?: boolean;
131
+ }
132
+ interface QueryStartLog {
133
+ kind: 'query' | 'execute';
134
+ connectionName: string;
135
+ sql: string;
136
+ bindings: unknown[];
137
+ source?: string;
138
+ scope: TransactionScopeKind;
139
+ schedulingMode?: 'concurrent' | 'serialized' | 'worker';
140
+ }
141
+ interface QuerySuccessLog extends QueryStartLog {
142
+ durationMs: number;
143
+ rowCount?: number;
144
+ affectedRows?: number;
145
+ }
146
+ interface QueryErrorLog extends QueryStartLog {
147
+ durationMs: number;
148
+ error: unknown;
149
+ }
150
+ interface TransactionLog {
151
+ scope: Exclude<TransactionScopeKind, 'root'>;
152
+ depth: number;
153
+ savepointName?: string;
154
+ }
155
+ interface MigrationStartLog {
156
+ connectionName: string;
157
+ migrationName: string;
158
+ action: 'up' | 'down';
159
+ batch?: number;
160
+ }
161
+ interface MigrationSuccessLog extends MigrationStartLog {
162
+ durationMs: number;
163
+ }
164
+ interface MigrationErrorLog extends MigrationStartLog {
165
+ durationMs: number;
166
+ error: unknown;
167
+ }
168
+ interface SeederStartLog {
169
+ connectionName: string;
170
+ seederName: string;
171
+ quietly: boolean;
172
+ environment?: string;
173
+ }
174
+ interface SeederSuccessLog extends SeederStartLog {
175
+ durationMs: number;
176
+ }
177
+ interface SeederErrorLog extends SeederStartLog {
178
+ durationMs: number;
179
+ error: unknown;
180
+ }
181
+ interface DatabaseLogger {
182
+ onQueryStart?(entry: QueryStartLog): void | Promise<void>;
183
+ onQuerySuccess?(entry: QuerySuccessLog): void | Promise<void>;
184
+ onQueryError?(entry: QueryErrorLog): void | Promise<void>;
185
+ onTransactionStart?(entry: TransactionLog): void | Promise<void>;
186
+ onTransactionCommit?(entry: TransactionLog): void | Promise<void>;
187
+ onTransactionRollback?(entry: TransactionLog & {
188
+ error?: unknown;
189
+ }): void | Promise<void>;
190
+ onMigrationStart?(entry: MigrationStartLog): void | Promise<void>;
191
+ onMigrationSuccess?(entry: MigrationSuccessLog): void | Promise<void>;
192
+ onMigrationError?(entry: MigrationErrorLog): void | Promise<void>;
193
+ onSeederStart?(entry: SeederStartLog): void | Promise<void>;
194
+ onSeederSuccess?(entry: SeederSuccessLog): void | Promise<void>;
195
+ onSeederError?(entry: SeederErrorLog): void | Promise<void>;
196
+ }
197
+
126
198
  type HoloDatabaseDriver = 'sqlite' | 'postgres' | 'mysql';
127
199
  interface HoloProjectPaths {
128
200
  models: string;
@@ -149,9 +221,16 @@ interface HoloProjectConnectionConfig {
149
221
  filename?: string;
150
222
  schema?: string;
151
223
  ssl?: boolean | Record<string, unknown>;
224
+ max?: number;
225
+ connectionTimeoutMillis?: number;
226
+ idleTimeoutMillis?: number;
227
+ application_name?: string;
228
+ concurrency?: ConcurrencyOptions;
229
+ logger?: DatabaseLogger;
152
230
  logging?: boolean;
153
231
  security?: {
154
232
  allowUnsafeRawSql?: boolean;
233
+ debugSqlInLogs?: boolean;
155
234
  };
156
235
  }
157
236
  interface HoloProjectDatabaseConfig {
@@ -330,4 +409,4 @@ declare function resolveNormalizedRedisConnection(config: NormalizedHoloRedisCon
330
409
  declare function normalizeRedisConfig(config?: HoloRedisConfig): NormalizedHoloRedisConfig;
331
410
  declare function defineRedisConfig<TConfig extends HoloRedisConfig>(config: TConfig): Readonly<TConfig>;
332
411
 
333
- export { DEFAULT_HOLO_PROJECT_PATHS, DEFAULT_REDIS_CONNECTION, DEFAULT_REDIS_DB, DEFAULT_REDIS_HOST, DEFAULT_REDIS_PORT, HOLO_PROJECT_PREPARE_API_VERSION, type HoloDatabaseDriver, type HoloGeneratedProjectArtifact, type HoloManagedProjectArtifact, type HoloPluginBroadcastContributions, type HoloPluginCacheContributions, type HoloPluginCliContributions, type HoloPluginConfigContributions, type HoloPluginContributions, type HoloPluginDefinition, type HoloPluginDependencyContributions, type HoloPluginFrameworkContribution, type HoloPluginFrameworkTsconfigKind, type HoloPluginMailContributions, type HoloPluginMigrationContributions, type HoloPluginNotificationContributions, type HoloPluginPackageManager, type HoloPluginProjectContributions, type HoloPluginQueueContributions, type HoloPluginRuntimeContributions, type HoloPluginRuntimeMapContributions, type HoloPluginRuntimeModule, type HoloProjectArtifactContents, type HoloProjectConfig, type HoloProjectConnectionConfig, type HoloProjectDatabaseConfig, type HoloProjectPaths, type HoloProjectPrepareChange, type HoloProjectPrepareChangeKind, type HoloProjectPrepareCommand, type HoloProjectPrepareContext, type HoloProjectPrepareDiagnostic, HoloProjectPrepareError, type HoloProjectPrepareFailure, type HoloProjectPrepareFramework, type HoloProjectPrepareFullRetry, type HoloProjectPrepareLogger, type HoloProjectPrepareModule, type HoloProjectPreparePlugin, type HoloProjectPrepareResult, type HoloProjectPrepareRun, type HoloProjectPrepareSource, type HoloProjectPrepareWatch, type HoloProjectPreparedResult, type HoloProjectPreparer, type HoloRedisClusterNodeConfig, type HoloRedisConfig, type HoloRedisConnectionConfig, type LoadedHoloPluginDefinition, type NormalizedHoloProjectConfig, type NormalizedHoloRedisClusterNodeConfig, type NormalizedHoloRedisConfig, type NormalizedHoloRedisConnectionConfig, type PluginLoadOptions, type RuntimeContribution, RuntimeLifecycle, type RuntimeLifecycleContext, createRuntimeLifecycle, defineHoloPlugin, defineHoloProject, defineHoloProjectPreparer, defineRedisConfig, holoRedisDefaults, loadHoloPluginBootModules, loadHoloPluginContributionModules, loadHoloPluginDefinitions, normalizeHoloPluginDefinition, normalizeHoloProjectConfig, normalizeRedisConfig, resolveHoloPluginModulePath, resolveNormalizedRedisConnection };
412
+ export { type ConcurrencyOptions, DEFAULT_HOLO_PROJECT_PATHS, DEFAULT_REDIS_CONNECTION, DEFAULT_REDIS_DB, DEFAULT_REDIS_HOST, DEFAULT_REDIS_PORT, type DatabaseLogger, HOLO_PROJECT_PREPARE_API_VERSION, type HoloDatabaseDriver, type HoloGeneratedProjectArtifact, type HoloManagedProjectArtifact, type HoloPluginBroadcastContributions, type HoloPluginCacheContributions, type HoloPluginCliContributions, type HoloPluginConfigContributions, type HoloPluginContributions, type HoloPluginDefinition, type HoloPluginDependencyContributions, type HoloPluginFrameworkContribution, type HoloPluginFrameworkTsconfigKind, type HoloPluginMailContributions, type HoloPluginMigrationContributions, type HoloPluginNotificationContributions, type HoloPluginPackageManager, type HoloPluginProjectContributions, type HoloPluginQueueContributions, type HoloPluginRuntimeContributions, type HoloPluginRuntimeMapContributions, type HoloPluginRuntimeModule, type HoloProjectArtifactContents, type HoloProjectConfig, type HoloProjectConnectionConfig, type HoloProjectDatabaseConfig, type HoloProjectPaths, type HoloProjectPrepareChange, type HoloProjectPrepareChangeKind, type HoloProjectPrepareCommand, type HoloProjectPrepareContext, type HoloProjectPrepareDiagnostic, HoloProjectPrepareError, type HoloProjectPrepareFailure, type HoloProjectPrepareFramework, type HoloProjectPrepareFullRetry, type HoloProjectPrepareLogger, type HoloProjectPrepareModule, type HoloProjectPreparePlugin, type HoloProjectPrepareResult, type HoloProjectPrepareRun, type HoloProjectPrepareSource, type HoloProjectPrepareWatch, type HoloProjectPreparedResult, type HoloProjectPreparer, type HoloRedisClusterNodeConfig, type HoloRedisConfig, type HoloRedisConnectionConfig, type LoadedHoloPluginDefinition, type MigrationErrorLog, type MigrationStartLog, type MigrationSuccessLog, type NormalizedHoloProjectConfig, type NormalizedHoloRedisClusterNodeConfig, type NormalizedHoloRedisConfig, type NormalizedHoloRedisConnectionConfig, type PluginLoadOptions, type QueryErrorLog, type QueryStartLog, type QuerySuccessLog, type RuntimeContribution, RuntimeLifecycle, type RuntimeLifecycleContext, type SeederErrorLog, type SeederStartLog, type SeederSuccessLog, type TransactionLog, type TransactionScopeKind, createRuntimeLifecycle, defineHoloPlugin, defineHoloProject, defineHoloProjectPreparer, defineRedisConfig, holoRedisDefaults, loadHoloPluginBootModules, loadHoloPluginContributionModules, loadHoloPluginDefinitions, normalizeHoloPluginDefinition, normalizeHoloProjectConfig, normalizeRedisConfig, resolveHoloPluginModulePath, resolveNormalizedRedisConnection };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holo-js/kernel",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "description": "Holo-JS Framework - dependency-free contracts, plugins, and runtime lifecycle",
5
5
  "type": "module",
6
6
  "license": "MIT",