@expressots/core 4.0.0-preview.1 → 4.0.0-preview.3
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/LICENSE.md +21 -21
- package/README.md +66 -66
- package/lib/CHANGELOG.md +774 -774
- package/lib/README.md +66 -66
- package/lib/cjs/application/application-factory.js +6 -0
- package/lib/cjs/application/bootstrap.js +117 -213
- package/lib/cjs/config/define-config.js +1 -1
- package/lib/cjs/config/env-field-builders.js +47 -0
- package/lib/cjs/config/index.js +7 -1
- package/lib/cjs/framework-version.js +10 -0
- package/lib/cjs/lazy-loading/index.js +5 -1
- package/lib/cjs/lazy-loading/lazy-module-helpers.js +49 -0
- package/lib/cjs/middleware/index.js +8 -9
- package/lib/cjs/middleware/middleware-service.js +68 -12
- package/lib/cjs/middleware/presets-standalone.js +93 -0
- package/lib/cjs/provider/db-in-memory/adapter/in-memory.adapter.js +23 -0
- package/lib/cjs/provider/db-in-memory/index.js +11 -1
- package/lib/cjs/provider/db-in-memory/query/query-engine.js +28 -0
- package/lib/cjs/provider/db-in-memory/schema/decorators.js +18 -0
- package/lib/cjs/provider/db-in-memory/storage/index.js +3 -1
- package/lib/cjs/provider/db-in-memory/storage/memory-store.js +72 -1
- package/lib/cjs/provider/logger/logger.banner.js +40 -31
- package/lib/cjs/provider/logger/logger.config.js +11 -1
- package/lib/cjs/provider/logger/logger.formatter.js +22 -1
- package/lib/cjs/provider/logger/logger.provider.js +59 -9
- package/lib/cjs/provider/logger/transports/console.transport.js +69 -6
- package/lib/cjs/provider/logger/transports/file.transport.js +27 -18
- package/lib/cjs/provider/logger/utils/log-levels.js +6 -5
- package/lib/cjs/provider/validation/adapters/index.js +12 -5
- package/lib/cjs/provider/validation/adapters/yup.adapter.js +118 -0
- package/lib/cjs/provider/validation/adapters/zod.adapter.js +137 -0
- package/lib/cjs/provider/validation/index.js +5 -1
- package/lib/cjs/render/adapters/react-adapter.js +14 -14
- package/lib/cjs/render/features/type-generator.js +30 -30
- package/lib/cjs/render/features/view-debugger.js +75 -55
- package/lib/cjs/testing/fluent-request.js +7 -0
- package/lib/cjs/testing/snapshot-request.js +2 -0
- package/lib/cjs/types/application/application-factory.d.ts +6 -0
- package/lib/cjs/types/application/bootstrap.d.ts +196 -24
- package/lib/cjs/types/config/config.interfaces.d.ts +7 -1
- package/lib/cjs/types/config/env-field-builders.d.ts +39 -0
- package/lib/cjs/types/config/index.d.ts +1 -1
- package/lib/cjs/types/framework-version.d.ts +7 -0
- package/lib/cjs/types/lazy-loading/index.d.ts +1 -0
- package/lib/cjs/types/lazy-loading/lazy-module-helpers.d.ts +42 -0
- package/lib/cjs/types/middleware/index.d.ts +1 -1
- package/lib/cjs/types/middleware/middleware-service.d.ts +21 -0
- package/lib/cjs/types/middleware/presets-standalone.d.ts +75 -0
- package/lib/cjs/types/provider/db-in-memory/adapter/in-memory.adapter.d.ts +2 -0
- package/lib/cjs/types/provider/db-in-memory/index.d.ts +9 -1
- package/lib/cjs/types/provider/db-in-memory/query/query-engine.d.ts +14 -1
- package/lib/cjs/types/provider/db-in-memory/schema/decorators.d.ts +14 -0
- package/lib/cjs/types/provider/db-in-memory/storage/index.d.ts +1 -1
- package/lib/cjs/types/provider/db-in-memory/storage/memory-store.d.ts +34 -0
- package/lib/cjs/types/provider/logger/logger.banner.d.ts +1 -1
- package/lib/cjs/types/provider/logger/logger.config.d.ts +7 -0
- package/lib/cjs/types/provider/logger/logger.formatter.d.ts +10 -0
- package/lib/cjs/types/provider/logger/logger.provider.d.ts +32 -1
- package/lib/cjs/types/provider/logger/transports/console.transport.d.ts +7 -0
- package/lib/cjs/types/provider/logger/utils/log-levels.d.ts +3 -3
- package/lib/cjs/types/provider/validation/adapters/index.d.ts +7 -4
- package/lib/cjs/types/provider/validation/adapters/yup.adapter.d.ts +65 -0
- package/lib/cjs/types/provider/validation/adapters/zod.adapter.d.ts +84 -0
- package/lib/cjs/types/provider/validation/index.d.ts +1 -1
- package/lib/cjs/types/render/features/view-debugger.d.ts +10 -0
- package/lib/cjs/types/testing/testing.interfaces.d.ts +31 -6
- package/lib/esm/application/application-factory.js +6 -0
- package/lib/esm/application/bootstrap.js +117 -213
- package/lib/esm/config/define-config.js +1 -1
- package/lib/esm/config/env-field-builders.js +48 -0
- package/lib/esm/config/index.js +6 -1
- package/lib/esm/framework-version.js +7 -0
- package/lib/esm/lazy-loading/index.js +2 -0
- package/lib/esm/lazy-loading/lazy-module-helpers.js +45 -0
- package/lib/esm/middleware/index.js +3 -2
- package/lib/esm/middleware/middleware-service.js +68 -12
- package/lib/esm/middleware/presets-standalone.js +87 -0
- package/lib/esm/provider/db-in-memory/adapter/in-memory.adapter.js +23 -0
- package/lib/esm/provider/db-in-memory/index.js +9 -1
- package/lib/esm/provider/db-in-memory/query/query-engine.js +28 -0
- package/lib/esm/provider/db-in-memory/schema/decorators.js +18 -0
- package/lib/esm/provider/db-in-memory/storage/index.js +1 -1
- package/lib/esm/provider/db-in-memory/storage/memory-store.js +75 -0
- package/lib/esm/provider/logger/logger.banner.js +40 -31
- package/lib/esm/provider/logger/logger.config.js +12 -2
- package/lib/esm/provider/logger/logger.formatter.js +22 -1
- package/lib/esm/provider/logger/logger.provider.js +61 -10
- package/lib/esm/provider/logger/transports/console.transport.js +69 -6
- package/lib/esm/provider/logger/transports/file.transport.js +27 -18
- package/lib/esm/provider/logger/utils/log-levels.js +6 -5
- package/lib/esm/provider/validation/adapters/index.js +7 -4
- package/lib/esm/provider/validation/adapters/yup.adapter.js +111 -0
- package/lib/esm/provider/validation/adapters/zod.adapter.js +130 -0
- package/lib/esm/provider/validation/index.js +1 -1
- package/lib/esm/render/adapters/react-adapter.js +14 -14
- package/lib/esm/render/features/type-generator.js +30 -30
- package/lib/esm/render/features/view-debugger.js +75 -55
- package/lib/esm/testing/fluent-request.js +7 -0
- package/lib/esm/testing/snapshot-request.js +2 -0
- package/lib/esm/types/application/application-factory.d.ts +6 -0
- package/lib/esm/types/application/bootstrap.d.ts +196 -24
- package/lib/esm/types/config/config.interfaces.d.ts +7 -1
- package/lib/esm/types/config/env-field-builders.d.ts +39 -0
- package/lib/esm/types/config/index.d.ts +1 -1
- package/lib/esm/types/framework-version.d.ts +7 -0
- package/lib/esm/types/lazy-loading/index.d.ts +1 -0
- package/lib/esm/types/lazy-loading/lazy-module-helpers.d.ts +42 -0
- package/lib/esm/types/middleware/index.d.ts +1 -1
- package/lib/esm/types/middleware/middleware-service.d.ts +21 -0
- package/lib/esm/types/middleware/presets-standalone.d.ts +75 -0
- package/lib/esm/types/provider/db-in-memory/adapter/in-memory.adapter.d.ts +2 -0
- package/lib/esm/types/provider/db-in-memory/index.d.ts +9 -1
- package/lib/esm/types/provider/db-in-memory/query/query-engine.d.ts +14 -1
- package/lib/esm/types/provider/db-in-memory/schema/decorators.d.ts +14 -0
- package/lib/esm/types/provider/db-in-memory/storage/index.d.ts +1 -1
- package/lib/esm/types/provider/db-in-memory/storage/memory-store.d.ts +34 -0
- package/lib/esm/types/provider/logger/logger.banner.d.ts +1 -1
- package/lib/esm/types/provider/logger/logger.config.d.ts +7 -0
- package/lib/esm/types/provider/logger/logger.formatter.d.ts +10 -0
- package/lib/esm/types/provider/logger/logger.provider.d.ts +32 -1
- package/lib/esm/types/provider/logger/transports/console.transport.d.ts +7 -0
- package/lib/esm/types/provider/logger/utils/log-levels.d.ts +3 -3
- package/lib/esm/types/provider/validation/adapters/index.d.ts +7 -4
- package/lib/esm/types/provider/validation/adapters/yup.adapter.d.ts +65 -0
- package/lib/esm/types/provider/validation/adapters/zod.adapter.d.ts +84 -0
- package/lib/esm/types/provider/validation/index.d.ts +1 -1
- package/lib/esm/types/render/features/view-debugger.d.ts +10 -0
- package/lib/esm/types/testing/testing.interfaces.d.ts +31 -6
- package/lib/package.json +23 -8
- package/package.json +23 -8
- package/lib/cjs/middleware/middleware-presets.js +0 -294
- package/lib/cjs/types/middleware/middleware-presets.d.ts +0 -90
- package/lib/esm/middleware/middleware-presets.js +0 -286
- package/lib/esm/types/middleware/middleware-presets.d.ts +0 -90
|
@@ -216,52 +216,147 @@ export interface EnvironmentFileConfig {
|
|
|
216
216
|
skipFileLoading?: boolean;
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
* Options for loadEnvSync
|
|
220
|
-
*
|
|
219
|
+
* Options for {@link loadEnvSync}.
|
|
220
|
+
*
|
|
221
|
+
* `loadEnvSync()` is the recommended way to populate `process.env` before
|
|
222
|
+
* `bootstrap()` runs. Call it at the top of `src/main.ts` (or your config
|
|
223
|
+
* module) so every subsequent `Env.*` builder, `defineConfig()` call, and
|
|
224
|
+
* DI binding can read the loaded values.
|
|
225
|
+
*
|
|
226
|
+
* ### File-loading order (last wins)
|
|
227
|
+
*
|
|
228
|
+
* | Step | File | Purpose |
|
|
229
|
+
* |------|------|---------|
|
|
230
|
+
* | 1 | `.env` | Shared defaults (committed) |
|
|
231
|
+
* | 2 | `.env.local` | Local-only overrides (gitignored) |
|
|
232
|
+
* | 3 | `.env.{env}.local` | Per-environment local override |
|
|
233
|
+
* | 4 | `.env.{env}` | Per-environment values (highest priority) |
|
|
234
|
+
*
|
|
235
|
+
* `{env}` is resolved from `process.env.NODE_ENV` (defaults to `"development"`).
|
|
236
|
+
* If a `files` mapping is provided, the mapped filename replaces `.env.{env}`.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* // 1. Zero-config (loads .env + .env.development by convention)
|
|
241
|
+
* loadEnvSync();
|
|
242
|
+
*
|
|
243
|
+
* // 2. Custom file names per environment
|
|
244
|
+
* loadEnvSync({
|
|
245
|
+
* files: {
|
|
246
|
+
* development: ".env",
|
|
247
|
+
* production: ".env.prod",
|
|
248
|
+
* staging: ".env.staging",
|
|
249
|
+
* },
|
|
250
|
+
* });
|
|
251
|
+
*
|
|
252
|
+
* // 3. Force reload after hot-module replacement
|
|
253
|
+
* loadEnvSync({ force: true });
|
|
254
|
+
* ```
|
|
255
|
+
*
|
|
256
|
+
* @see {@link loadEnvSync} for the function itself
|
|
257
|
+
* @see {@link BootstrapOptions.envFileConfig} for the bootstrap()-level alternative
|
|
258
|
+
* @public
|
|
221
259
|
*/
|
|
222
260
|
export interface LoadEnvSyncOptions {
|
|
223
261
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
262
|
+
* Map environment names to custom `.env` file paths.
|
|
263
|
+
*
|
|
264
|
+
* Only the entry matching the **current** `NODE_ENV` is used at runtime.
|
|
265
|
+
* Unmapped environments fall back to the convention `.env.{NODE_ENV}`.
|
|
266
|
+
*
|
|
267
|
+
* @default undefined (convention: `.env.{NODE_ENV}`)
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```typescript
|
|
271
|
+
* files: {
|
|
272
|
+
* development: ".env", // NODE_ENV=development -> loads .env
|
|
273
|
+
* production: ".env.prod", // NODE_ENV=production -> loads .env.prod
|
|
274
|
+
* test: ".env.test", // NODE_ENV=test -> loads .env.test
|
|
275
|
+
* }
|
|
276
|
+
* ```
|
|
226
277
|
*/
|
|
227
278
|
files?: EnvironmentFileMap;
|
|
228
279
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
280
|
+
* Reload environment files even if they were already loaded in this process.
|
|
281
|
+
*
|
|
282
|
+
* By default `loadEnvSync()` is a no-op after the first successful call
|
|
283
|
+
* (tracked via `process.env._EXPRESSOTS_ENV_LOADED`). Set `force: true`
|
|
284
|
+
* to re-read all files, useful after a hot-module replacement cycle.
|
|
285
|
+
*
|
|
231
286
|
* @default false
|
|
232
287
|
*/
|
|
233
288
|
force?: boolean;
|
|
234
289
|
}
|
|
235
290
|
/**
|
|
236
|
-
* Synchronously load
|
|
291
|
+
* Synchronously load `.env` files into `process.env`.
|
|
237
292
|
*
|
|
238
|
-
* Call this
|
|
239
|
-
*
|
|
293
|
+
* Call this **before** `bootstrap()` or `defineConfig()` so that every
|
|
294
|
+
* environment variable is available when the rest of the application
|
|
295
|
+
* resolves configuration, binds services, or reads `Env.*` builders.
|
|
240
296
|
*
|
|
241
|
-
*
|
|
297
|
+
* ### How it works
|
|
242
298
|
*
|
|
243
|
-
*
|
|
299
|
+
* 1. Reads `process.env.NODE_ENV` (defaults to `"development"`).
|
|
300
|
+
* 2. Loads files in priority order (last file wins on conflicts):
|
|
301
|
+
* `.env` → `.env.local` → `.env.{env}.local` → `.env.{env}`
|
|
302
|
+
* 3. If `options.files` maps the current environment to a custom name
|
|
303
|
+
* (e.g. `{ production: ".env.prod" }`), that name replaces `.env.{env}`.
|
|
304
|
+
* 4. Missing files are silently skipped.
|
|
305
|
+
* 5. Sets `process.env._EXPRESSOTS_ENV_LOADED = "true"` so subsequent
|
|
306
|
+
* calls are no-ops (unless `force: true`).
|
|
307
|
+
*
|
|
308
|
+
* ### Important
|
|
309
|
+
*
|
|
310
|
+
* `NODE_ENV` must already be set in the **shell** (or inherited from
|
|
311
|
+
* the process) before `loadEnvSync()` runs. The function reads
|
|
312
|
+
* `process.env.NODE_ENV` to decide which file to load; it does **not**
|
|
313
|
+
* derive the environment from file contents.
|
|
314
|
+
*
|
|
315
|
+
* @param options - See {@link LoadEnvSyncOptions} for all fields.
|
|
316
|
+
*
|
|
317
|
+
* @example Zero-config (recommended for most apps)
|
|
244
318
|
* ```typescript
|
|
245
|
-
* //
|
|
246
|
-
* import {
|
|
319
|
+
* // src/main.ts
|
|
320
|
+
* import { bootstrap, loadEnvSync } from "@expressots/core";
|
|
321
|
+
* import { App } from "./app";
|
|
322
|
+
*
|
|
323
|
+
* loadEnvSync(); // .env + .env.development (or .env.production, etc.)
|
|
324
|
+
* void bootstrap(App);
|
|
325
|
+
* ```
|
|
247
326
|
*
|
|
248
|
-
*
|
|
327
|
+
* @example Custom file mapping
|
|
328
|
+
* ```typescript
|
|
249
329
|
* loadEnvSync({
|
|
250
330
|
* files: {
|
|
251
|
-
* development: ".env
|
|
252
|
-
* production:
|
|
331
|
+
* development: ".env",
|
|
332
|
+
* production: ".env.prod",
|
|
333
|
+
* staging: ".env.staging",
|
|
253
334
|
* },
|
|
254
335
|
* });
|
|
336
|
+
* // With NODE_ENV=production -> .env + .env.prod
|
|
337
|
+
* // With NODE_ENV=development -> .env (mapped to itself, so loaded once)
|
|
338
|
+
* ```
|
|
339
|
+
*
|
|
340
|
+
* @example With defineConfig()
|
|
341
|
+
* ```typescript
|
|
342
|
+
* // src/config.ts
|
|
343
|
+
* import { defineConfig, Env, loadEnvSync } from "@expressots/core";
|
|
344
|
+
*
|
|
345
|
+
* loadEnvSync({ files: { production: ".env.prod" } });
|
|
255
346
|
*
|
|
256
|
-
* // Now defineConfig() will read from loaded .env files
|
|
257
347
|
* export const appConfig = defineConfig({
|
|
258
|
-
* server: {
|
|
259
|
-
* port: Env.port("PORT", { default: 3000 }),
|
|
260
|
-
* },
|
|
348
|
+
* server: { port: Env.port("PORT", { default: 3000 }) },
|
|
261
349
|
* });
|
|
262
350
|
* ```
|
|
263
351
|
*
|
|
264
|
-
* @
|
|
352
|
+
* @example Force reload (hot-module replacement)
|
|
353
|
+
* ```typescript
|
|
354
|
+
* loadEnvSync({ force: true });
|
|
355
|
+
* ```
|
|
356
|
+
*
|
|
357
|
+
* @see {@link LoadEnvSyncOptions} for option details
|
|
358
|
+
* @see {@link BootstrapOptions.envFileConfig} for the bootstrap()-level alternative
|
|
359
|
+
* @public
|
|
265
360
|
*/
|
|
266
361
|
export declare function loadEnvSync(options?: LoadEnvSyncOptions): void;
|
|
267
362
|
/**
|
|
@@ -471,14 +566,91 @@ export interface BootstrapOptions {
|
|
|
471
566
|
envFileConfig?: EnvironmentFileConfig;
|
|
472
567
|
}
|
|
473
568
|
/**
|
|
474
|
-
*
|
|
569
|
+
* Start the application with explicit options.
|
|
570
|
+
*
|
|
571
|
+
* Use this overload when you need to control the port, app metadata,
|
|
572
|
+
* environment selection, or `.env` file loading/validation.
|
|
573
|
+
*
|
|
574
|
+
* @param AppClass - Your class that extends `AppExpress`.
|
|
575
|
+
* @param options - See {@link BootstrapOptions} for every field.
|
|
576
|
+
* @returns The running server instance.
|
|
577
|
+
*
|
|
578
|
+
* @example Port + environment + validation
|
|
579
|
+
* ```typescript
|
|
580
|
+
* await bootstrap(App, {
|
|
581
|
+
* port: 4000,
|
|
582
|
+
* appName: "My API",
|
|
583
|
+
* currentEnvironment: "production",
|
|
584
|
+
* envFileConfig: {
|
|
585
|
+
* files: { production: ".env.prod" },
|
|
586
|
+
* required: ["DATABASE_URL", "JWT_SECRET"],
|
|
587
|
+
* validateValues: true,
|
|
588
|
+
* },
|
|
589
|
+
* });
|
|
590
|
+
* ```
|
|
591
|
+
*
|
|
592
|
+
* @example Dynamic port for testing
|
|
593
|
+
* ```typescript
|
|
594
|
+
* const server = await bootstrap(App, { port: 0 });
|
|
595
|
+
* const port = await server.getPort();
|
|
596
|
+
* ```
|
|
597
|
+
*
|
|
598
|
+
* @example Container / CI (no file I/O)
|
|
599
|
+
* ```typescript
|
|
600
|
+
* await bootstrap(App, {
|
|
601
|
+
* envFileConfig: {
|
|
602
|
+
* skipFileLoading: true,
|
|
603
|
+
* required: ["DATABASE_URL"],
|
|
604
|
+
* },
|
|
605
|
+
* });
|
|
606
|
+
* ```
|
|
607
|
+
*
|
|
608
|
+
* @public
|
|
475
609
|
*/
|
|
476
610
|
export declare function bootstrap(AppClass: new () => IWebServer, options: BootstrapOptions): Promise<IWebServerPublic>;
|
|
477
611
|
/**
|
|
478
|
-
*
|
|
612
|
+
* Start the application with a type-safe config object from `defineConfig()`.
|
|
613
|
+
*
|
|
614
|
+
* Pass the resolved config directly; `bootstrap()` extracts `app`, `server`,
|
|
615
|
+
* and `bootstrap.envFileConfig` automatically.
|
|
616
|
+
*
|
|
617
|
+
* @param AppClass - Your class that extends `AppExpress`.
|
|
618
|
+
* @param config - Object returned by `defineConfig().values` (or matching
|
|
619
|
+
* the {@link BootstrapConfig} shape).
|
|
620
|
+
* @returns The running server instance.
|
|
621
|
+
*
|
|
622
|
+
* @example
|
|
623
|
+
* ```typescript
|
|
624
|
+
* import { appConfig } from "./config";
|
|
625
|
+
*
|
|
626
|
+
* await bootstrap(App, appConfig.values);
|
|
627
|
+
* // appConfig.values has { app, server, bootstrap } from defineConfig()
|
|
628
|
+
* ```
|
|
629
|
+
*
|
|
630
|
+
* @public
|
|
479
631
|
*/
|
|
480
632
|
export declare function bootstrap(AppClass: new () => IWebServer, config: BootstrapConfig): Promise<IWebServerPublic>;
|
|
481
633
|
/**
|
|
482
|
-
*
|
|
634
|
+
* Start the application with zero configuration.
|
|
635
|
+
*
|
|
636
|
+
* - Listens on `process.env.PORT` or **3000**.
|
|
637
|
+
* - Reads `appName` and `appVersion` from `package.json`.
|
|
638
|
+
* - Does **not** load any `.env` files (opt-in via {@link BootstrapOptions.envFileConfig}
|
|
639
|
+
* or by calling {@link loadEnvSync} before this).
|
|
640
|
+
* - Sets up graceful shutdown on `SIGINT` / `SIGTERM`.
|
|
641
|
+
*
|
|
642
|
+
* @param AppClass - Your class that extends `AppExpress`.
|
|
643
|
+
* @returns The running server instance.
|
|
644
|
+
*
|
|
645
|
+
* @example
|
|
646
|
+
* ```typescript
|
|
647
|
+
* import { bootstrap, loadEnvSync } from "@expressots/core";
|
|
648
|
+
* import { App } from "./app";
|
|
649
|
+
*
|
|
650
|
+
* loadEnvSync(); // optional: load .env files first
|
|
651
|
+
* await bootstrap(App); // starts on PORT from .env or 3000
|
|
652
|
+
* ```
|
|
653
|
+
*
|
|
654
|
+
* @public
|
|
483
655
|
*/
|
|
484
656
|
export declare function bootstrap(AppClass: new () => IWebServer): Promise<IWebServerPublic>;
|
|
@@ -409,7 +409,13 @@ export interface DefineConfigOptions {
|
|
|
409
409
|
throwOnError?: boolean;
|
|
410
410
|
/**
|
|
411
411
|
* Log validation results.
|
|
412
|
-
*
|
|
412
|
+
*
|
|
413
|
+
* - `"warn"` (default): only warnings and errors are printed.
|
|
414
|
+
* - `"info"` / `"debug"`: prints the "CONFIGURATION LOADED" success banner
|
|
415
|
+
* plus warnings and errors.
|
|
416
|
+
* - `"error"`: only errors.
|
|
417
|
+
* - `"none"`: completely silent.
|
|
418
|
+
* @default "warn"
|
|
413
419
|
*/
|
|
414
420
|
logLevel?: ConfigLogLevel;
|
|
415
421
|
/**
|
|
@@ -274,6 +274,42 @@ declare function array<T extends string | number>(envVar: string, options?: Arra
|
|
|
274
274
|
*
|
|
275
275
|
* @public API
|
|
276
276
|
*/
|
|
277
|
+
/**
|
|
278
|
+
* Returns true when the current Node environment (`NODE_ENV`) matches the
|
|
279
|
+
* supplied name. Pass an array to match any of several names. The comparison
|
|
280
|
+
* is case-insensitive and falls back to `"development"` when `NODE_ENV` is
|
|
281
|
+
* unset, mirroring the convention used elsewhere in the framework.
|
|
282
|
+
*
|
|
283
|
+
* ```ts
|
|
284
|
+
* const config = defineConfig({
|
|
285
|
+
* server: { port: when(Env.is("production"), 443, 3000) },
|
|
286
|
+
* });
|
|
287
|
+
* ```
|
|
288
|
+
*
|
|
289
|
+
* @public API
|
|
290
|
+
*/
|
|
291
|
+
declare function isEnvironment(name: string | Array<string>): boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Conditional helper for environment-specific config values.
|
|
294
|
+
*
|
|
295
|
+
* `when(condition, value, fallback)` returns `value` when `condition` is
|
|
296
|
+
* truthy, otherwise `fallback`. The condition can be either a boolean
|
|
297
|
+
* (typically the result of `Env.is(...)`) or a callable that's evaluated
|
|
298
|
+
* lazily. The latter form lets you defer side-effectful checks until the
|
|
299
|
+
* config is actually resolved.
|
|
300
|
+
*
|
|
301
|
+
* ```ts
|
|
302
|
+
* const config = defineConfig({
|
|
303
|
+
* logging: {
|
|
304
|
+
* level: when(Env.is("production"), "info", "debug"),
|
|
305
|
+
* pretty: when(() => process.env.NO_COLOR !== "1", true, false),
|
|
306
|
+
* },
|
|
307
|
+
* });
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @public API
|
|
311
|
+
*/
|
|
312
|
+
declare function envWhen<TValue, TFallback>(condition: boolean | (() => boolean), value: TValue, fallback: TFallback): TValue | TFallback;
|
|
277
313
|
export declare const Env: {
|
|
278
314
|
readonly string: typeof string;
|
|
279
315
|
readonly number: typeof number;
|
|
@@ -284,5 +320,8 @@ export declare const Env: {
|
|
|
284
320
|
readonly secret: typeof secret;
|
|
285
321
|
readonly json: typeof json;
|
|
286
322
|
readonly array: typeof array;
|
|
323
|
+
readonly is: typeof isEnvironment;
|
|
324
|
+
readonly when: typeof envWhen;
|
|
287
325
|
};
|
|
326
|
+
export { isEnvironment as envIs, envWhen };
|
|
288
327
|
export { string as envString, number as envNumber, boolean as envBoolean, enumField as envEnum, url as envUrl, port as envPort, secret as envSecret, json as envJson, array as envArray, };
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
58
|
export { defineConfig, Env } from "./define-config.js";
|
|
59
|
-
export { envString, envNumber, envBoolean, envEnum, envUrl, envPort, envSecret, envJson, envArray, } from "./env-field-builders.js";
|
|
59
|
+
export { envString, envNumber, envBoolean, envEnum, envUrl, envPort, envSecret, envJson, envArray, envIs, envWhen, } from "./env-field-builders.js";
|
|
60
60
|
export type { ConfigValueType, ConfigEnvironment, ConfigLogLevel, BaseFieldOptions, StringFieldOptions, NumberFieldOptions, BooleanFieldOptions, EnumFieldOptions, UrlFieldOptions, PortFieldOptions, SecretFieldOptions, JsonFieldOptions, ArrayFieldOptions, ConfigField, ConfigValidationError, ConfigValidationResult, ConfigSchemaValue, ConfigSchema, DefineConfigOptions, ConfigChangeEvent, SecretValue, ResolvedConfig, IConfigInstance, } from "./config.interfaces.js";
|
|
61
61
|
export { createSecretValue, isSecretValue } from "./secret-value.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework version string surfaced in startup banners and diagnostics.
|
|
3
|
+
*
|
|
4
|
+
* This file is auto-synced from the root `package.json` by
|
|
5
|
+
* `scripts/sync-version.js` before each build. Do not edit by hand.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FRAMEWORK_VERSION = "4.0.0-preview.3";
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
*/
|
|
37
37
|
export type { PreloadHint, ModuleLoadStatus, LazyModuleConfig, LazyModuleFactory, ILazyModule, ILazyModuleLoader, ModuleLoadStatistics, ILazyModuleManager, ModuleRecommendation, ApplyRecommendationsOptions, ILazyLoadMetrics, WarmupStrategy, WarmupConfig, ILazyModuleWarmup, LoadingPhase, ProgressiveLoadingConfig, LazyLoadingOptions, LazyLoadingSetupResult, } from "./lazy.interfaces.js";
|
|
38
38
|
export { LazyModule, CreateLazyModule, createLazyModule, isLazyModule, getModuleName, LAZY_MODULE_METADATA_KEY, } from "./lazy-module.js";
|
|
39
|
+
export { withPreloadHint, withLazyConfig } from "./lazy-module-helpers.js";
|
|
39
40
|
export { LazyModuleLoader, createLazyModuleLoader, } from "./lazy-module-loader.js";
|
|
40
41
|
export { LazyModuleManager, createLazyModuleManager, } from "./lazy-module-manager.js";
|
|
41
42
|
export { LazyLoadMetrics, createLazyLoadMetrics } from "./lazy-load-metrics.js";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone (free-function) wrappers around `LazyModule` chain methods.
|
|
3
|
+
*
|
|
4
|
+
* The fluent API (`module.withPreloadHint(...).withLazyConfig(...)`) remains
|
|
5
|
+
* the recommended style. These helpers exist so users can compose lazy
|
|
6
|
+
* configurations with point-free style or apply the same hint to a list of
|
|
7
|
+
* modules:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { CreateLazyModule, withPreloadHint, withLazyConfig } from "@expressots/core";
|
|
11
|
+
*
|
|
12
|
+
* const Admin = withPreloadHint(
|
|
13
|
+
* CreateLazyModule([AdminController]),
|
|
14
|
+
* "low",
|
|
15
|
+
* );
|
|
16
|
+
*
|
|
17
|
+
* const Analytics = withLazyConfig(
|
|
18
|
+
* CreateLazyModule([AnalyticsController]),
|
|
19
|
+
* { preloadHint: "medium", prefetchAfterIdle: 5000 },
|
|
20
|
+
* );
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @public API
|
|
24
|
+
*/
|
|
25
|
+
import type { ILazyModule, LazyModuleConfig, PreloadHint } from "./lazy.interfaces.js";
|
|
26
|
+
/**
|
|
27
|
+
* Set a preload hint on the supplied lazy module and return it.
|
|
28
|
+
*
|
|
29
|
+
* Equivalent to `module.withPreloadHint(hint)`. Returned reference is the same
|
|
30
|
+
* instance — no copy is made.
|
|
31
|
+
*
|
|
32
|
+
* @public API
|
|
33
|
+
*/
|
|
34
|
+
export declare function withPreloadHint(module: ILazyModule, hint: PreloadHint): ILazyModule;
|
|
35
|
+
/**
|
|
36
|
+
* Merge the supplied partial config into the lazy module and return it.
|
|
37
|
+
*
|
|
38
|
+
* Equivalent to `module.withLazyConfig(config)`.
|
|
39
|
+
*
|
|
40
|
+
* @public API
|
|
41
|
+
*/
|
|
42
|
+
export declare function withLazyConfig(module: ILazyModule, config: Partial<LazyModuleConfig>): ILazyModule;
|
|
@@ -2,7 +2,6 @@ export { Middleware, ExpressHandler, ExpressoMiddleware, MiddlewareOptions, Midd
|
|
|
2
2
|
export { ErrorHandlerOptions, IMiddleware, HealthCheckOptions, } from "./middleware-interface.js";
|
|
3
3
|
export { middlewareResolver, isMiddlewareAvailable, isPackageAvailable, resolvePackage, getAvailableMiddleware, getRegisteredMiddleware, clearMiddlewareCache, getPackageName, MIDDLEWARE_REGISTRY, RegisteredMiddlewareName, } from "./middleware-resolver.js";
|
|
4
4
|
export { MiddlewareProfiler, MiddlewareMetrics, ProfilerStats, } from "./middleware-profiler.js";
|
|
5
|
-
export { MiddlewarePresetName, MiddlewarePreset, PresetMiddlewareConfig, ApplyPresetOptions, MIDDLEWARE_PRESETS, getPreset, getPresetNames, getPresetsByTag, createPreset, mergePresets, } from "./middleware-presets.js";
|
|
6
5
|
export type { OptionsJson } from "./interfaces/body-parser.interface.js";
|
|
7
6
|
export type { CorsOptions } from "./interfaces/cors.interface.js";
|
|
8
7
|
export type { CompressionOptions } from "./interfaces/compression.interface.js";
|
|
@@ -19,6 +18,7 @@ export type * as IMorgan from "./interfaces/morgan.interface.js";
|
|
|
19
18
|
export { ContentNegotiationService, FormatterRegistry, AcceptHeaderParser, JsonFormatter, XmlFormatter, CsvFormatter, YamlFormatter, PlainTextFormatter, } from "./content-negotiation/index.js";
|
|
20
19
|
export type { IContentFormatter, ContentNegotiationOptions, AcceptHeaderEntry, NegotiationResult, CsvFormatOptions, XmlFormatOptions, YamlFormatOptions, } from "./interfaces/content-negotiation.interface.js";
|
|
21
20
|
export { use, compose, when, parallel, timeout } from "./middleware-utils.js";
|
|
21
|
+
export { definePreset, applyPreset, getStandalonePresetNames, clearStandalonePresets, } from "./presets-standalone.js";
|
|
22
22
|
export { MiddlewareRegistry, getMiddlewareRegistry, resetMiddlewareRegistry, } from "./middleware-registry.js";
|
|
23
23
|
export type { MiddlewareEntry as RegistryMiddlewareEntry } from "./middleware-registry.js";
|
|
24
24
|
export { setGlobalUploadConfig, getGlobalUploadConfig, hasGlobalUploadConfig, clearGlobalUploadConfig, mergeUploadConfigs, } from "./upload-registry.js";
|
|
@@ -250,6 +250,7 @@ export declare class Middleware implements IMiddleware {
|
|
|
250
250
|
private profiler;
|
|
251
251
|
private profilingEnabled;
|
|
252
252
|
private customPresets;
|
|
253
|
+
private _lastPreset;
|
|
253
254
|
private registry;
|
|
254
255
|
private startupLogs;
|
|
255
256
|
private registeredMiddlewareNames;
|
|
@@ -699,8 +700,28 @@ export declare class Middleware implements IMiddleware {
|
|
|
699
700
|
* Get all available presets.
|
|
700
701
|
*/
|
|
701
702
|
getAllPresets(): Record<string, V4MiddlewareConfig>;
|
|
703
|
+
/**
|
|
704
|
+
* Returns info about the last applied preset (name, whether overrides
|
|
705
|
+
* were used, and the effective merged config). Used by the adapter to
|
|
706
|
+
* forward preset metadata to Studio.
|
|
707
|
+
*/
|
|
708
|
+
getLastAppliedPreset(): {
|
|
709
|
+
name: string;
|
|
710
|
+
hasOverrides: boolean;
|
|
711
|
+
config: V4MiddlewareConfig;
|
|
712
|
+
} | null;
|
|
702
713
|
/**
|
|
703
714
|
* Get built-in presets.
|
|
715
|
+
*
|
|
716
|
+
* Each preset is tuned for a specific workload:
|
|
717
|
+
* - api: REST APIs (large payloads, rate-limited, strict CORS)
|
|
718
|
+
* - web: traditional server-rendered apps (cookies, sessions, relaxed CORS)
|
|
719
|
+
* - spa: single-page apps served with static fallback
|
|
720
|
+
* - microservice: internal service-to-service (minimal surface, no security)
|
|
721
|
+
* - graphql: single endpoint with large JSON payloads
|
|
722
|
+
* - minimal: parsing only, no security or compression
|
|
723
|
+
* - development: relaxed for local iteration, verbose logging
|
|
724
|
+
* - production: hardened defaults for shipped deployments
|
|
704
725
|
*/
|
|
705
726
|
private getBuiltInPresets;
|
|
706
727
|
/**
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone (free-function) wrappers around the v4 middleware preset system.
|
|
3
|
+
*
|
|
4
|
+
* These exist alongside the `Middleware.definePreset` / `Middleware.applyPreset`
|
|
5
|
+
* instance methods so user code that doesn't have DI access to the `Middleware`
|
|
6
|
+
* provider — for example, declarative config files outside of the request
|
|
7
|
+
* lifecycle — can still register and apply presets.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { definePreset, applyPreset } from "@expressots/core";
|
|
12
|
+
*
|
|
13
|
+
* definePreset("my-api", {
|
|
14
|
+
* parse: { json: { limit: "1mb" } },
|
|
15
|
+
* security: { cors: { origin: "https://app.example.com" } },
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* // ...later, inside configureServices(), with the Middleware DI provider:
|
|
19
|
+
* applyPreset(this.services.middleware, "my-api");
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @public API
|
|
23
|
+
*/
|
|
24
|
+
import type { Middleware } from "./middleware-service.js";
|
|
25
|
+
import type { MiddlewareConfig } from "./middleware-config.js";
|
|
26
|
+
/**
|
|
27
|
+
* Register a custom middleware preset under the given name.
|
|
28
|
+
*
|
|
29
|
+
* The preset is stored in a module-level registry so it can be referenced
|
|
30
|
+
* later by `applyPreset(middleware, name)`. Calling `definePreset` with an
|
|
31
|
+
* existing name overwrites the previous definition.
|
|
32
|
+
*
|
|
33
|
+
* @param name unique identifier for the preset
|
|
34
|
+
* @param config v4 middleware config object describing the preset
|
|
35
|
+
*
|
|
36
|
+
* @public API
|
|
37
|
+
*/
|
|
38
|
+
export declare function definePreset(name: string, config: MiddlewareConfig): void;
|
|
39
|
+
/**
|
|
40
|
+
* Apply a previously defined preset (built-in or registered via
|
|
41
|
+
* `definePreset`) to the supplied `Middleware` instance.
|
|
42
|
+
*
|
|
43
|
+
* Resolution order:
|
|
44
|
+
* 1. Built-in v4 presets (`api`, `web`, `spa`, `microservice`, `graphql`,
|
|
45
|
+
* `minimal`, `development`, `production`) are matched by the
|
|
46
|
+
* `Middleware` instance itself.
|
|
47
|
+
* 2. Custom presets previously registered via `Middleware.definePreset`
|
|
48
|
+
* on the same instance.
|
|
49
|
+
* 3. Custom presets registered via the standalone `definePreset` here —
|
|
50
|
+
* these are forwarded to the instance on demand.
|
|
51
|
+
*
|
|
52
|
+
* @param middleware the active `Middleware` provider (typically resolved from
|
|
53
|
+
* the DI container inside `configureServices()`)
|
|
54
|
+
* @param name preset to apply
|
|
55
|
+
* @param overrides optional partial config that is merged on top of the
|
|
56
|
+
* preset before application
|
|
57
|
+
*
|
|
58
|
+
* @public API
|
|
59
|
+
*/
|
|
60
|
+
export declare function applyPreset(middleware: Middleware, name: string, overrides?: Partial<MiddlewareConfig>): void;
|
|
61
|
+
/**
|
|
62
|
+
* Returns the names of every preset registered through the standalone
|
|
63
|
+
* `definePreset` helper. Built-in presets and per-instance custom presets
|
|
64
|
+
* are NOT included — those live on the `Middleware` instance.
|
|
65
|
+
*
|
|
66
|
+
* @public API
|
|
67
|
+
*/
|
|
68
|
+
export declare function getStandalonePresetNames(): Array<string>;
|
|
69
|
+
/**
|
|
70
|
+
* Remove every preset registered through the standalone `definePreset`
|
|
71
|
+
* helper. Useful in tests; rarely needed at runtime.
|
|
72
|
+
*
|
|
73
|
+
* @public API
|
|
74
|
+
*/
|
|
75
|
+
export declare function clearStandalonePresets(): void;
|
|
@@ -125,6 +125,8 @@ export interface InMemoryDatabaseOptions {
|
|
|
125
125
|
timestamps?: boolean;
|
|
126
126
|
/** Enable soft deletes by default for all tables */
|
|
127
127
|
softDelete?: boolean;
|
|
128
|
+
/** Maximum number of records per table (0 = unlimited) */
|
|
129
|
+
maxRecordsPerTable?: number;
|
|
128
130
|
/** Persistence configuration */
|
|
129
131
|
persist?: {
|
|
130
132
|
/** Storage type */
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
* A high-performance, Prisma-compatible in-memory database
|
|
5
5
|
* for ExpressoTS applications.
|
|
6
6
|
*
|
|
7
|
+
* Scope: this database is intended for development, testing, and
|
|
8
|
+
* prototyping. Data lives in process memory (with optional file
|
|
9
|
+
* snapshots) and does not provide the crash safety, concurrency, or
|
|
10
|
+
* multi-process guarantees of a real database engine. It implements the
|
|
11
|
+
* universal `IDataAdapter` contract so it can be swapped for a
|
|
12
|
+
* production adapter (Prisma, TypeORM, etc.) without rewriting
|
|
13
|
+
* repositories.
|
|
14
|
+
*
|
|
7
15
|
* Features:
|
|
8
16
|
* - Prisma-like query API
|
|
9
17
|
* - Type-safe queries with TypeScript
|
|
@@ -56,7 +64,7 @@ export { InMemoryDBProvider, InMemoryDBConfig, BaseRepository, } from "./db.prov
|
|
|
56
64
|
export { IDataAdapter, ITableAdapter, IMultiTableAdapter, IReactiveDataAdapter, ISubscription, ChangeEvent, ChangeType, InMemoryAdapter, InMemoryAdapterOptions, InMemoryDatabase, InMemoryDatabaseOptions, } from "./adapter/index.js";
|
|
57
65
|
export { IEntity, ITimestampedEntity, ISoftDeleteEntity, Entity, EntityOptions, EntityMetadata, PrimaryKey, AutoGenerate, AutoGenerateStrategy, Index, IndexOptions, Unique, Nullable, Default, HasMany, HasOne, BelongsTo, ManyToMany, RelationType, RelationMetadata, SchemaRegistry, DB_METADATA_KEYS, } from "./schema/index.js";
|
|
58
66
|
export { StringFilter, NumberFilter, BooleanFilter, DateFilter, FieldFilter, WhereInput, WhereUniqueInput, OrderByInput, SortOrder, SelectInput, IncludeInput, FindUniqueArgs, FindFirstArgs, FindManyArgs, CreateArgs, CreateInput, CreateManyArgs, UpdateArgs, UpdateInput, UpdateManyArgs, UpsertArgs, DeleteArgs, DeleteManyArgs, CountArgs, CountSelect, AggregateArgs, AggregateResult, NumericFieldsOnly, GroupByArgs, BatchPayload, TransactionClient, QueryEngine, } from "./query/index.js";
|
|
59
|
-
export { MemoryStore, MemoryStoreOptions, IndexManager, IdGenerator, UniqueConstraintError, EntityNotFoundError, EntityAlreadyExistsError, } from "./storage/index.js";
|
|
67
|
+
export { MemoryStore, MemoryStoreOptions, IndexManager, IdGenerator, UniqueConstraintError, EntityNotFoundError, EntityAlreadyExistsError, MaxRecordsExceededError, EntityValidationError, } from "./storage/index.js";
|
|
60
68
|
export { IRepository, IDataTable, IDataProvider, } from "./db-in-memory.interface.js";
|
|
61
69
|
export { InMemoryDataProvider, InMemoryDataTable, } from "./db-in-memory.provider.js";
|
|
62
70
|
export { EntityNotFoundError as LegacyEntityNotFoundError, EntityAlreadyExistsError as LegacyEntityAlreadyExistsError, } from "./db-in-memory.types.js";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { IEntity } from "../schema/entity.interface.js";
|
|
9
9
|
import { MemoryStore } from "../storage/memory-store.js";
|
|
10
|
-
import { WhereInput, OrderByInput, FindManyArgs, SelectInput, AggregateArgs, AggregateResult } from "./query.types.js";
|
|
10
|
+
import { WhereInput, WhereUniqueInput, OrderByInput, FindManyArgs, SelectInput, AggregateArgs, AggregateResult } from "./query.types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Query Engine for parsing and executing Prisma-like queries.
|
|
13
13
|
*
|
|
@@ -72,6 +72,19 @@ export declare class QueryEngine<T extends IEntity> {
|
|
|
72
72
|
* @returns Paginated entities
|
|
73
73
|
*/
|
|
74
74
|
executePagination(entities: Array<T>, skip?: number, take?: number): Array<T>;
|
|
75
|
+
/**
|
|
76
|
+
* Apply cursor-based pagination. The cursor identifies a record (by id or
|
|
77
|
+
* any other field combination) within the ordered result set; the returned
|
|
78
|
+
* slice starts at that record. Combine with `skip` (typically `skip: 1` to
|
|
79
|
+
* exclude the cursor itself) and `take`.
|
|
80
|
+
*
|
|
81
|
+
* Should be applied after `orderBy` and before `skip`/`take`.
|
|
82
|
+
*
|
|
83
|
+
* @param entities - Ordered entities to slice
|
|
84
|
+
* @param cursor - Unique cursor identifying the start record
|
|
85
|
+
* @returns Entities starting at the cursor (empty array if not found)
|
|
86
|
+
*/
|
|
87
|
+
executeCursor(entities: Array<T>, cursor?: WhereUniqueInput<T>): Array<T>;
|
|
75
88
|
/**
|
|
76
89
|
* Get distinct entities by specified fields.
|
|
77
90
|
* @param entities - Entities to filter
|
|
@@ -306,6 +306,20 @@ export declare class SchemaRegistry {
|
|
|
306
306
|
* @public API
|
|
307
307
|
*/
|
|
308
308
|
static getRelations(target: new (...args: Array<unknown>) => unknown): Array<RelationMetadata>;
|
|
309
|
+
/**
|
|
310
|
+
* Get primary key field names for an entity.
|
|
311
|
+
* @param target - Entity class
|
|
312
|
+
* @returns Array of primary key field names
|
|
313
|
+
* @public API
|
|
314
|
+
*/
|
|
315
|
+
static getPrimaryKeys(target: new (...args: Array<unknown>) => unknown): Array<string | symbol>;
|
|
316
|
+
/**
|
|
317
|
+
* Get nullable field names for an entity.
|
|
318
|
+
* @param target - Entity class
|
|
319
|
+
* @returns Array of nullable field names
|
|
320
|
+
* @public API
|
|
321
|
+
*/
|
|
322
|
+
static getNullableFields(target: new (...args: Array<unknown>) => unknown): Array<string | symbol>;
|
|
309
323
|
/**
|
|
310
324
|
* Clear all registered entities (useful for testing).
|
|
311
325
|
* @public API
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Storage Module Exports
|
|
3
3
|
* @module db-in-memory/storage
|
|
4
4
|
*/
|
|
5
|
-
export { MemoryStore, MemoryStoreOptions, IndexManager, IdGenerator, UniqueConstraintError, EntityNotFoundError, EntityAlreadyExistsError, } from "./memory-store.js";
|
|
5
|
+
export { MemoryStore, MemoryStoreOptions, IndexManager, IdGenerator, UniqueConstraintError, EntityNotFoundError, EntityAlreadyExistsError, MaxRecordsExceededError, EntityValidationError, } from "./memory-store.js";
|