@futdevpro/nts-dynamo 1.11.35 → 1.11.37
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/.github/workflows/main.yml +189 -234
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +3 -1
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts.map +1 -1
- package/build/_modules/discord-assistant/_services/dias.service-base.js +4 -2
- package/build/_modules/discord-assistant/_services/dias.service-base.js.map +1 -1
- package/build/_modules/discord-assistant-voiced/index.js +15 -12
- package/build/_modules/discord-assistant-voiced/index.js.map +1 -1
- package/build/_modules/discord-bot/_collections/dibo-operations.util.js +3 -3
- package/build/_modules/discord-bot/_collections/dibo-operations.util.js.map +1 -1
- package/build/_modules/discord-bot/_services/dibo-io.control-service.js +3 -3
- package/build/_modules/discord-bot/_services/dibo-io.control-service.js.map +1 -1
- package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts.map +1 -1
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js +7 -3
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js.map +1 -1
- package/build/_modules/discord-bot/index.js +7 -6
- package/build/_modules/discord-bot/index.js.map +1 -1
- package/build/_modules/oauth2/index.js +7 -6
- package/build/_modules/oauth2/index.js.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +0 -15
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js +31 -16
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts +0 -139
- package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm.service-base.js +16 -16
- package/build/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
- package/build/_modules/open-ai/index.js +7 -6
- package/build/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/socket/index.js +15 -12
- package/build/_modules/socket/index.js.map +1 -1
- package/build/_services/base/data.service.d.ts.map +1 -1
- package/build/_services/base/data.service.js +3 -0
- package/build/_services/base/data.service.js.map +1 -1
- package/build/_services/core/api.service.d.ts.map +1 -1
- package/build/_services/core/api.service.js +1 -1
- package/build/_services/core/api.service.js.map +1 -1
- package/build/_services/route/routing-module.service.d.ts.map +1 -1
- package/build/_services/route/routing-module.service.js +2 -1
- package/build/_services/route/routing-module.service.js.map +1 -1
- package/package.json +6 -5
- package/src/_modules/discord-assistant/_services/dias.service-base.ts +8 -2
- package/src/_modules/discord-assistant-voiced/index.ts +2 -2
- package/src/_modules/discord-bot/_collections/dibo-operations.util.ts +3 -3
- package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +3 -3
- package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +16 -3
- package/src/_modules/discord-bot/index.ts +2 -2
- package/src/_modules/oauth2/index.ts +2 -2
- package/src/_modules/open-ai/_services/oai-llm-chat.service-base.ts +30 -16
- package/src/_modules/open-ai/_services/oai-llm.service-base.ts +16 -16
- package/src/_modules/open-ai/index.ts +2 -2
- package/src/_modules/socket/index.ts +2 -2
- package/src/_services/base/data.service.ts +6 -0
- package/src/_services/core/api.service.ts +5 -2
- package/src/_services/route/routing-module.service.ts +2 -1
- package/tsconfig.json +11 -11
- package/test.ts +0 -0
- package/test2.js +0 -1
- package/test2.ts +0 -0
|
@@ -50,7 +50,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
50
50
|
|
|
51
51
|
return answer.toUpperCase().includes(this.predefinedRequests.yesNo.upperCaseYes);
|
|
52
52
|
}
|
|
53
|
-
askYesNoQuestionInConversation: typeof this.yesNoQuestionInConversation = this.yesNoQuestionInConversation;
|
|
53
|
+
//askYesNoQuestionInConversation: typeof this.yesNoQuestionInConversation = this.yesNoQuestionInConversation;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Asks the AI to answer a simple question
|
|
@@ -72,7 +72,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
72
72
|
|
|
73
73
|
return await this.getQuestionAnswerInConversation(set);
|
|
74
74
|
}
|
|
75
|
-
askSimpleQuestionInConversation: typeof this.simpleQuestionInConversation = this.simpleQuestionInConversation;
|
|
75
|
+
//askSimpleQuestionInConversation: typeof this.simpleQuestionInConversation = this.simpleQuestionInConversation;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Asks the AI to answer a percentage question
|
|
@@ -107,7 +107,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
107
107
|
|
|
108
108
|
return +answer;
|
|
109
109
|
}
|
|
110
|
-
askPercentageQuestionInConversation: typeof this.percentageQuestionInConversation = this.percentageQuestionInConversation;
|
|
110
|
+
//askPercentageQuestionInConversation: typeof this.percentageQuestionInConversation = this.percentageQuestionInConversation;
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
@@ -146,7 +146,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
146
146
|
|
|
147
147
|
return null;
|
|
148
148
|
}
|
|
149
|
-
askSelectQuestionInConversation: typeof this.selectQuestionInConversation = this.selectQuestionInConversation;
|
|
149
|
+
//askSelectQuestionInConversation: typeof this.selectQuestionInConversation = this.selectQuestionInConversation;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Asks the AI to select one of the options from the list
|
|
@@ -179,7 +179,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
179
179
|
|
|
180
180
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
181
181
|
}
|
|
182
|
-
askRequestSelectInConversation: typeof this.requestSelectInConversation = this.requestSelectInConversation;
|
|
182
|
+
//askRequestSelectInConversation: typeof this.requestSelectInConversation = this.requestSelectInConversation;
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
185
|
* Asks the AI to select one or more of the options from the list
|
|
@@ -218,7 +218,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
218
218
|
|
|
219
219
|
return result;
|
|
220
220
|
}
|
|
221
|
-
askMultipleSelectQuestionWithOptionsInConversation: typeof this.multipleSelectQuestionWithOptionsInConversation = this.multipleSelectQuestionWithOptionsInConversation;
|
|
221
|
+
//askMultipleSelectQuestionWithOptionsInConversation: typeof this.multipleSelectQuestionWithOptionsInConversation = this.multipleSelectQuestionWithOptionsInConversation;
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* Asks the AI to select one or more of the options from the list
|
|
@@ -251,7 +251,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
251
251
|
|
|
252
252
|
return DyFM_Object.safeParseList<T[]>(answer);
|
|
253
253
|
}
|
|
254
|
-
askRequestMultipleSelectInConversation: typeof this.requestMultipleSelectInConversation = this.requestMultipleSelectInConversation;
|
|
254
|
+
//askRequestMultipleSelectInConversation: typeof this.requestMultipleSelectInConversation = this.requestMultipleSelectInConversation;
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
257
|
* Asks the AI to answer a question that must result a JSON object
|
|
@@ -281,7 +281,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
281
281
|
|
|
282
282
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
283
283
|
}
|
|
284
|
-
askJsonQuestionInConversation: typeof this.jsonQuestionInConversation = this.jsonQuestionInConversation;
|
|
284
|
+
//askJsonQuestionInConversation: typeof this.jsonQuestionInConversation = this.jsonQuestionInConversation;
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
287
|
* Asks the AI to answer a question that must result a JSON object with specific key descriptions
|
|
@@ -316,7 +316,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
316
316
|
|
|
317
317
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
318
318
|
}
|
|
319
|
-
askJsonQuestionWithKeysDescriptionInConversation: typeof this.jsonQuestionWithKeysDescriptionInConversation = this.jsonQuestionWithKeysDescriptionInConversation;
|
|
319
|
+
//askJsonQuestionWithKeysDescriptionInConversation: typeof this.jsonQuestionWithKeysDescriptionInConversation = this.jsonQuestionWithKeysDescriptionInConversation;
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
* Asks the AI to answer a question that must result a JSON object with specific keys
|
|
@@ -351,7 +351,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
351
351
|
|
|
352
352
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
353
353
|
}
|
|
354
|
-
askJsonQuestionWithExactKeysInConversation: typeof this.jsonQuestionWithExactKeysInConversation = this.jsonQuestionWithExactKeysInConversation;
|
|
354
|
+
//askJsonQuestionWithExactKeysInConversation: typeof this.jsonQuestionWithExactKeysInConversation = this.jsonQuestionWithExactKeysInConversation;
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
357
|
* Asks the AI to answer a question that must result a list of strings
|
|
@@ -381,7 +381,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
381
381
|
|
|
382
382
|
return DyFM_Object.safeParseList(answer);
|
|
383
383
|
}
|
|
384
|
-
askListQuestionInConversation: typeof this.listQuestionInConversation = this.listQuestionInConversation;
|
|
384
|
+
//askListQuestionInConversation: typeof this.listQuestionInConversation = this.listQuestionInConversation;
|
|
385
385
|
|
|
386
386
|
/**
|
|
387
387
|
* Asks the AI to answer a question
|
|
@@ -426,9 +426,9 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
/* getQuestionAnswerInConversation = this.getAnswerInConversation; */
|
|
429
|
-
getQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
|
|
430
|
-
askQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
|
|
431
|
-
getConversationAnswer: typeof this.getAnswerInConversation = this.getAnswerInConversation;
|
|
429
|
+
//getQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
|
|
430
|
+
//askQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
|
|
431
|
+
//getConversationAnswer: typeof this.getAnswerInConversation = this.getAnswerInConversation;
|
|
432
432
|
|
|
433
433
|
/**
|
|
434
434
|
* Asks the AI to answer a question using the whole conversation
|
|
@@ -497,7 +497,21 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
497
497
|
}
|
|
498
498
|
): Promise<string | ChatCompletion> {
|
|
499
499
|
try {
|
|
500
|
-
set.conversation.
|
|
500
|
+
if (set.conversation.find(message => message.role === DyNTS_OAI_GPT_Message_Role.system)) {
|
|
501
|
+
/* throw new DyFM_Error({
|
|
502
|
+
...this.getDefaultErrorSettings(
|
|
503
|
+
'resolveConversation',
|
|
504
|
+
new Error('System message found in conversation'),
|
|
505
|
+
set.issuer
|
|
506
|
+
),
|
|
507
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC1`,
|
|
508
|
+
}); */
|
|
509
|
+
DyFM_Log.error('System message found in conversation', {
|
|
510
|
+
conversation: set.conversation,
|
|
511
|
+
});
|
|
512
|
+
} else {
|
|
513
|
+
set.conversation.unshift(this.getDefaultSystemMessage(set.settings));
|
|
514
|
+
}
|
|
501
515
|
|
|
502
516
|
// conversation shortening
|
|
503
517
|
const shortenedConversation = this.shortenConversation(set);
|
|
@@ -529,7 +543,7 @@ export class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
|
529
543
|
});
|
|
530
544
|
}
|
|
531
545
|
}
|
|
532
|
-
resolveSimpleUserMessageInConversation: typeof this.resolveConversation = this.resolveConversation;
|
|
546
|
+
//resolveSimpleUserMessageInConversation: typeof this.resolveConversation = this.resolveConversation;
|
|
533
547
|
|
|
534
548
|
protected shortenConversation(
|
|
535
549
|
set: {
|
|
@@ -96,7 +96,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
96
96
|
return answer.toUpperCase().includes(this.predefinedRequests.yesNo.upperCaseYes);
|
|
97
97
|
}
|
|
98
98
|
/** the exact same as {@link askYesNoQuestion} */
|
|
99
|
-
yesNoQuestion = this.askYesNoQuestion;
|
|
99
|
+
//yesNoQuestion = this.askYesNoQuestion;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Asks the AI to answer a percentage question
|
|
@@ -129,7 +129,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
129
129
|
return +answer;
|
|
130
130
|
}
|
|
131
131
|
/** the exact same as {@link askPercentageQuestion} */
|
|
132
|
-
percentageQuestion = this.askPercentageQuestion;
|
|
132
|
+
//percentageQuestion = this.askPercentageQuestion;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Asks the AI to select one of the options from the list
|
|
@@ -165,7 +165,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
165
165
|
return null;
|
|
166
166
|
}
|
|
167
167
|
/** the exact same as {@link askSelectQuestion} */
|
|
168
|
-
selectQuestion = this.askSelectQuestion;
|
|
168
|
+
//selectQuestion = this.askSelectQuestion;
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
171
|
* Asks the AI to select one of the options from the list
|
|
@@ -196,7 +196,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
196
196
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
197
197
|
}
|
|
198
198
|
/** the exact same as {@link requestSelect} */
|
|
199
|
-
selectRequest = this.requestSelect;
|
|
199
|
+
//selectRequest = this.requestSelect;
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* Asks the AI to select one or more of the options from the list
|
|
@@ -235,7 +235,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
235
235
|
return result;
|
|
236
236
|
}
|
|
237
237
|
/** the exact same as {@link askMultipleSelectQuestionWithOptions} */
|
|
238
|
-
multipleSelectQuestion = this.askMultipleSelectQuestionWithOptions;
|
|
238
|
+
//multipleSelectQuestion = this.askMultipleSelectQuestionWithOptions;
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* Asks the AI to select one or more of the options from the list
|
|
@@ -266,7 +266,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
266
266
|
return DyFM_Object.safeParseList<T[]>(answer);
|
|
267
267
|
}
|
|
268
268
|
/** the exact same as {@link requestMultipleSelect} */
|
|
269
|
-
multipleSelectRequest = this.requestMultipleSelect;
|
|
269
|
+
//multipleSelectRequest = this.requestMultipleSelect;
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
272
|
* Asks the AI to answer a question that must result a JSON object
|
|
@@ -294,7 +294,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
294
294
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
295
295
|
}
|
|
296
296
|
/** the exact same as {@link askJSONQuestion} */
|
|
297
|
-
jsonQuestion = this.askJSONQuestion;
|
|
297
|
+
//jsonQuestion = this.askJSONQuestion;
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
300
|
* Asks the AI to answer a question that must result a JSON object with specific key descriptions
|
|
@@ -327,7 +327,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
327
327
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
328
328
|
}
|
|
329
329
|
/** the exact same as {@link askJSONQuestionWithKeysDescription} */
|
|
330
|
-
jsonQuestionWithKeysDescription = this.askJSONQuestionWithKeysDescription;
|
|
330
|
+
//jsonQuestionWithKeysDescription = this.askJSONQuestionWithKeysDescription;
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
333
|
* Asks the AI to answer a question that must result a JSON object with specific keys
|
|
@@ -360,7 +360,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
360
360
|
return DyFM_Object.safeParseJSON<T>(answer);
|
|
361
361
|
}
|
|
362
362
|
/** the exact same as {@link askJSONQuestionWithExactKeys} */
|
|
363
|
-
jsonQuestionWithExactKeys = this.askJSONQuestionWithExactKeys;
|
|
363
|
+
//jsonQuestionWithExactKeys = this.askJSONQuestionWithExactKeys;
|
|
364
364
|
|
|
365
365
|
/**
|
|
366
366
|
* Asks the AI to answer a question that must result a list of strings
|
|
@@ -388,9 +388,9 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
388
388
|
return DyFM_Object.safeParseList<string[]>(answer);
|
|
389
389
|
}
|
|
390
390
|
/** the exact same as {@link askListQuestion} */
|
|
391
|
-
listQuestion = this.askListQuestion;
|
|
391
|
+
//listQuestion = this.askListQuestion;
|
|
392
392
|
/** the exact same as {@link askListQuestion} */
|
|
393
|
-
listRequest = this.askListQuestion;
|
|
393
|
+
//listRequest = this.askListQuestion;
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* Asks the AI to answer a question
|
|
@@ -422,13 +422,13 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
422
422
|
return answer;
|
|
423
423
|
}
|
|
424
424
|
/** the exact same as {@link askQuestion} */
|
|
425
|
-
answer = this.askQuestion;
|
|
425
|
+
//answer = this.askQuestion;
|
|
426
426
|
/** the exact same as {@link askQuestion} */
|
|
427
|
-
getQuestionAnswer = this.askQuestion;
|
|
427
|
+
//getQuestionAnswer = this.askQuestion;
|
|
428
428
|
/** the exact same as {@link askQuestion} */
|
|
429
|
-
simpleQuestion = this.askQuestion;
|
|
429
|
+
//simpleQuestion = this.askQuestion;
|
|
430
430
|
/** the exact same as {@link askQuestion} */
|
|
431
|
-
askSimpleQuestion = this.askQuestion;
|
|
431
|
+
//askSimpleQuestion = this.askQuestion;
|
|
432
432
|
|
|
433
433
|
// async askJSONListQuestion(
|
|
434
434
|
// question: string,
|
|
@@ -465,7 +465,7 @@ export class DyNTS_OAI_LLM_ServiceBase {
|
|
|
465
465
|
}) as Promise<string>;
|
|
466
466
|
}
|
|
467
467
|
/** the exact same as {@link resolveSimpleUserMessage} */
|
|
468
|
-
simpleUserMessage = this.resolveSimpleUserMessage;
|
|
468
|
+
//simpleUserMessage = this.resolveSimpleUserMessage;
|
|
469
469
|
|
|
470
470
|
//#endregion
|
|
471
471
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
try {
|
|
3
|
+
/* try {
|
|
4
4
|
require.resolve('socket.io');
|
|
5
5
|
} catch (error) {
|
|
6
6
|
console.log(
|
|
@@ -14,7 +14,7 @@ try {
|
|
|
14
14
|
console.log(
|
|
15
15
|
'❌ Socket.io-client package not found, please install it with: pnpm add socket.io-client'
|
|
16
16
|
);
|
|
17
|
-
}
|
|
17
|
+
} */
|
|
18
18
|
|
|
19
19
|
//
|
|
20
20
|
// Socket.io module
|
|
@@ -291,6 +291,12 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
|
|
|
291
291
|
dependencyIds?: string | { [key: string]: string }
|
|
292
292
|
): { [key: string]: string } {
|
|
293
293
|
if (!this.depSettings.length) {
|
|
294
|
+
DyFM_Log.warn(
|
|
295
|
+
`❌ getDataByDependencyId failed, dependencyKey is missing from service! ` +
|
|
296
|
+
`(${this.dataParams.dataName})` +
|
|
297
|
+
`\n 📍 ${this.dataParams.stackLocation}`
|
|
298
|
+
);
|
|
299
|
+
|
|
294
300
|
throw new DyFM_Error({
|
|
295
301
|
...this._getDefaultErrorSettings(
|
|
296
302
|
'getDataByDependencyId',
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
DyFM_ErrorLevel,
|
|
8
8
|
DyFM_HttpCallType, DyFM_HttpResponseType,
|
|
9
9
|
DyFM_Log,
|
|
10
|
-
DyFM_HttpErrorResponse
|
|
10
|
+
DyFM_HttpErrorResponse,
|
|
11
|
+
DyFM_Object
|
|
11
12
|
} from '@futdevpro/fsm-dynamo';
|
|
12
13
|
|
|
13
14
|
import { DyNTS_global_settings } from '../../_collections/global-settings.const';
|
|
@@ -243,7 +244,9 @@ export class DyNTS_ApiService {
|
|
|
243
244
|
typeof (error as DyFM_Error)?.error === 'string' &&
|
|
244
245
|
callParams?.httpOptions?.responseType === DyFM_HttpResponseType.text
|
|
245
246
|
) {
|
|
246
|
-
(error as DyFM_Error).error =
|
|
247
|
+
(error as DyFM_Error).error = DyFM_Object.failableSafeParseJSON(
|
|
248
|
+
(error as DyFM_Error)?.error as any as string
|
|
249
|
+
);
|
|
247
250
|
}
|
|
248
251
|
|
|
249
252
|
if (DyFM_Error.isDyFMError((error as Axios.AxiosError)?.response?.data)) {
|
|
@@ -93,9 +93,9 @@ export class DyNTS_RoutingModule {
|
|
|
93
93
|
/* this.serviceName = set.route.replace('/', '') + 'RoutingModule'; */
|
|
94
94
|
this.route = DyNTS_global_settings.baseUrl + set.route;
|
|
95
95
|
this.controllers = set.controllers ?? [];
|
|
96
|
+
this.stackLocation = DyFM_getConstructionStackLocation();
|
|
96
97
|
this.setupRoutes();
|
|
97
98
|
this.mountRoutes(set.securityOverride);
|
|
98
|
-
this.stackLocation = DyFM_getConstructionStackLocation();
|
|
99
99
|
|
|
100
100
|
if (this.logSetup) console.log(
|
|
101
101
|
`routing module setup done: ${this.route} security: ${this.security}\n`
|
|
@@ -125,6 +125,7 @@ export class DyNTS_RoutingModule {
|
|
|
125
125
|
|
|
126
126
|
message: `Routing module setup failed (${this.route}).`,
|
|
127
127
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-RMS-000`,
|
|
128
|
+
__localStack: this.stackLocation,
|
|
128
129
|
additionalContent: set,
|
|
129
130
|
});
|
|
130
131
|
}
|
package/tsconfig.json
CHANGED
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"forceConsistentCasingInFileNames": true,
|
|
25
25
|
"resolveJsonModule": true,
|
|
26
26
|
"paths": {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/* "@futdevpro/fsm-dynamo": [
|
|
30
|
-
"../dynamo-fsm/src/index.ts",
|
|
31
|
-
],
|
|
32
|
-
"@futdevpro/fsm-dynamo/*": [
|
|
33
|
-
"../dynamo-fsm/src/_modules/*.index.ts",
|
|
34
|
-
], */
|
|
35
|
-
|
|
36
|
-
|
|
37
27
|
}
|
|
38
28
|
},
|
|
39
29
|
"include": [
|
|
40
30
|
"src"
|
|
41
|
-
]
|
|
31
|
+
],
|
|
32
|
+
"DISABLED": {
|
|
33
|
+
"paths": {
|
|
34
|
+
"@futdevpro/fsm-dynamo": [
|
|
35
|
+
"../dynamo-fsm/src/index.ts"
|
|
36
|
+
],
|
|
37
|
+
"@futdevpro/fsm-dynamo/*": [
|
|
38
|
+
"../dynamo-fsm/src/_modules/*.index.ts"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
42
|
}
|
package/test.ts
DELETED
|
Binary file
|
package/test2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log("test");
|
package/test2.ts
DELETED
|
Binary file
|