quidproquo-actionprocessor-node 0.0.253 → 0.0.255
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/lib/commonjs/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.js +74 -64
- package/lib/commonjs/actionProcessor/core/claudeAi/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/claudeAi/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/config/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/context/getContextListActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/context/getContextListActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/context/getContextReadActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/context/getContextReadActionProcessor.js +27 -27
- package/lib/commonjs/actionProcessor/core/context/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/context/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/customActions/getCustomActionActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/customActions/getCustomActionActionProcessor.js +58 -58
- package/lib/commonjs/actionProcessor/core/customActions/index.d.ts +1 -1
- package/lib/commonjs/actionProcessor/core/customActions/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/date/getDateNowActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/date/getDateNowActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/date/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/date/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/error/getErrorThrowErrorActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/error/getErrorThrowErrorActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/error/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/error/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewSortableActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewSortableActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/guid/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/guid/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/index.d.ts +14 -14
- package/lib/commonjs/actionProcessor/core/index.js +54 -54
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.js +26 -26
- package/lib/commonjs/actionProcessor/core/log/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/index.js +19 -19
- package/lib/commonjs/actionProcessor/core/math/getMathRandomNumberActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/math/getMathRandomNumberActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/math/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/math/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/network/getNetworkRequestActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/network/getNetworkRequestActionProcessor.js +150 -150
- package/lib/commonjs/actionProcessor/core/network/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/network/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/platform/getPlatformDelayActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/platform/getPlatformDelayActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/platform/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/platform/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/system/getSystemBatchActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/system/getSystemBatchActionProcessor.js +51 -51
- package/lib/commonjs/actionProcessor/core/system/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/system/index.js +17 -17
- package/lib/commonjs/actionProcessor/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/index.js +18 -18
- package/lib/commonjs/actionProcessor/webserver/dns/getDnsListActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/dns/getDnsListActionProcessor.js +26 -26
- package/lib/commonjs/actionProcessor/webserver/dns/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/dns/index.js +17 -17
- package/lib/commonjs/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/index.js +17 -17
- package/lib/commonjs/index.d.ts +1 -1
- package/lib/commonjs/index.js +17 -17
- package/lib/esm/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.js +26 -26
- package/lib/esm/actionProcessor/core/claudeAi/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/claudeAi/index.js +4 -4
- package/lib/esm/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/config/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/index.js +4 -4
- package/lib/esm/actionProcessor/core/context/getContextListActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/context/getContextListActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/context/getContextReadActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/context/getContextReadActionProcessor.js +12 -12
- package/lib/esm/actionProcessor/core/context/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/context/index.js +6 -6
- package/lib/esm/actionProcessor/core/customActions/getCustomActionActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/customActions/getCustomActionActionProcessor.js +43 -43
- package/lib/esm/actionProcessor/core/customActions/index.d.ts +1 -1
- package/lib/esm/actionProcessor/core/customActions/index.js +2 -2
- package/lib/esm/actionProcessor/core/date/getDateNowActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/date/getDateNowActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/date/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/date/index.js +4 -4
- package/lib/esm/actionProcessor/core/error/getErrorThrowErrorActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/error/getErrorThrowErrorActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/error/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/error/index.js +4 -4
- package/lib/esm/actionProcessor/core/guid/getGuidNewActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/guid/getGuidNewActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/guid/getGuidNewSortableActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/guid/getGuidNewSortableActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/guid/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/guid/index.js +6 -6
- package/lib/esm/actionProcessor/core/index.d.ts +14 -14
- package/lib/esm/actionProcessor/core/index.js +37 -37
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.js +11 -11
- package/lib/esm/actionProcessor/core/log/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/index.js +8 -8
- package/lib/esm/actionProcessor/core/math/getMathRandomNumberActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/math/getMathRandomNumberActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/math/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/math/index.js +4 -4
- package/lib/esm/actionProcessor/core/network/getNetworkRequestActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/network/getNetworkRequestActionProcessor.js +134 -134
- package/lib/esm/actionProcessor/core/network/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/network/index.js +4 -4
- package/lib/esm/actionProcessor/core/platform/getPlatformDelayActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/platform/getPlatformDelayActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/platform/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/platform/index.js +4 -4
- package/lib/esm/actionProcessor/core/system/getSystemBatchActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/system/getSystemBatchActionProcessor.js +36 -36
- package/lib/esm/actionProcessor/core/system/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/system/index.js +4 -4
- package/lib/esm/actionProcessor/index.d.ts +2 -2
- package/lib/esm/actionProcessor/index.js +2 -2
- package/lib/esm/actionProcessor/webserver/dns/getDnsListActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/dns/getDnsListActionProcessor.js +11 -11
- package/lib/esm/actionProcessor/webserver/dns/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/dns/index.js +4 -4
- package/lib/esm/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/index.js +4 -4
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/package.json +5 -5
package/lib/commonjs/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getClaudeAiMessagesApiActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getClaudeAiMessagesApiActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,64 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.getClaudeAiMessagesApiActionProcessor = void 0;
|
|
46
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
47
|
+
const sdk_1 = __importStar(require("@anthropic-ai/sdk"));
|
|
48
|
+
const getProcessMessagesApi = (qpqConfig) => {
|
|
49
|
+
return (_a) => __awaiter(void 0, [_a], void 0, function* ({ body, apiKey }) {
|
|
50
|
+
const anthropic = new sdk_1.default({ apiKey });
|
|
51
|
+
try {
|
|
52
|
+
const msg = yield anthropic.messages.create(body);
|
|
53
|
+
return (0, quidproquo_core_1.actionResult)(msg);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.log(error);
|
|
57
|
+
if (error instanceof sdk_1.AuthenticationError) {
|
|
58
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.Unauthorized, 'Invalid API key.');
|
|
59
|
+
}
|
|
60
|
+
else if (error instanceof Error) {
|
|
61
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, error.message);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, 'An error occurred while processing your request.');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
const getClaudeAiMessagesApiActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
+
return ({
|
|
71
|
+
[quidproquo_core_1.ClaudeAiActionType.MessagesApi]: getProcessMessagesApi(qpqConfig),
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
exports.getClaudeAiMessagesApiActionProcessor = getClaudeAiMessagesApiActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getClaudeAiActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getClaudeAiActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getClaudeAiActionProcessor = void 0;
|
|
13
|
-
const getClaudeAiMessagesApiActionProcessor_1 = require("./getClaudeAiMessagesApiActionProcessor");
|
|
14
|
-
const getClaudeAiActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
return (Object.assign({}, (yield (0, getClaudeAiMessagesApiActionProcessor_1.getClaudeAiMessagesApiActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
-
});
|
|
17
|
-
exports.getClaudeAiActionProcessor = getClaudeAiActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getClaudeAiActionProcessor = void 0;
|
|
13
|
+
const getClaudeAiMessagesApiActionProcessor_1 = require("./getClaudeAiMessagesApiActionProcessor");
|
|
14
|
+
const getClaudeAiActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getClaudeAiMessagesApiActionProcessor_1.getClaudeAiMessagesApiActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getClaudeAiActionProcessor = getClaudeAiActionProcessor;
|
package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getConfigGetApplicationInfoActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getConfigGetApplicationInfoActionProcessor: ActionProcessorListResolver;
|
package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getConfigGetApplicationInfoActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
const getProcessConfigGetApplicationConfig = (qpqConfig) => {
|
|
15
|
-
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
const appInfo = {
|
|
17
|
-
environment: quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig),
|
|
18
|
-
feature: quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig),
|
|
19
|
-
module: quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig),
|
|
20
|
-
name: quidproquo_core_1.qpqCoreUtils.getApplicationName(qpqConfig),
|
|
21
|
-
};
|
|
22
|
-
return (0, quidproquo_core_1.actionResult)(appInfo);
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
const getConfigGetApplicationInfoActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
return ({
|
|
27
|
-
[quidproquo_core_1.ConfigActionType.GetApplicationInfo]: getProcessConfigGetApplicationConfig(qpqConfig),
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
exports.getConfigGetApplicationInfoActionProcessor = getConfigGetApplicationInfoActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getConfigGetApplicationInfoActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessConfigGetApplicationConfig = (qpqConfig) => {
|
|
15
|
+
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const appInfo = {
|
|
17
|
+
environment: quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(qpqConfig),
|
|
18
|
+
feature: quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(qpqConfig),
|
|
19
|
+
module: quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig),
|
|
20
|
+
name: quidproquo_core_1.qpqCoreUtils.getApplicationName(qpqConfig),
|
|
21
|
+
};
|
|
22
|
+
return (0, quidproquo_core_1.actionResult)(appInfo);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const getConfigGetApplicationInfoActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
return ({
|
|
27
|
+
[quidproquo_core_1.ConfigActionType.GetApplicationInfo]: getProcessConfigGetApplicationConfig(qpqConfig),
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
exports.getConfigGetApplicationInfoActionProcessor = getConfigGetApplicationInfoActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getConfigActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getConfigActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getConfigActionProcessor = void 0;
|
|
13
|
-
const getConfigGetApplicationInfoActionProcessor_1 = require("./getConfigGetApplicationInfoActionProcessor");
|
|
14
|
-
const getConfigActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
return (Object.assign({}, (yield (0, getConfigGetApplicationInfoActionProcessor_1.getConfigGetApplicationInfoActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
-
});
|
|
17
|
-
exports.getConfigActionProcessor = getConfigActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getConfigActionProcessor = void 0;
|
|
13
|
+
const getConfigGetApplicationInfoActionProcessor_1 = require("./getConfigGetApplicationInfoActionProcessor");
|
|
14
|
+
const getConfigActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getConfigGetApplicationInfoActionProcessor_1.getConfigGetApplicationInfoActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getConfigActionProcessor = getConfigActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getContextListActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getContextListActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getContextListActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
const getProcessContextList = (qpqConfig) => {
|
|
15
|
-
return (payload, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
return (0, quidproquo_core_1.actionResult)(session.context);
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const getContextListActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
return ({
|
|
21
|
-
[quidproquo_core_1.ContextActionType.List]: getProcessContextList(qpqConfig),
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
exports.getContextListActionProcessor = getContextListActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getContextListActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessContextList = (qpqConfig) => {
|
|
15
|
+
return (payload, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (0, quidproquo_core_1.actionResult)(session.context);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const getContextListActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
return ({
|
|
21
|
+
[quidproquo_core_1.ContextActionType.List]: getProcessContextList(qpqConfig),
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.getContextListActionProcessor = getContextListActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getContextReadActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getContextReadActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getContextReadActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
const getContextValue = (context, contextIdentifier) => {
|
|
15
|
-
return contextIdentifier.uniqueName in context ? context[contextIdentifier.uniqueName] : contextIdentifier.defaultValue;
|
|
16
|
-
};
|
|
17
|
-
const getProcessContextRead = (qpqConfig) => {
|
|
18
|
-
return (
|
|
19
|
-
return (0, quidproquo_core_1.actionResult)(getContextValue(session.context, contextIdentifier));
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
const getContextReadActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
-
return ({
|
|
24
|
-
[quidproquo_core_1.ContextActionType.Read]: getProcessContextRead(qpqConfig),
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
exports.getContextReadActionProcessor = getContextReadActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getContextReadActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getContextValue = (context, contextIdentifier) => {
|
|
15
|
+
return contextIdentifier.uniqueName in context ? context[contextIdentifier.uniqueName] : contextIdentifier.defaultValue;
|
|
16
|
+
};
|
|
17
|
+
const getProcessContextRead = (qpqConfig) => {
|
|
18
|
+
return (_a, session_1) => __awaiter(void 0, [_a, session_1], void 0, function* ({ contextIdentifier }, session) {
|
|
19
|
+
return (0, quidproquo_core_1.actionResult)(getContextValue(session.context, contextIdentifier));
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const getContextReadActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
return ({
|
|
24
|
+
[quidproquo_core_1.ContextActionType.Read]: getProcessContextRead(qpqConfig),
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
exports.getContextReadActionProcessor = getContextReadActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getContextActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getContextActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getContextActionProcessor = void 0;
|
|
13
|
-
const getContextListActionProcessor_1 = require("./getContextListActionProcessor");
|
|
14
|
-
const getContextReadActionProcessor_1 = require("./getContextReadActionProcessor");
|
|
15
|
-
const getContextActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
return (Object.assign(Object.assign({}, (yield (0, getContextListActionProcessor_1.getContextListActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getContextReadActionProcessor_1.getContextReadActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
17
|
-
});
|
|
18
|
-
exports.getContextActionProcessor = getContextActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getContextActionProcessor = void 0;
|
|
13
|
+
const getContextListActionProcessor_1 = require("./getContextListActionProcessor");
|
|
14
|
+
const getContextReadActionProcessor_1 = require("./getContextReadActionProcessor");
|
|
15
|
+
const getContextActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (Object.assign(Object.assign({}, (yield (0, getContextListActionProcessor_1.getContextListActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getContextReadActionProcessor_1.getContextReadActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
17
|
+
});
|
|
18
|
+
exports.getContextActionProcessor = getContextActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getCustomActionActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getCustomActionActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getCustomActionActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
function getActionProcessorListLoader(dynamicModuleLoader, qpqConfig) {
|
|
15
|
-
return function loadModule(qpqFunctionRuntime) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
try {
|
|
18
|
-
const possibleModule = yield dynamicModuleLoader(qpqFunctionRuntime);
|
|
19
|
-
if (typeof possibleModule !== 'function') {
|
|
20
|
-
throw new Error(`Expected module to be a function, but got ${typeof possibleModule}`);
|
|
21
|
-
}
|
|
22
|
-
const apl = yield possibleModule(qpqConfig, dynamicModuleLoader);
|
|
23
|
-
if (typeof apl !== 'object') {
|
|
24
|
-
throw new Error(`Expected action processor list to be an object, but got ${typeof apl}`);
|
|
25
|
-
}
|
|
26
|
-
if (Object.values(apl).find((aplv) => typeof aplv !== 'function')) {
|
|
27
|
-
throw new Error('Expected all action processors to be functions');
|
|
28
|
-
}
|
|
29
|
-
return apl;
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
console.log(`Unable to dynamically load action processors: [${e}] ${JSON.stringify(qpqFunctionRuntime)}`);
|
|
33
|
-
throw e;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
const getProcessCustomAction = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
-
try {
|
|
40
|
-
const actionProcessorListLoader = getActionProcessorListLoader(dynamicModuleLoader, qpqConfig);
|
|
41
|
-
const getCustomActionProcessors = quidproquo_core_1.qpqCoreUtils.getActionProcessorSources(qpqConfig);
|
|
42
|
-
const possibleModuleResults = yield Promise.allSettled(getCustomActionProcessors.map(actionProcessorListLoader));
|
|
43
|
-
// Filter out successfully loaded modules that are functions
|
|
44
|
-
const actionProcessorLists = possibleModuleResults
|
|
45
|
-
.filter((result) => result.status === 'fulfilled')
|
|
46
|
-
.map((result) => result.value);
|
|
47
|
-
return actionProcessorLists.reduce((acc, cur) => (Object.assign(Object.assign({}, acc), cur)), {});
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
// This should never get hit, but just in case
|
|
51
|
-
console.log(`Unable to dynamically load action processors: [${e}]`);
|
|
52
|
-
return {};
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
const getCustomActionActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
|
-
return (Object.assign({}, (yield getProcessCustomAction(qpqConfig, dynamicModuleLoader))));
|
|
57
|
-
});
|
|
58
|
-
exports.getCustomActionActionProcessor = getCustomActionActionProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getCustomActionActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
function getActionProcessorListLoader(dynamicModuleLoader, qpqConfig) {
|
|
15
|
+
return function loadModule(qpqFunctionRuntime) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
try {
|
|
18
|
+
const possibleModule = yield dynamicModuleLoader(qpqFunctionRuntime);
|
|
19
|
+
if (typeof possibleModule !== 'function') {
|
|
20
|
+
throw new Error(`Expected module to be a function, but got ${typeof possibleModule}`);
|
|
21
|
+
}
|
|
22
|
+
const apl = yield possibleModule(qpqConfig, dynamicModuleLoader);
|
|
23
|
+
if (typeof apl !== 'object') {
|
|
24
|
+
throw new Error(`Expected action processor list to be an object, but got ${typeof apl}`);
|
|
25
|
+
}
|
|
26
|
+
if (Object.values(apl).find((aplv) => typeof aplv !== 'function')) {
|
|
27
|
+
throw new Error('Expected all action processors to be functions');
|
|
28
|
+
}
|
|
29
|
+
return apl;
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
console.log(`Unable to dynamically load action processors: [${e}] ${JSON.stringify(qpqFunctionRuntime)}`);
|
|
33
|
+
throw e;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const getProcessCustomAction = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
try {
|
|
40
|
+
const actionProcessorListLoader = getActionProcessorListLoader(dynamicModuleLoader, qpqConfig);
|
|
41
|
+
const getCustomActionProcessors = quidproquo_core_1.qpqCoreUtils.getActionProcessorSources(qpqConfig);
|
|
42
|
+
const possibleModuleResults = yield Promise.allSettled(getCustomActionProcessors.map(actionProcessorListLoader));
|
|
43
|
+
// Filter out successfully loaded modules that are functions
|
|
44
|
+
const actionProcessorLists = possibleModuleResults
|
|
45
|
+
.filter((result) => result.status === 'fulfilled')
|
|
46
|
+
.map((result) => result.value);
|
|
47
|
+
return actionProcessorLists.reduce((acc, cur) => (Object.assign(Object.assign({}, acc), cur)), {});
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
// This should never get hit, but just in case
|
|
51
|
+
console.log(`Unable to dynamically load action processors: [${e}]`);
|
|
52
|
+
return {};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const getCustomActionActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
|
+
return (Object.assign({}, (yield getProcessCustomAction(qpqConfig, dynamicModuleLoader))));
|
|
57
|
+
});
|
|
58
|
+
exports.getCustomActionActionProcessor = getCustomActionActionProcessor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './getCustomActionActionProcessor';
|
|
1
|
+
export * from './getCustomActionActionProcessor';
|