@futdevpro/nts-dynamo 1.15.3 → 1.15.5
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/.cursor/rules/__main.mdc +3 -1
- package/.cursor/rules/default-command.mdc +324 -88
- package/_specifications/BACKLOG.md +15 -0
- package/_specifications/TODO.md +15 -0
- package/build/_modules/ai/_models/ai-test-generation-result.interface.d.ts +17 -0
- package/build/_modules/ai/_models/ai-test-generation-result.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/ai-test-generation-result.interface.js +3 -0
- package/build/_modules/ai/_models/ai-test-generation-result.interface.js.map +1 -0
- package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.d.ts +36 -0
- package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.d.ts.map +1 -0
- package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.js +118 -0
- package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.js.map +1 -0
- package/build/_modules/ai/_modules/anthropic/index.d.ts +3 -0
- package/build/_modules/ai/_modules/anthropic/index.d.ts.map +1 -0
- package/build/_modules/ai/_modules/anthropic/index.js +8 -0
- package/build/_modules/ai/_modules/anthropic/index.js.map +1 -0
- package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.d.ts +35 -0
- package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.d.ts.map +1 -0
- package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.js +129 -0
- package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.js.map +1 -0
- package/build/_modules/ai/_modules/fdp-ai/index.d.ts +3 -0
- package/build/_modules/ai/_modules/fdp-ai/index.d.ts.map +1 -0
- package/build/_modules/ai/_modules/fdp-ai/index.js +8 -0
- package/build/_modules/ai/_modules/fdp-ai/index.js.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.d.ts +40 -0
- package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.d.ts.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.js +111 -0
- package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.js.map +1 -0
- package/build/_modules/ai/_modules/open-ai/index.d.ts +1 -0
- package/build/_modules/ai/_modules/open-ai/index.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/index.js +1 -0
- package/build/_modules/ai/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/ai/_services/ai-user-key.service-base.d.ts +45 -0
- package/build/_modules/ai/_services/ai-user-key.service-base.d.ts.map +1 -0
- package/build/_modules/ai/_services/ai-user-key.service-base.js +15 -0
- package/build/_modules/ai/_services/ai-user-key.service-base.js.map +1 -0
- package/build/_modules/ai/index.d.ts +2 -0
- package/build/_modules/ai/index.d.ts.map +1 -1
- package/build/_modules/ai/index.js +2 -0
- package/build/_modules/ai/index.js.map +1 -1
- package/build/_modules/socket/app-extended.server.js +1 -1
- package/build/_modules/socket/app-extended.server.js.map +1 -1
- package/build/_services/base/data.service.d.ts +1 -1
- package/build/_services/base/data.service.js +1 -1
- package/build/_services/base/db.service.d.ts +1 -1
- package/build/_services/base/db.service.js +1 -1
- package/build/_services/core/auth.service.d.ts +2 -2
- package/build/_services/core/auth.service.js +1 -1
- package/build/_services/core/email.service.js +1 -1
- package/build/_services/core/email.service.js.map +1 -1
- package/build/_services/core/global.service.d.ts +1 -1
- package/build/_services/core/global.service.js +2 -2
- package/build/_services/core/global.service.js.map +1 -1
- package/build/_services/server/app.server.d.ts.map +1 -1
- package/build/_services/server/app.server.js +11 -1
- package/build/_services/server/app.server.js.map +1 -1
- package/package.json +17 -4
- package/src/_modules/ai/_models/ai-test-generation-result.interface.ts +16 -0
- package/src/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.ts +138 -0
- package/src/_modules/ai/_modules/anthropic/index.ts +5 -0
- package/src/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.ts +189 -0
- package/src/_modules/ai/_modules/fdp-ai/index.ts +5 -0
- package/src/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.ts +157 -0
- package/src/_modules/ai/_modules/open-ai/index.ts +1 -0
- package/src/_modules/ai/_services/ai-user-key.service-base.ts +59 -0
- package/src/_modules/ai/index.ts +2 -0
- package/src/_modules/socket/app-extended.server.ts +1 -1
- package/src/_services/base/data.service.ts +1 -1
- package/src/_services/base/db.service.ts +1 -1
- package/src/_services/core/auth.service.ts +2 -2
- package/src/_services/core/email.service.ts +1 -1
- package/src/_services/core/global.service.ts +2 -2
- package/src/_services/route/controller.service.ts +1 -1
- package/src/_services/server/app.server.ts +17 -1
|
@@ -12,7 +12,7 @@ import { DyNTS_global_settings } from '../../_collections/global-settings.const'
|
|
|
12
12
|
* You should use singleton instance getting function by implementing a
|
|
13
13
|
* static getInstance() function
|
|
14
14
|
* @example
|
|
15
|
-
* export class AuthService extends
|
|
15
|
+
* export class AuthService extends DyNTS_AuthService {
|
|
16
16
|
*
|
|
17
17
|
* static getInstance(): AuthService {
|
|
18
18
|
* return AuthService.getSingletonInstance();
|
|
@@ -150,7 +150,7 @@ export abstract class DyNTS_AuthService extends DyNTS_SingletonService {
|
|
|
150
150
|
abstract authenticate_tokenPerm_accUsageData: (req: Request, res: Response) => Promise<void>;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* The
|
|
153
|
+
* The DynamoNTS System is using this to get issuer, that will be set on DBServices
|
|
154
154
|
* Don't throw error in this function, since it will be used in every request
|
|
155
155
|
* @param req
|
|
156
156
|
*
|
|
@@ -664,7 +664,7 @@ export class DyNTS_EmailService /* extends DyNTS_SingletonService */ {
|
|
|
664
664
|
while (propertyOpenTagIndex >= 0) {
|
|
665
665
|
if (propertyCloseTagIndex === -1) {
|
|
666
666
|
DyFM_Log.error(
|
|
667
|
-
`\
|
|
667
|
+
`\nDyNTS_EmailService ERROR, missing closing tag from email template! ` +
|
|
668
668
|
`(${propertyOpenTagIndex} -)`,
|
|
669
669
|
propertyKeys
|
|
670
670
|
);
|
|
@@ -30,7 +30,7 @@ import { DyNTS_SingletonService } from '../base/singleton.service';
|
|
|
30
30
|
import { DyNTS_getArchivedDBName } from '../../_collections/archive.util';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* This is the main Global/Core Service Collection used by
|
|
33
|
+
* This is the main Global/Core Service Collection used by DynamoNTS,
|
|
34
34
|
* you also can use this to access main services as
|
|
35
35
|
* dbServices, emailServices, or authService
|
|
36
36
|
*/
|
|
@@ -373,7 +373,7 @@ export class DyNTS_GlobalService extends DyNTS_SingletonService {
|
|
|
373
373
|
throw new Error(
|
|
374
374
|
`\n Unique Email Service Collection missing!` +
|
|
375
375
|
`\n Please create a Unique Email Service Collection extending ` +
|
|
376
|
-
`
|
|
376
|
+
`DyNTS_EmailServiceCollection, ` +
|
|
377
377
|
'\n (If you set the globalErrorHandler, ' +
|
|
378
378
|
'please check if it is using the same node_modules as the app)' +
|
|
379
379
|
`\n and Setup with DyNTS_GlobalServiceC.setServices(...)\n` +
|
|
@@ -104,7 +104,7 @@ export abstract class DyNTS_Controller extends DyNTS_SingletonService {
|
|
|
104
104
|
this.setupEndpoints();
|
|
105
105
|
} catch (error) {
|
|
106
106
|
throw new DyFM_Error({
|
|
107
|
-
message: '
|
|
107
|
+
message: 'DynamoNTSController setup failed. Please check the setupEndpoints() method.',
|
|
108
108
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-COS-000',
|
|
109
109
|
issuerService: this?.constructor?.name,
|
|
110
110
|
error: error,
|
|
@@ -1256,8 +1256,17 @@ export abstract class DyNTS_App extends DyNTS_SingletonService {
|
|
|
1256
1256
|
private async mountSecureRoutes (): Promise<void> {
|
|
1257
1257
|
try {
|
|
1258
1258
|
if (this.fnLogs && this.deepLog) DyFM_Log.log('\nfn:. mountSecureRoutes');
|
|
1259
|
+
|
|
1260
|
+
if (!this.secureExpress) {
|
|
1261
|
+
throw new Error(
|
|
1262
|
+
'secureExpress was not initialized. ' +
|
|
1263
|
+
'Secure routes require getCertificationSettings and httpsPort, and cert files must exist.' +
|
|
1264
|
+
'\n\nYou need to set security to secure or both in any route and set httpsPort in getPortSettings.' +
|
|
1265
|
+
'\n\nYou need to set cert files in getCertificationSettings.'
|
|
1266
|
+
);
|
|
1267
|
+
}
|
|
1259
1268
|
|
|
1260
|
-
this.
|
|
1269
|
+
this.secureExpress.use(
|
|
1261
1270
|
(error, req, res, next): Promise<void> => this.expressErrorHandling(error, req, res, next)
|
|
1262
1271
|
);
|
|
1263
1272
|
|
|
@@ -1310,6 +1319,13 @@ export abstract class DyNTS_App extends DyNTS_SingletonService {
|
|
|
1310
1319
|
private async mountOpenRoutes(): Promise<void> {
|
|
1311
1320
|
try {
|
|
1312
1321
|
if (this.fnLogs && this.deepLog) DyFM_Log.log('\nfn:. mountOpenRoutes');
|
|
1322
|
+
|
|
1323
|
+
if (!this.openExpress) {
|
|
1324
|
+
throw new Error(
|
|
1325
|
+
'openExpress was not initialized. Open routes require getOpenExpress and httpPort.' +
|
|
1326
|
+
'\n\nYou need to set security to open or both in any route and set httpPort in getPortSettings.'
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1313
1329
|
|
|
1314
1330
|
this.openExpress.use(
|
|
1315
1331
|
(error, req, res, next): Promise<void> => this.expressErrorHandling(error, req, res, next)
|