@digitaldefiance/express-suite-starter 4.25.4 → 4.25.6
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/package.json +1 -1
- package/scaffolding/api-brightstack/.env.example.mustache +1 -0
- package/scaffolding/api-lib-brightstack/src/lib/application.ts +1 -11
- package/scaffolding/api-lib-mern/src/lib/application.ts +11 -11
- package/scaffolding/api-mern/.env.example.mustache +1 -0
- package/scaffolding/react/src/app/menus/extraMenu.tsx +16 -2
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ API_DIST_DIR=/workspaces/{{workspaceName}}/dist/{{prefix}}-api
|
|
|
22
22
|
REACT_DIST_DIR=/workspaces/{{workspaceName}}/dist/{{prefix}}-react
|
|
23
23
|
DEBUG=true
|
|
24
24
|
DETAILED_DEBUG=true
|
|
25
|
+
EMAIL_SERVICE=fake
|
|
25
26
|
EMAIL_DOMAIN=example.com
|
|
26
27
|
# Admin and test credentials
|
|
27
28
|
ADMIN_ID=""
|
|
@@ -3,12 +3,7 @@ import {
|
|
|
3
3
|
BrightDbDatabasePlugin,
|
|
4
4
|
BrightDbApiRouter,
|
|
5
5
|
} from '@brightchain/node-express-suite';
|
|
6
|
-
import {
|
|
7
|
-
BaseRouter,
|
|
8
|
-
DummyEmailService,
|
|
9
|
-
ServiceKeys,
|
|
10
|
-
IApplication,
|
|
11
|
-
} from '@digitaldefiance/node-express-suite';
|
|
6
|
+
import { BaseRouter, IApplication } from '@digitaldefiance/node-express-suite';
|
|
12
7
|
import { Environment } from './environment';
|
|
13
8
|
import { IConstants } from './interfaces/constants';
|
|
14
9
|
import { Constants } from './constants';
|
|
@@ -77,10 +72,5 @@ export class App<
|
|
|
77
72
|
// Register the BrightDbDatabasePlugin
|
|
78
73
|
this.brightDbPlugin = new BrightDbDatabasePlugin<TID>(environment);
|
|
79
74
|
this.useDatabasePlugin(this.brightDbPlugin);
|
|
80
|
-
|
|
81
|
-
// Register the DummyEmailService - users should replace this with their own email service
|
|
82
|
-
const emailService = new DummyEmailService<TID>(this);
|
|
83
|
-
// const emailService = new EmailService(this);
|
|
84
|
-
this.services.register(ServiceKeys.EMAIL, () => emailService);
|
|
85
75
|
}
|
|
86
76
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Application,
|
|
3
|
-
DummyEmailService,
|
|
4
|
-
ServiceKeys,
|
|
5
3
|
BaseRouter,
|
|
6
4
|
IApplication,
|
|
7
5
|
} from '@digitaldefiance/node-express-suite';
|
|
@@ -57,9 +55,15 @@ import { ModelDocMap } from './shared-types';
|
|
|
57
55
|
* ```
|
|
58
56
|
*/
|
|
59
57
|
export class App<
|
|
60
|
-
TInitResults extends IServerInitResult<Types.ObjectId> =
|
|
58
|
+
TInitResults extends IServerInitResult<Types.ObjectId> =
|
|
59
|
+
IServerInitResult<Types.ObjectId>,
|
|
61
60
|
TConstants extends IConstants = IConstants,
|
|
62
|
-
> extends Application<
|
|
61
|
+
> extends Application<
|
|
62
|
+
Types.ObjectId,
|
|
63
|
+
Environment<Types.ObjectId>,
|
|
64
|
+
TConstants,
|
|
65
|
+
AppRouter
|
|
66
|
+
> {
|
|
63
67
|
/**
|
|
64
68
|
* The Mongo database plugin for accessing Mongoose-specific features.
|
|
65
69
|
*/
|
|
@@ -89,14 +93,15 @@ export class App<
|
|
|
89
93
|
if (!mongoApp) {
|
|
90
94
|
throw new Error(
|
|
91
95
|
'MongoDatabasePlugin has not been initialized yet. ' +
|
|
92
|
-
|
|
96
|
+
'Ensure useDatabasePlugin() is called before start().',
|
|
93
97
|
);
|
|
94
98
|
}
|
|
95
99
|
return new LibraryApiRouter(mongoApp);
|
|
96
100
|
},
|
|
97
101
|
undefined, // Default CSP config
|
|
98
102
|
constants,
|
|
99
|
-
(apiRouter: BaseRouter<Types.ObjectId>): AppRouter =>
|
|
103
|
+
(apiRouter: BaseRouter<Types.ObjectId>): AppRouter =>
|
|
104
|
+
new AppRouter(apiRouter),
|
|
100
105
|
initMiddleware,
|
|
101
106
|
);
|
|
102
107
|
|
|
@@ -109,10 +114,5 @@ export class App<
|
|
|
109
114
|
constants,
|
|
110
115
|
});
|
|
111
116
|
this.useDatabasePlugin(this.mongoPlugin);
|
|
112
|
-
|
|
113
|
-
// Register the DummyEmailService - users should replace this with their own email service
|
|
114
|
-
const emailService = new DummyEmailService<Types.ObjectId>(this);
|
|
115
|
-
// const emailService = new EmailService(this);
|
|
116
|
-
this.services.register(ServiceKeys.EMAIL, () => emailService);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -16,6 +16,7 @@ API_DIST_DIR=/workspaces/{{workspaceName}}/dist/{{prefix}}-api
|
|
|
16
16
|
REACT_DIST_DIR=/workspaces/{{workspaceName}}/dist/{{prefix}}-react
|
|
17
17
|
DEBUG=true
|
|
18
18
|
DETAILED_DEBUG=true
|
|
19
|
+
EMAIL_SERVICE=fake
|
|
19
20
|
EMAIL_DOMAIN=example.com
|
|
20
21
|
# Admin and test credentials
|
|
21
22
|
ADMIN_ID=""
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
createMenuType,
|
|
3
|
+
IMenuConfig,
|
|
4
|
+
MenuTypes,
|
|
5
|
+
} from '@digitaldefiance/express-suite-react-components';
|
|
6
|
+
import { Dashboard, Email } from '@mui/icons-material';
|
|
3
7
|
|
|
4
8
|
const ExtraMenu = createMenuType('ExtraMenu');
|
|
5
9
|
|
|
@@ -16,5 +20,15 @@ export const extraMenuConfig: IMenuConfig = {
|
|
|
16
20
|
includeOnMenus: [ExtraMenu],
|
|
17
21
|
index: 0,
|
|
18
22
|
},
|
|
23
|
+
{
|
|
24
|
+
id: 'admin-emails',
|
|
25
|
+
label: 'Admin Emails',
|
|
26
|
+
icon: <Email />,
|
|
27
|
+
link: '/admin/emails',
|
|
28
|
+
requiresAuth: true,
|
|
29
|
+
requiresAdmin: true,
|
|
30
|
+
includeOnMenus: [ExtraMenu, MenuTypes.SideMenu],
|
|
31
|
+
index: 1,
|
|
32
|
+
},
|
|
19
33
|
],
|
|
20
34
|
};
|