@digitaldefiance/node-express-suite 2.1.35 → 2.1.40
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/README.md +32 -0
- package/package.json +16 -6
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +1 -1
- package/src/index.js +0 -2
- package/src/index.js.map +1 -1
- package/src/testing.d.ts +3 -0
- package/src/testing.d.ts.map +1 -0
- package/src/testing.js +7 -0
- package/src/testing.js.map +1 -0
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ An opinionated, secure, extensible Node.js/Express service framework built on Di
|
|
|
9
9
|
|
|
10
10
|
It is an 'out of the box' solution with a specific recipe (Mongo, Express, React, Node, (MERN) stack) with ejs templating, JWT authentication, role-based access control, custom multi-language support via @digitaldefiance/i18n-lib, and a dynamic model registry system. You might either find it limiting or freeing, depending on your use case. It includes mnemonic authentication, ECIES encryption/decryption, PBKDF2 key derivation, email token workflows, and more.
|
|
11
11
|
|
|
12
|
+
Part of [Express Suite](https://github.com/Digital-Defiance/express-suite)
|
|
13
|
+
|
|
12
14
|
## What's New in v2.1
|
|
13
15
|
|
|
14
16
|
✨ **Quality & Stability Release** - All dependencies upgraded, 604 tests passing, improved coverage and type safety throughout.
|
|
@@ -565,6 +567,32 @@ npm test -- role.spec.ts
|
|
|
565
567
|
npm test -- --coverage
|
|
566
568
|
```
|
|
567
569
|
|
|
570
|
+
### Test Utilities
|
|
571
|
+
|
|
572
|
+
Test helpers and mocks are available via a separate entry point:
|
|
573
|
+
|
|
574
|
+
```typescript
|
|
575
|
+
// Import test utilities
|
|
576
|
+
import {
|
|
577
|
+
mockFunctions,
|
|
578
|
+
setupTestEnv,
|
|
579
|
+
// ... other test helpers
|
|
580
|
+
} from '@digitaldefiance/node-express-suite/testing';
|
|
581
|
+
|
|
582
|
+
// Use in your tests
|
|
583
|
+
beforeAll(async () => {
|
|
584
|
+
await setupTestEnv();
|
|
585
|
+
});
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
**Note:** Test utilities require `@faker-js/faker` as a peer dependency. Install it in your dev dependencies:
|
|
589
|
+
|
|
590
|
+
```bash
|
|
591
|
+
npm install -D @faker-js/faker
|
|
592
|
+
# or
|
|
593
|
+
yarn add -D @faker-js/faker
|
|
594
|
+
```
|
|
595
|
+
|
|
568
596
|
### Test Coverage (v2.1)
|
|
569
597
|
|
|
570
598
|
- **604 tests** passing (100% success rate)
|
|
@@ -1083,6 +1111,10 @@ The following v1.x patterns still work in v2.0:
|
|
|
1083
1111
|
|
|
1084
1112
|
## ChangeLog
|
|
1085
1113
|
|
|
1114
|
+
### Version 2.1.40
|
|
1115
|
+
|
|
1116
|
+
- Alignment
|
|
1117
|
+
|
|
1086
1118
|
### Version 2.1.35
|
|
1087
1119
|
|
|
1088
1120
|
- Upgrade i18n/bring config through
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/node-express-suite",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.40",
|
|
4
4
|
"description": "Generic express application and routing library with decorator support",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./src/index.d.ts",
|
|
10
|
+
"default": "./src/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./testing": {
|
|
13
|
+
"types": "./src/testing.d.ts",
|
|
14
|
+
"default": "./src/testing.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
7
17
|
"scripts": {
|
|
8
18
|
"build": "npx nx build digitaldefiance-node-express-suite",
|
|
9
19
|
"build:stream": "npx nx build --outputStyle=stream digitaldefiance-node-express-suite",
|
|
@@ -22,10 +32,10 @@
|
|
|
22
32
|
"publish:public": "npm publish --access public"
|
|
23
33
|
},
|
|
24
34
|
"dependencies": {
|
|
25
|
-
"@digitaldefiance/ecies-lib": "2.1.
|
|
26
|
-
"@digitaldefiance/i18n-lib": "2.1.
|
|
27
|
-
"@digitaldefiance/node-ecies-lib": "2.1.
|
|
28
|
-
"@digitaldefiance/suite-core-lib": "2.1.
|
|
35
|
+
"@digitaldefiance/ecies-lib": "2.1.40",
|
|
36
|
+
"@digitaldefiance/i18n-lib": "2.1.40",
|
|
37
|
+
"@digitaldefiance/node-ecies-lib": "2.1.40",
|
|
38
|
+
"@digitaldefiance/suite-core-lib": "2.1.40",
|
|
29
39
|
"@subspace/reed-solomon-erasure.wasm": "^0.2.5",
|
|
30
40
|
"argon2": "^0.40.1",
|
|
31
41
|
"cors": "^2.8.5",
|
|
@@ -43,7 +53,7 @@
|
|
|
43
53
|
"zod": "^3.24.0"
|
|
44
54
|
},
|
|
45
55
|
"devDependencies": {
|
|
46
|
-
"@digitaldefiance/express-suite-test-utils": "1.0.
|
|
56
|
+
"@digitaldefiance/express-suite-test-utils": "1.0.7"
|
|
47
57
|
},
|
|
48
58
|
"files": [
|
|
49
59
|
"src",
|
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
export * from './__tests__';
|
|
3
2
|
export * from './application';
|
|
4
3
|
export * from './application-base';
|
|
5
4
|
export * from './application-concrete';
|
|
@@ -36,5 +35,4 @@ export * from './types';
|
|
|
36
35
|
export { withTransaction } from './utils';
|
|
37
36
|
export type { TransactionOptions as UtilsTransactionOptions } from './utils';
|
|
38
37
|
export * from './validation';
|
|
39
|
-
export * from './__tests__/helpers/setup-test-env';
|
|
40
38
|
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACnE,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAC7E,cAAc,cAAc,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withTransaction = exports.RouteBuilder = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
require("reflect-metadata");
|
|
6
|
-
tslib_1.__exportStar(require("./__tests__"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./application"), exports);
|
|
8
7
|
tslib_1.__exportStar(require("./application-base"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./application-concrete"), exports);
|
|
@@ -40,5 +39,4 @@ tslib_1.__exportStar(require("./types"), exports);
|
|
|
40
39
|
var utils_1 = require("./utils");
|
|
41
40
|
Object.defineProperty(exports, "withTransaction", { enumerable: true, get: function () { return utils_1.withTransaction; } });
|
|
42
41
|
tslib_1.__exportStar(require("./validation"), exports);
|
|
43
|
-
tslib_1.__exportStar(require("./__tests__/helpers/setup-test-env"), exports);
|
|
44
42
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/index.ts"],"names":[],"mappings":";;;;AAAA,4BAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/index.ts"],"names":[],"mappings":";;;;AAAA,4BAA0B;AAE1B,wDAA8B;AAC9B,6DAAmC;AACnC,iEAAuC;AACvC,wDAA8B;AAC9B,qDAA2B;AAC3B,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,wDAA8B;AAC9B,sDAA4B;AAC5B,uDAA6B;AAC7B,qDAA2B;AAC3B,sDAA4B;AAC5B,yDAA+B;AAC/B,wDAA8B;AAC9B,mDAAyB;AACzB,yDAA+B;AAC/B,yDAA+B;AAC/B,uDAA6B;AAC7B,wDAA8B;AAC9B,2DAAiC;AACjC,mDAAyB;AACzB,qDAA2B;AAC3B,oDAA0B;AAC1B,qDAA2B;AAC3B,sDAA4B;AAC5B,oDAA0B;AAC1B,qCAAyC;AAAhC,uGAAA,YAAY,OAAA;AAErB,oDAA0B;AAC1B,qDAA2B;AAC3B,yDAA+B;AAC/B,kDAAwB;AACxB,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AAExB,uDAA6B"}
|
package/src/testing.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/testing.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,oCAAoC,CAAC"}
|
package/src/testing.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
// Test utilities entry point - import from '@digitaldefiance/node-express-suite/testing'
|
|
5
|
+
tslib_1.__exportStar(require("./__tests__"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./__tests__/helpers/setup-test-env"), exports);
|
|
7
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/testing.ts"],"names":[],"mappings":";;;AAAA,yFAAyF;AACzF,sDAA4B;AAC5B,6EAAmD"}
|