@digitaldefiance/node-express-suite 4.2.3 → 4.19.12

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/README.md +225 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -2400,6 +2400,231 @@ The following v1.x patterns still work in v2.0:
2400
2400
 
2401
2401
  ## ChangeLog
2402
2402
 
2403
+ ### Version 4.19.11
2404
+
2405
+ Version sync — bumped major/minor without substantive changes to match rest of suite.
2406
+
2407
+ ### Version 4.2.3
2408
+
2409
+ - Use `idProvider.parseSafe()` instead of `fromBytes(deserialize(...))` in Environment for cleaner ID parsing
2410
+ - Simplified environment tests accordingly
2411
+
2412
+ ### Version 4.2.2
2413
+
2414
+ - Added comprehensive Greenlock staging boolean tests and property-based tests for Let's Encrypt configuration preservation
2415
+
2416
+ ### Version 4.2.1
2417
+
2418
+ - Translated hardcoded English strings in UserController (`'Backup codes retrieved'`, `'Token is valid'`) to use `SuiteCoreStringKey` i18n keys
2419
+
2420
+ ### Version 4.2.0
2421
+
2422
+ **Storage Interfaces Moved to suite-core-lib**
2423
+
2424
+ - Moved `IDatabase`, `ICollection`, `IClientSession`, `IDatabaseLifecycleHooks`, and related storage interfaces from local `interfaces/storage/` to `@digitaldefiance/suite-core-lib`
2425
+ - Removed `IFailableResult` from local interfaces (now imported from suite-core-lib)
2426
+ - Removed local `document-types.ts`, `document-types.branded.spec.ts`, and `type-identity.property.spec.ts` (moved upstream)
2427
+ - Updated all imports across the codebase to reference suite-core-lib
2428
+
2429
+ ### Version 4.1.3
2430
+
2431
+ - Fixed environment variable parsing: `ADMIN_USER_ROLE_ID` and `SYSTEM_USER_ROLE_ID` were incorrectly reading from `ADMIN_ROLE_ID` and `SYSTEM_ROLE_ID` respectively
2432
+ - Fixed debug print for `SYSTEM_USER_ROLE_ID`
2433
+
2434
+ ### Version 4.1.2
2435
+
2436
+ - Dependency updates (ecies-lib, node-ecies-lib)
2437
+
2438
+ ### Version 4.1.1
2439
+
2440
+ - Dependency updates (ecies-lib, node-ecies-lib)
2441
+
2442
+ ### Version 4.1.0
2443
+
2444
+ **Document Type Naming Cleanup**
2445
+
2446
+ - Renamed document interfaces: `IUserDocument` → `UserDocument`, `IRoleDocument` → `RoleDocument`, `IUserRoleDocument` → `UserRoleDocument` (with re-exports for backward compatibility)
2447
+ - Updated `IServerInitResult` and all services/controllers to use new document type names
2448
+ - Cleaned up model, schema, and service files to use consistent naming
2449
+
2450
+ ### Version 4.0.1
2451
+
2452
+ - Added `db` and `getModel<T>()` accessors to `Application` class, delegating to `MongoDatabasePlugin` when registered
2453
+ - Added comprehensive tests for the new database accessors
2454
+
2455
+ ### Version 4.0.0
2456
+
2457
+ **Plugin-Based Database Architecture**
2458
+
2459
+ - **BREAKING**: Extracted MongoDB/Mongoose logic from `Application` into `MongoDatabasePlugin`
2460
+ - **NEW**: `BaseApplication` — database-agnostic base class that delegates storage to `IDatabase`
2461
+ - **NEW**: `IDatabasePlugin` interface for pluggable database backends
2462
+ - **NEW**: `MongoDatabasePlugin` — Mongoose-specific plugin handling connection, models, schema maps, and dev database
2463
+ - **NEW**: `createNoOpDatabase()` utility for applications that don't need a database
2464
+ - Renamed `ApplicationBase` → `BaseApplication` (file: `application-base.ts` → `base-application.ts`)
2465
+ - Removed `MongoApplicationBase` (functionality absorbed by `MongoDatabasePlugin`)
2466
+ - Removed stale `.js`/`.js.map`/`.d.ts.map` artifacts from `interfaces/`
2467
+ - Updated `ApplicationBuilder` to register `MongoDatabasePlugin` automatically
2468
+ - Added plugin manager integration tests and property-based tests
2469
+ - Added stale-reference detection tests
2470
+ - Added no-op database tests
2471
+
2472
+ ### Version 3.18.3
2473
+
2474
+ - Added integration tests: constants propagation, direct-login E2E, direct-login HTTP
2475
+
2476
+ ### Version 3.18.2
2477
+
2478
+ - Auto-wire `MongoAuthenticationProvider` during `MongoApplicationBase.start()` when no auth provider is set
2479
+
2480
+ ### Version 3.18.1
2481
+
2482
+ - Dependency updates (branded-interface, ecies-lib, i18n-lib, node-ecies-lib, suite-core-lib)
2483
+
2484
+ ### Version 3.18.0
2485
+
2486
+ **MongoApplicationBase Extraction**
2487
+
2488
+ - **NEW**: `MongoApplicationBase` — extracted MongoDB/Mongoose-specific logic from `ApplicationBase` into a dedicated subclass
2489
+ - `ApplicationBase` is now database-agnostic, accepting an `IDatabase` instance
2490
+ - Added `DISABLE_MONGO` environment variable support for non-Mongo deployments
2491
+ - Updated all tests to work with the new class hierarchy
2492
+
2493
+ ### Version 3.17.0
2494
+
2495
+ - Services (`BackupCodeService`, `JwtService`, `RoleService`) now accept `IApplication` instead of `IMongoApplication`, enabling use with non-Mongo backends
2496
+
2497
+ ### Version 3.16.0
2498
+
2499
+ **Authentication Provider Abstraction**
2500
+
2501
+ - **NEW**: `IAuthenticationProvider` interface — storage-agnostic authentication abstraction for user lookup, role fetching, and credential verification
2502
+ - **NEW**: `MongoAuthenticationProvider` — Mongoose-backed implementation
2503
+ - Refactored `authenticate-token` and `authenticate-crypto` middlewares to use `IAuthenticationProvider` instead of direct Mongoose calls
2504
+ - Added `authProvider` property to `IApplication`
2505
+ - Updated `BaseController` to pass auth provider to middlewares
2506
+
2507
+ ### Version 3.15.0
2508
+
2509
+ **Database-Agnostic Service Layer**
2510
+
2511
+ - **NEW**: `IMongoApplication` interface — separates Mongoose-specific capabilities (`db`, `getModel`) from the base `IApplication`
2512
+ - **NEW**: `MongoBaseService` — Mongoose-specific service base class
2513
+ - `BaseService.withTransaction()` now supports both Mongoose and `IDatabase.withTransaction()` paths, with fallback to no-transaction execution
2514
+ - Refactored `Environment` to separate Mongo config from base config
2515
+ - Updated all controllers and services to use appropriate application interface
2516
+
2517
+ ### Version 3.14.5
2518
+
2519
+ - Added `branded-primitive` and `branded-interface` to `CollectionSchemaFieldType`
2520
+ - Added `ref` field to `FieldSchema` for branded type resolution
2521
+ - Added branded type tests for document-types
2522
+
2523
+ ### Version 3.14.4
2524
+
2525
+ **Branded API Responses**
2526
+
2527
+ - **NEW**: `branded-responses/` module with branded API response types using `@digitaldefiance/branded-interface`
2528
+ - Branded wrappers for all API response interfaces (`BrandedApiLoginResponse`, `BrandedApiTokenResponse`, etc.)
2529
+ - Response validators and serializers for runtime type checking
2530
+ - Extracted `ILetsEncryptConfig` into its own interface file
2531
+ - Added `@digitaldefiance/branded-interface` dependency
2532
+ - Comprehensive property-based tests for all branded responses
2533
+
2534
+ ### Version 3.14.3
2535
+
2536
+ - Dependency updates and Greenlock test fixes
2537
+
2538
+ ### Version 3.14.2
2539
+
2540
+ - `IConstants` now extends `II18nConstants` from `@digitaldefiance/i18n-lib` (provides index signature for i18n template resolution)
2541
+ - Dependency updates (ecies-lib, i18n-lib, node-ecies-lib, suite-core-lib)
2542
+
2543
+ ### Version 3.14.1
2544
+
2545
+ - Added property-based tests for no-brightchain-imports and type-identity
2546
+ - Dependency updates
2547
+
2548
+ ### Version 3.13.1
2549
+
2550
+ **Storage-Agnostic Interfaces**
2551
+
2552
+ - **NEW**: `interfaces/storage/` module with database-agnostic abstractions:
2553
+ - `IClientSession` — transaction support interface
2554
+ - `ICollection<T>` — full CRUD, query, index, aggregation, and schema validation interface
2555
+ - `IDatabase` — database lifecycle and collection access interface
2556
+ - `IDatabaseLifecycleHooks` — hooks for dev store provisioning and initialization
2557
+ - `DocumentTypes` — comprehensive type definitions for filters, queries, indexes, aggregation, etc.
2558
+ - Updated `IFailableResult` with additional utility types
2559
+
2560
+ ### Version 3.13.0
2561
+
2562
+ **IDocumentStore & Application Refactor**
2563
+
2564
+ - **NEW**: `IDocumentStore` interface — storage-agnostic interface for database operations (connect, disconnect, getModel, schemaMap)
2565
+ - **NEW**: `MongooseDocumentStore` — Mongoose implementation of `IDocumentStore`
2566
+ - **NEW**: `MongooseDatabase`, `MongooseCollection`, `MongooseSessionAdapter` — Mongoose adapters for the storage interfaces
2567
+ - **NEW**: `defaultMongoUriValidator` utility for MongoDB URI validation
2568
+ - Refactored `ApplicationBase` to use `IDocumentStore` instead of direct Mongoose calls
2569
+ - Simplified `Application` class by delegating database operations to the document store
2570
+ - Added comprehensive tests for Mongoose adapters, application lifecycle, and backward compatibility
2571
+
2572
+ ### Version 3.12.16
2573
+
2574
+ - Dependency updates (ecies-lib, i18n-lib, suite-core-lib)
2575
+
2576
+ ### Version 3.12.15
2577
+
2578
+ **Let's Encrypt / Automated TLS Support**
2579
+
2580
+ - **NEW**: `GreenlockManager` — automated TLS certificate management via Let's Encrypt using `greenlock-express`
2581
+ - Added Let's Encrypt environment variables (`LETS_ENCRYPT_ENABLED`, `LETS_ENCRYPT_EMAIL`, `LETS_ENCRYPT_HOSTNAMES`, `LETS_ENCRYPT_STAGING`, `LETS_ENCRYPT_CONFIG_DIR`)
2582
+ - Application automatically obtains/renews certificates, serves HTTPS on port 443, and redirects HTTP from port 80
2583
+ - Mutual exclusivity with dev-certificate HTTPS mode
2584
+ - Comprehensive tests for Greenlock manager and Let's Encrypt configuration
2585
+ - Updated README with full Let's Encrypt documentation
2586
+
2587
+ ### Version 3.12.13
2588
+
2589
+ **UPnP Support**
2590
+
2591
+ - **NEW**: UPnP plugin (`src/plugins/upnp.ts`) for automatic port forwarding
2592
+ - **NEW**: `UPnPService` — NAT-PMP/UPnP port mapping service
2593
+ - **NEW**: `UPnPManager` — lifecycle management for UPnP mappings
2594
+ - **NEW**: `UPnPConfigService` — configuration and validation
2595
+ - **NEW**: UPnP network interfaces (`IUPnPService`, UPnP types)
2596
+ - Added UPnP architecture documentation, configuration guide, and manual testing guide
2597
+ - Comprehensive unit and property-based tests for all UPnP components
2598
+
2599
+ ### Version 3.12.12
2600
+
2601
+ - Updated `@digitaldefiance/express-suite-test-utils` to v1.1.1
2602
+
2603
+ ### Version 3.12.11
2604
+
2605
+ - Dependency updates: ecies-lib 4.17.10 → 4.18.0, i18n-lib 4.4.0 → 4.5.0, node-ecies-lib 4.17.10 → 4.18.0
2606
+
2607
+ ### Version 3.12.10
2608
+
2609
+ - Dependency updates (ecies-lib, node-ecies-lib, suite-core-lib)
2610
+
2611
+ ### Version 3.12.5
2612
+
2613
+ - Dependency updates: ecies-lib 4.17.2 → 4.17.4, i18n-lib 4.3.2 → 4.4.0, node-ecies-lib 4.17.2 → 4.17.5, reed-solomon-erasure.wasm ^1.0.1 → ^1.0.2
2614
+
2615
+ ### Version 3.12.2
2616
+
2617
+ **OpenAPI Response Type Cleanup**
2618
+
2619
+ - `OpenAPIResponseDef.schema` now accepts `string | Record<string, unknown>` (was `string` only), supporting inline schema objects
2620
+ - Removed duplicate `OpenAPIResponse` interface from builder (consolidated into `OpenAPIResponseDef`)
2621
+ - Renamed `OpenAPIResponse` in controller to `OpenAPIEndpointResponse` to avoid naming conflicts
2622
+ - Cleaned up re-exports in `openapi/index.ts`
2623
+
2624
+ ### Version 3.12.1
2625
+
2626
+ - Dependency updates: ecies-lib 4.16.30 → 4.17.2, i18n-lib 4.3.0 → 4.3.2, node-ecies-lib 4.16.30 → 4.17.2, suite-core-lib 3.10.31 → 3.12.1
2627
+
2403
2628
  ### Version 3.12.0
2404
2629
 
2405
2630
  **Comprehensive Decorator API for Express Controllers**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/node-express-suite",
3
- "version": "4.2.3",
3
+ "version": "4.19.12",
4
4
  "homepage": "https://github.com/Digital-Defiance/node-express-suite",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,12 +39,12 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@digitaldefiance/branded-interface": "^0.0.5",
42
- "@digitaldefiance/ecies-lib": "4.19.6",
42
+ "@digitaldefiance/ecies-lib": "4.19.12",
43
43
  "@digitaldefiance/i18n-lib": "4.6.4",
44
44
  "@digitaldefiance/mongoose-types": "8.20.9",
45
- "@digitaldefiance/node-ecies-lib": "4.19.7",
45
+ "@digitaldefiance/node-ecies-lib": "4.19.12",
46
46
  "@digitaldefiance/reed-solomon-erasure.wasm": "^1.0.2",
47
- "@digitaldefiance/suite-core-lib": "3.13.8",
47
+ "@digitaldefiance/suite-core-lib": "4.19.12",
48
48
  "@noble/curves": "^1.9.0",
49
49
  "@noble/hashes": "^1.8.0",
50
50
  "argon2": "^0.40.1",