quidproquo-actionprocessor-web 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/config/getConfigGetParameterActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/getConfigGetParameterActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/config/getConfigGetParametersActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/getConfigGetParametersActionProcessor.js +37 -37
- package/lib/commonjs/actionProcessor/core/config/getConfigSetParameterActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/getConfigSetParameterActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/config/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/index.js +19 -19
- package/lib/commonjs/actionProcessor/core/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/index.js +17 -17
- package/lib/commonjs/actionProcessor/index.d.ts +3 -2
- package/lib/commonjs/actionProcessor/index.js +19 -18
- package/lib/commonjs/actionProcessor/web/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/web/index.js +17 -0
- package/lib/commonjs/actionProcessor/web/queryParams/getQueryParamsGetActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/web/queryParams/getQueryParamsGetActionProcessor.js +27 -0
- package/lib/commonjs/actionProcessor/web/queryParams/getQueryParamsGetAllActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/web/queryParams/getQueryParamsGetAllActionProcessor.js +35 -0
- package/lib/commonjs/actionProcessor/web/queryParams/getQueryParamsSetActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/web/queryParams/getQueryParamsSetActionProcessor.js +42 -0
- package/lib/commonjs/actionProcessor/web/queryParams/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/web/queryParams/index.js +19 -0
- 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/getWebActionProcessors.d.ts +2 -2
- package/lib/commonjs/getWebActionProcessors.js +18 -18
- package/lib/commonjs/index.d.ts +2 -2
- package/lib/commonjs/index.js +18 -18
- package/lib/esm/actionProcessor/core/config/getConfigGetParameterActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/getConfigGetParameterActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/config/getConfigGetParametersActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/getConfigGetParametersActionProcessor.js +22 -22
- package/lib/esm/actionProcessor/core/config/getConfigSetParameterActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/getConfigSetParameterActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/config/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/index.js +8 -8
- package/lib/esm/actionProcessor/core/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/index.js +4 -4
- package/lib/esm/actionProcessor/index.d.ts +3 -2
- package/lib/esm/actionProcessor/index.js +3 -2
- package/lib/esm/actionProcessor/web/index.d.ts +2 -0
- package/lib/esm/actionProcessor/web/index.js +4 -0
- package/lib/esm/actionProcessor/web/queryParams/getQueryParamsGetActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/web/queryParams/getQueryParamsGetActionProcessor.js +12 -0
- package/lib/esm/actionProcessor/web/queryParams/getQueryParamsGetAllActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/web/queryParams/getQueryParamsGetAllActionProcessor.js +20 -0
- package/lib/esm/actionProcessor/web/queryParams/getQueryParamsSetActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/web/queryParams/getQueryParamsSetActionProcessor.js +27 -0
- package/lib/esm/actionProcessor/web/queryParams/index.d.ts +2 -0
- package/lib/esm/actionProcessor/web/queryParams/index.js +8 -0
- 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/getWebActionProcessors.d.ts +2 -2
- package/lib/esm/getWebActionProcessors.js +9 -8
- package/lib/esm/index.d.ts +2 -2
- package/lib/esm/index.js +2 -2
- package/package.json +7 -6
|
@@ -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.getDnsActionProcessor = void 0;
|
|
13
|
-
const getDnsListActionProcessor_1 = require("./getDnsListActionProcessor");
|
|
14
|
-
const getDnsActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
return (Object.assign({}, (yield (0, getDnsListActionProcessor_1.getDnsListActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
-
});
|
|
17
|
-
exports.getDnsActionProcessor = getDnsActionProcessor;
|
|
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.getDnsActionProcessor = void 0;
|
|
13
|
+
const getDnsListActionProcessor_1 = require("./getDnsListActionProcessor");
|
|
14
|
+
const getDnsActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getDnsListActionProcessor_1.getDnsListActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getDnsActionProcessor = getDnsActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getWebserverActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getWebserverActionProcessor: 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.getWebserverActionProcessor = void 0;
|
|
13
|
-
const dns_1 = require("./dns");
|
|
14
|
-
const getWebserverActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
return (Object.assign({}, (yield (0, dns_1.getDnsActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
-
});
|
|
17
|
-
exports.getWebserverActionProcessor = getWebserverActionProcessor;
|
|
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.getWebserverActionProcessor = void 0;
|
|
13
|
+
const dns_1 = require("./dns");
|
|
14
|
+
const getWebserverActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, dns_1.getDnsActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getWebserverActionProcessor = getWebserverActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getWebActionProcessors: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getWebActionProcessors: 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.getWebActionProcessors = void 0;
|
|
13
|
-
const quidproquo_actionprocessor_js_1 = require("quidproquo-actionprocessor-js");
|
|
14
|
-
const actionProcessor_1 = require("./actionProcessor");
|
|
15
|
-
const getWebActionProcessors = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
return (Object.assign(Object.assign(Object.assign(Object.assign({}, (yield (0, quidproquo_actionprocessor_js_1.getCoreActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, quidproquo_actionprocessor_js_1.getWebserverActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, actionProcessor_1.getCoreActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, actionProcessor_1.getWebserverActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
17
|
-
});
|
|
18
|
-
exports.getWebActionProcessors = getWebActionProcessors;
|
|
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.getWebActionProcessors = void 0;
|
|
13
|
+
const quidproquo_actionprocessor_js_1 = require("quidproquo-actionprocessor-js");
|
|
14
|
+
const actionProcessor_1 = require("./actionProcessor");
|
|
15
|
+
const getWebActionProcessors = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (yield (0, quidproquo_actionprocessor_js_1.getCoreActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, quidproquo_actionprocessor_js_1.getWebserverActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, actionProcessor_1.getCoreActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, actionProcessor_1.getWebserverActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, actionProcessor_1.getWebActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
17
|
+
});
|
|
18
|
+
exports.getWebActionProcessors = getWebActionProcessors;
|
package/lib/commonjs/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './actionProcessor';
|
|
2
|
-
export * from './getWebActionProcessors';
|
|
1
|
+
export * from './actionProcessor';
|
|
2
|
+
export * from './getWebActionProcessors';
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./actionProcessor"), exports);
|
|
18
|
-
__exportStar(require("./getWebActionProcessors"), exports);
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./actionProcessor"), exports);
|
|
18
|
+
__exportStar(require("./getWebActionProcessors"), exports);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getConfigGetParameterActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getConfigGetParameterActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { actionResult, actionResultError, ConfigActionType, ErrorTypeEnum, } from 'quidproquo-core';
|
|
2
|
-
const getProcessConfigGetParameter = (qpqConfig) => {
|
|
3
|
-
return async ({ parameterName }) => {
|
|
4
|
-
// Read the value from Local Storage
|
|
5
|
-
const parameterValue = localStorage.getItem(parameterName);
|
|
6
|
-
// If the parameter doesn't exist, return an error
|
|
7
|
-
if (parameterValue === null) {
|
|
8
|
-
return actionResultError(ErrorTypeEnum.NotFound, `Parameter '${parameterName}' not found in Local Storage`);
|
|
9
|
-
}
|
|
10
|
-
return actionResult(parameterValue);
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export const getConfigGetParameterActionProcessor = async (qpqConfig) => ({
|
|
14
|
-
[ConfigActionType.GetParameter]: getProcessConfigGetParameter(qpqConfig),
|
|
15
|
-
});
|
|
1
|
+
import { actionResult, actionResultError, ConfigActionType, ErrorTypeEnum, } from 'quidproquo-core';
|
|
2
|
+
const getProcessConfigGetParameter = (qpqConfig) => {
|
|
3
|
+
return async ({ parameterName }) => {
|
|
4
|
+
// Read the value from Local Storage
|
|
5
|
+
const parameterValue = localStorage.getItem(parameterName);
|
|
6
|
+
// If the parameter doesn't exist, return an error
|
|
7
|
+
if (parameterValue === null) {
|
|
8
|
+
return actionResultError(ErrorTypeEnum.NotFound, `Parameter '${parameterName}' not found in Local Storage`);
|
|
9
|
+
}
|
|
10
|
+
return actionResult(parameterValue);
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export const getConfigGetParameterActionProcessor = async (qpqConfig) => ({
|
|
14
|
+
[ConfigActionType.GetParameter]: getProcessConfigGetParameter(qpqConfig),
|
|
15
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getConfigGetParametersActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getConfigGetParametersActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { actionResult, actionResultError, ConfigActionType, ErrorTypeEnum, } from 'quidproquo-core';
|
|
2
|
-
const getProcessConfigGetParameters = (qpqConfig) => {
|
|
3
|
-
return async ({ parameterNames }) => {
|
|
4
|
-
// Retrieve values from Local Storage for each parameter name
|
|
5
|
-
const parameterValues = parameterNames.map((name) => ({
|
|
6
|
-
name,
|
|
7
|
-
value: localStorage.getItem(name),
|
|
8
|
-
found: localStorage.getItem(name) !== null, // Check if it exists
|
|
9
|
-
}));
|
|
10
|
-
// Find missing parameters
|
|
11
|
-
const missingParameters = parameterValues.filter((param) => !param.found);
|
|
12
|
-
// If any parameters are missing, return an error
|
|
13
|
-
if (missingParameters.length > 0) {
|
|
14
|
-
return actionResultError(ErrorTypeEnum.NotFound, `Parameters not found in Local Storage: ${missingParameters.map((param) => param.name).join(', ')}`);
|
|
15
|
-
}
|
|
16
|
-
// Return an array of values
|
|
17
|
-
return actionResult(parameterValues.map((param) => param.value));
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export const getConfigGetParametersActionProcessor = async (qpqConfig) => ({
|
|
21
|
-
[ConfigActionType.GetParameters]: getProcessConfigGetParameters(qpqConfig),
|
|
22
|
-
});
|
|
1
|
+
import { actionResult, actionResultError, ConfigActionType, ErrorTypeEnum, } from 'quidproquo-core';
|
|
2
|
+
const getProcessConfigGetParameters = (qpqConfig) => {
|
|
3
|
+
return async ({ parameterNames }) => {
|
|
4
|
+
// Retrieve values from Local Storage for each parameter name
|
|
5
|
+
const parameterValues = parameterNames.map((name) => ({
|
|
6
|
+
name,
|
|
7
|
+
value: localStorage.getItem(name),
|
|
8
|
+
found: localStorage.getItem(name) !== null, // Check if it exists
|
|
9
|
+
}));
|
|
10
|
+
// Find missing parameters
|
|
11
|
+
const missingParameters = parameterValues.filter((param) => !param.found);
|
|
12
|
+
// If any parameters are missing, return an error
|
|
13
|
+
if (missingParameters.length > 0) {
|
|
14
|
+
return actionResultError(ErrorTypeEnum.NotFound, `Parameters not found in Local Storage: ${missingParameters.map((param) => param.name).join(', ')}`);
|
|
15
|
+
}
|
|
16
|
+
// Return an array of values
|
|
17
|
+
return actionResult(parameterValues.map((param) => param.value));
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export const getConfigGetParametersActionProcessor = async (qpqConfig) => ({
|
|
21
|
+
[ConfigActionType.GetParameters]: getProcessConfigGetParameters(qpqConfig),
|
|
22
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getConfigSetParameterActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getConfigSetParameterActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { actionResult, actionResultError, ConfigActionType, ErrorTypeEnum, } from 'quidproquo-core';
|
|
2
|
-
const getProcessConfigSetParameter = (qpqConfig) => {
|
|
3
|
-
return async ({ parameterName, parameterValue }) => {
|
|
4
|
-
try {
|
|
5
|
-
localStorage.setItem(parameterName, parameterValue);
|
|
6
|
-
return actionResult(void 0);
|
|
7
|
-
}
|
|
8
|
-
catch (error) {
|
|
9
|
-
return actionResultError(ErrorTypeEnum.GenericError, `Failed to save parameter '${parameterName}' to Local Storage.`);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export const getConfigSetParameterActionProcessor = async (qpqConfig) => ({
|
|
14
|
-
[ConfigActionType.SetParameter]: getProcessConfigSetParameter(qpqConfig),
|
|
15
|
-
});
|
|
1
|
+
import { actionResult, actionResultError, ConfigActionType, ErrorTypeEnum, } from 'quidproquo-core';
|
|
2
|
+
const getProcessConfigSetParameter = (qpqConfig) => {
|
|
3
|
+
return async ({ parameterName, parameterValue }) => {
|
|
4
|
+
try {
|
|
5
|
+
localStorage.setItem(parameterName, parameterValue);
|
|
6
|
+
return actionResult(void 0);
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
return actionResultError(ErrorTypeEnum.GenericError, `Failed to save parameter '${parameterName}' to Local Storage.`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export const getConfigSetParameterActionProcessor = async (qpqConfig) => ({
|
|
14
|
+
[ConfigActionType.SetParameter]: getProcessConfigSetParameter(qpqConfig),
|
|
15
|
+
});
|
|
@@ -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,8 +1,8 @@
|
|
|
1
|
-
import { getConfigGetParameterActionProcessor } from './getConfigGetParameterActionProcessor';
|
|
2
|
-
import { getConfigGetParametersActionProcessor } from './getConfigGetParametersActionProcessor';
|
|
3
|
-
import { getConfigSetParameterActionProcessor } from './getConfigSetParameterActionProcessor';
|
|
4
|
-
export const getConfigActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
5
|
-
...(await getConfigGetParameterActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
6
|
-
...(await getConfigGetParametersActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
7
|
-
...(await getConfigSetParameterActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
-
});
|
|
1
|
+
import { getConfigGetParameterActionProcessor } from './getConfigGetParameterActionProcessor';
|
|
2
|
+
import { getConfigGetParametersActionProcessor } from './getConfigGetParametersActionProcessor';
|
|
3
|
+
import { getConfigSetParameterActionProcessor } from './getConfigSetParameterActionProcessor';
|
|
4
|
+
export const getConfigActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
5
|
+
...(await getConfigGetParameterActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
6
|
+
...(await getConfigGetParametersActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
7
|
+
...(await getConfigSetParameterActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getCoreActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getCoreActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getConfigActionProcessor } from './config';
|
|
2
|
-
export const getCoreActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
3
|
-
...(await getConfigActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
4
|
-
});
|
|
1
|
+
import { getConfigActionProcessor } from './config';
|
|
2
|
+
export const getCoreActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
3
|
+
...(await getConfigActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
4
|
+
});
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './core';
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './core';
|
|
2
|
+
export * from './web';
|
|
3
|
+
export * from './webserver';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './core';
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './core';
|
|
2
|
+
export * from './web';
|
|
3
|
+
export * from './webserver';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { actionResult } from 'quidproquo-core';
|
|
2
|
+
import { QueryParamsActionType } from 'quidproquo-web';
|
|
3
|
+
const getProcessQueryParamsGet = (qpqConfig) => {
|
|
4
|
+
return async ({ key }) => {
|
|
5
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
6
|
+
const values = urlParams.getAll(key);
|
|
7
|
+
return actionResult(values);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export const getQueryParamsGetActionProcessor = async (qpqConfig) => ({
|
|
11
|
+
[QueryParamsActionType.Get]: getProcessQueryParamsGet(qpqConfig),
|
|
12
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { actionResult } from 'quidproquo-core';
|
|
2
|
+
import { QueryParamsActionType } from 'quidproquo-web';
|
|
3
|
+
const getProcessQueryParamsGetAll = (qpqConfig) => {
|
|
4
|
+
return async () => {
|
|
5
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
6
|
+
const paramsObject = {};
|
|
7
|
+
urlParams.forEach((value, key) => {
|
|
8
|
+
if (paramsObject[key]) {
|
|
9
|
+
paramsObject[key] = [...paramsObject[key], value];
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
paramsObject[key] = [value];
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return actionResult(paramsObject);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const getQueryParamsGetAllActionProcessor = async (qpqConfig) => ({
|
|
19
|
+
[QueryParamsActionType.GetAll]: getProcessQueryParamsGetAll(qpqConfig),
|
|
20
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { actionResult } from 'quidproquo-core';
|
|
2
|
+
import { QueryParamsActionType } from 'quidproquo-web';
|
|
3
|
+
const getProcessQueryParamsSet = (qpqConfig) => {
|
|
4
|
+
return async ({ key, values, createHistoryEntry }) => {
|
|
5
|
+
const url = new URL(window.location.href);
|
|
6
|
+
const urlParams = new URLSearchParams(url.search);
|
|
7
|
+
// Ensure values is an array and remove key if empty
|
|
8
|
+
if (values.length === 0) {
|
|
9
|
+
urlParams.delete(key);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
urlParams.delete(key);
|
|
13
|
+
values.forEach((value) => urlParams.append(key, value));
|
|
14
|
+
}
|
|
15
|
+
const newUrl = `${url.pathname}?${urlParams.toString()}`;
|
|
16
|
+
if (createHistoryEntry) {
|
|
17
|
+
window.history.pushState(null, '', newUrl);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
window.history.replaceState(null, '', newUrl);
|
|
21
|
+
}
|
|
22
|
+
return actionResult(void 0);
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export const getQueryParamsSetActionProcessor = async (qpqConfig) => ({
|
|
26
|
+
[QueryParamsActionType.Set]: getProcessQueryParamsSet(qpqConfig),
|
|
27
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getQueryParamsGetActionProcessor } from './getQueryParamsGetActionProcessor';
|
|
2
|
+
import { getQueryParamsGetAllActionProcessor } from './getQueryParamsGetAllActionProcessor';
|
|
3
|
+
import { getQueryParamsSetActionProcessor } from './getQueryParamsSetActionProcessor';
|
|
4
|
+
export const getQueryParamsActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
5
|
+
...(await getQueryParamsGetActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
6
|
+
...(await getQueryParamsGetAllActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
7
|
+
...(await getQueryParamsSetActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getDnsListActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getDnsListActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { actionResult } from 'quidproquo-core';
|
|
2
|
-
import { DnsActionType, qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
|
-
const getProcessDnsList = (qpqConfig) => {
|
|
4
|
-
return async () => {
|
|
5
|
-
const dnsList = qpqWebServerUtils.getDnsConfigs(qpqConfig).map((dc) => dc.dnsBase);
|
|
6
|
-
return actionResult(dnsList);
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export const getDnsListActionProcessor = async (qpqConfig) => ({
|
|
10
|
-
[DnsActionType.List]: getProcessDnsList(qpqConfig),
|
|
11
|
-
});
|
|
1
|
+
import { actionResult } from 'quidproquo-core';
|
|
2
|
+
import { DnsActionType, qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
|
+
const getProcessDnsList = (qpqConfig) => {
|
|
4
|
+
return async () => {
|
|
5
|
+
const dnsList = qpqWebServerUtils.getDnsConfigs(qpqConfig).map((dc) => dc.dnsBase);
|
|
6
|
+
return actionResult(dnsList);
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const getDnsListActionProcessor = async (qpqConfig) => ({
|
|
10
|
+
[DnsActionType.List]: getProcessDnsList(qpqConfig),
|
|
11
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getDnsActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getDnsActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDnsListActionProcessor } from './getDnsListActionProcessor';
|
|
2
|
-
export const getDnsActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
3
|
-
...(await getDnsListActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
4
|
-
});
|
|
1
|
+
import { getDnsListActionProcessor } from './getDnsListActionProcessor';
|
|
2
|
+
export const getDnsActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
3
|
+
...(await getDnsListActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
4
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getWebserverActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getWebserverActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDnsActionProcessor } from './dns';
|
|
2
|
-
export const getWebserverActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
3
|
-
...(await getDnsActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
4
|
-
});
|
|
1
|
+
import { getDnsActionProcessor } from './dns';
|
|
2
|
+
export const getWebserverActionProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
3
|
+
...(await getDnsActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
4
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getWebActionProcessors: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getWebActionProcessors: ActionProcessorListResolver;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { getCoreActionProcessor as getJsCoreActionProcessor, getWebserverActionProcessor as getJsWebserverActionProcessor, } from 'quidproquo-actionprocessor-js';
|
|
2
|
-
import { getCoreActionProcessor as getWebCoreActionProcessor, getWebserverActionProcessor as getWebWebserverActionProcessor, } from './actionProcessor';
|
|
3
|
-
export const getWebActionProcessors = async (qpqConfig, dynamicModuleLoader) => ({
|
|
4
|
-
...(await getJsCoreActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
5
|
-
...(await getJsWebserverActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
6
|
-
...(await getWebCoreActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
7
|
-
...(await getWebWebserverActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
-
|
|
1
|
+
import { getCoreActionProcessor as getJsCoreActionProcessor, getWebserverActionProcessor as getJsWebserverActionProcessor, } from 'quidproquo-actionprocessor-js';
|
|
2
|
+
import { getCoreActionProcessor as getWebCoreActionProcessor, getWebActionProcessor, getWebserverActionProcessor as getWebWebserverActionProcessor, } from './actionProcessor';
|
|
3
|
+
export const getWebActionProcessors = async (qpqConfig, dynamicModuleLoader) => ({
|
|
4
|
+
...(await getJsCoreActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
5
|
+
...(await getJsWebserverActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
6
|
+
...(await getWebCoreActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
7
|
+
...(await getWebWebserverActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
+
...(await getWebActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
9
|
+
});
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './actionProcessor';
|
|
2
|
-
export * from './getWebActionProcessors';
|
|
1
|
+
export * from './actionProcessor';
|
|
2
|
+
export * from './getWebActionProcessors';
|
package/lib/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './actionProcessor';
|
|
2
|
-
export * from './getWebActionProcessors';
|
|
1
|
+
export * from './actionProcessor';
|
|
2
|
+
export * from './getWebActionProcessors';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-actionprocessor-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.255",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -35,16 +35,17 @@
|
|
|
35
35
|
"@anthropic-ai/sdk": "^0.19.1",
|
|
36
36
|
"axios": "^1.2.1",
|
|
37
37
|
"mime-types": "^2.1.35",
|
|
38
|
-
"quidproquo-actionprocessor-js": "0.0.
|
|
39
|
-
"quidproquo-core": "0.0.
|
|
40
|
-
"quidproquo-
|
|
38
|
+
"quidproquo-actionprocessor-js": "0.0.255",
|
|
39
|
+
"quidproquo-core": "0.0.255",
|
|
40
|
+
"quidproquo-web": "0.0.255",
|
|
41
|
+
"quidproquo-webserver": "0.0.255",
|
|
41
42
|
"uuid": "^9.0.0",
|
|
42
43
|
"uuidv7": "^1.0.1"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@types/mime-types": "^2.1.1",
|
|
46
47
|
"@types/uuid": "^9.0.0",
|
|
47
|
-
"quidproquo-tsconfig": "0.0.
|
|
48
|
-
"typescript": "^
|
|
48
|
+
"quidproquo-tsconfig": "0.0.255",
|
|
49
|
+
"typescript": "^5.8.2"
|
|
49
50
|
}
|
|
50
51
|
}
|