@aesop-fables/triginta 0.1.0
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/LICENSE +21 -0
- package/README.md +24 -0
- package/lib/AwsServices.d.ts +4 -0
- package/lib/AwsServices.js +9 -0
- package/lib/Bootstrapping.d.ts +36 -0
- package/lib/Bootstrapping.js +64 -0
- package/lib/Decorators.d.ts +14 -0
- package/lib/Decorators.js +53 -0
- package/lib/EventSource.d.ts +1 -0
- package/lib/EventSource.js +2 -0
- package/lib/IHandler.d.ts +6 -0
- package/lib/IHandler.js +3 -0
- package/lib/ITrigintaRuntime.d.ts +12 -0
- package/lib/ITrigintaRuntime.js +2 -0
- package/lib/ITrigintaRuntimeFactory.d.ts +17 -0
- package/lib/ITrigintaRuntimeFactory.js +61 -0
- package/lib/RouteRegistry.d.ts +12 -0
- package/lib/RouteRegistry.js +14 -0
- package/lib/TrigintaConfig.d.ts +6 -0
- package/lib/TrigintaConfig.js +2 -0
- package/lib/TrigintaHeaders.d.ts +3 -0
- package/lib/TrigintaHeaders.js +6 -0
- package/lib/TrigintaMiddleware.d.ts +20 -0
- package/lib/TrigintaMiddleware.js +49 -0
- package/lib/TrigintaServices.d.ts +5 -0
- package/lib/TrigintaServices.js +9 -0
- package/lib/Utils.d.ts +1 -0
- package/lib/Utils.js +9 -0
- package/lib/http/HttpCultureContext.d.ts +7 -0
- package/lib/http/HttpCultureContext.js +17 -0
- package/lib/http/HttpLambda.d.ts +29 -0
- package/lib/http/HttpLambda.js +144 -0
- package/lib/http/HttpLambdaServices.d.ts +6 -0
- package/lib/http/HttpLambdaServices.js +11 -0
- package/lib/http/IConfiguredRoute.d.ts +6 -0
- package/lib/http/IConfiguredRoute.js +2 -0
- package/lib/http/IHttpEndpoint.d.ts +6 -0
- package/lib/http/IHttpEndpoint.js +2 -0
- package/lib/http/index.d.ts +1 -0
- package/lib/http/index.js +9 -0
- package/lib/http/invokeHttpHandler.d.ts +21 -0
- package/lib/http/invokeHttpHandler.js +160 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.js +72 -0
- package/lib/localization/ICultureContext.d.ts +3 -0
- package/lib/localization/ICultureContext.js +2 -0
- package/lib/localization/ILocalizationStorage.d.ts +6 -0
- package/lib/localization/ILocalizationStorage.js +2 -0
- package/lib/localization/IStringLocalizer.d.ts +4 -0
- package/lib/localization/IStringLocalizer.js +2 -0
- package/lib/localization/LocalizationServices.d.ts +5 -0
- package/lib/localization/LocalizationServices.js +8 -0
- package/lib/localization/LocalizationStorage.d.ts +4 -0
- package/lib/localization/LocalizationStorage.js +10 -0
- package/lib/localization/LocalizedString.d.ts +4 -0
- package/lib/localization/LocalizedString.js +2 -0
- package/lib/localization/StringLocalizer.d.ts +10 -0
- package/lib/localization/StringLocalizer.js +16 -0
- package/lib/localization/index.d.ts +8 -0
- package/lib/localization/index.js +32 -0
- package/lib/logging/ConsoleLogger.d.ts +10 -0
- package/lib/logging/ConsoleLogger.js +38 -0
- package/lib/logging/ILogger.d.ts +12 -0
- package/lib/logging/ILogger.js +18 -0
- package/lib/logging/ILoggerFactory.d.ts +7 -0
- package/lib/logging/ILoggerFactory.js +2 -0
- package/lib/logging/Levels.d.ts +14 -0
- package/lib/logging/Levels.js +46 -0
- package/lib/logging/LoggerFactory.d.ts +8 -0
- package/lib/logging/LoggerFactory.js +36 -0
- package/lib/logging/LoggingRegistry.d.ts +7 -0
- package/lib/logging/LoggingRegistry.js +22 -0
- package/lib/logging/LoggingServices.d.ts +5 -0
- package/lib/logging/LoggingServices.js +10 -0
- package/lib/logging/index.d.ts +7 -0
- package/lib/logging/index.js +23 -0
- package/lib/resolveEnvironmentSettings.d.ts +17 -0
- package/lib/resolveEnvironmentSettings.js +17 -0
- package/lib/s3/IS3RecordHandler.d.ts +4 -0
- package/lib/s3/IS3RecordHandler.js +2 -0
- package/lib/s3/S3Lambda.d.ts +16 -0
- package/lib/s3/S3Lambda.js +109 -0
- package/lib/s3/S3LambdaServices.d.ts +4 -0
- package/lib/s3/S3LambdaServices.js +9 -0
- package/lib/s3/invokeS3Handler.d.ts +12 -0
- package/lib/s3/invokeS3Handler.js +57 -0
- package/lib/sqs/IQueue.d.ts +8 -0
- package/lib/sqs/IQueue.js +16 -0
- package/lib/sqs/ISqsFailureHandler.d.ts +16 -0
- package/lib/sqs/ISqsFailureHandler.js +20 -0
- package/lib/sqs/ISqsMessage.d.ts +20 -0
- package/lib/sqs/ISqsMessage.js +36 -0
- package/lib/sqs/ISqsMessageHandler.d.ts +5 -0
- package/lib/sqs/ISqsMessageHandler.js +2 -0
- package/lib/sqs/MessagePublisher.d.ts +17 -0
- package/lib/sqs/MessagePublisher.js +70 -0
- package/lib/sqs/RecordMatchers.d.ts +31 -0
- package/lib/sqs/RecordMatchers.js +113 -0
- package/lib/sqs/SqsLambda.d.ts +25 -0
- package/lib/sqs/SqsLambda.js +146 -0
- package/lib/sqs/SqsLambdaServices.d.ts +11 -0
- package/lib/sqs/SqsLambdaServices.js +16 -0
- package/lib/sqs/SqsPublisher.d.ts +13 -0
- package/lib/sqs/SqsPublisher.js +55 -0
- package/lib/sqs/SqsSettings.d.ts +2 -0
- package/lib/sqs/SqsSettings.js +2 -0
- package/lib/sqs/invokeSqsHandler.d.ts +12 -0
- package/lib/sqs/invokeSqsHandler.js +57 -0
- package/lib/validation/ArrayContinuationRule.d.ts +9 -0
- package/lib/validation/ArrayContinuationRule.js +38 -0
- package/lib/validation/IConfiguredValidationRule.d.ts +5 -0
- package/lib/validation/IConfiguredValidationRule.js +2 -0
- package/lib/validation/IValidationFailureHandler.d.ts +15 -0
- package/lib/validation/IValidationFailureHandler.js +30 -0
- package/lib/validation/IValidationRule.d.ts +4 -0
- package/lib/validation/IValidationRule.js +2 -0
- package/lib/validation/IValidator.d.ts +4 -0
- package/lib/validation/IValidator.js +2 -0
- package/lib/validation/IValidatorFactory.d.ts +5 -0
- package/lib/validation/IValidatorFactory.js +2 -0
- package/lib/validation/RequiredRule.d.ts +5 -0
- package/lib/validation/RequiredRule.js +23 -0
- package/lib/validation/RuleParser.d.ts +11 -0
- package/lib/validation/RuleParser.js +36 -0
- package/lib/validation/ValidationContext.d.ts +19 -0
- package/lib/validation/ValidationContext.js +35 -0
- package/lib/validation/ValidationError.d.ts +4 -0
- package/lib/validation/ValidationError.js +11 -0
- package/lib/validation/ValidationKeys.d.ts +4 -0
- package/lib/validation/ValidationKeys.js +6 -0
- package/lib/validation/ValidationMessage.d.ts +7 -0
- package/lib/validation/ValidationMessage.js +13 -0
- package/lib/validation/ValidationMiddleware.d.ts +4 -0
- package/lib/validation/ValidationMiddleware.js +35 -0
- package/lib/validation/ValidationNotification.d.ts +22 -0
- package/lib/validation/ValidationNotification.js +86 -0
- package/lib/validation/ValidationServices.d.ts +5 -0
- package/lib/validation/ValidationServices.js +8 -0
- package/lib/validation/Validator.d.ts +12 -0
- package/lib/validation/Validator.js +46 -0
- package/lib/validation/ValidatorFactory.d.ts +9 -0
- package/lib/validation/ValidatorFactory.js +30 -0
- package/lib/validation/index.d.ts +17 -0
- package/lib/validation/index.js +43 -0
- package/package.json +69 -0
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
exports.useHttpValidation = void 0;
|
|
18
|
+
const containr_1 = require("@aesop-fables/containr");
|
|
19
|
+
const Validator_1 = require("./Validator");
|
|
20
|
+
const ValidatorFactory_1 = require("./ValidatorFactory");
|
|
21
|
+
const ValidationServices_1 = require("./ValidationServices");
|
|
22
|
+
const IValidationFailureHandler_1 = require("./IValidationFailureHandler");
|
|
23
|
+
__exportStar(require("./IValidator"), exports);
|
|
24
|
+
__exportStar(require("./Validator"), exports);
|
|
25
|
+
__exportStar(require("./IValidatorFactory"), exports);
|
|
26
|
+
__exportStar(require("./ValidatorFactory"), exports);
|
|
27
|
+
__exportStar(require("./IValidationRule"), exports);
|
|
28
|
+
__exportStar(require("./IConfiguredValidationRule"), exports);
|
|
29
|
+
__exportStar(require("./RequiredRule"), exports);
|
|
30
|
+
__exportStar(require("./RuleParser"), exports);
|
|
31
|
+
__exportStar(require("./ValidationContext"), exports);
|
|
32
|
+
__exportStar(require("./ValidationError"), exports);
|
|
33
|
+
__exportStar(require("./ValidationKeys"), exports);
|
|
34
|
+
__exportStar(require("./ValidationMessage"), exports);
|
|
35
|
+
__exportStar(require("./ValidationMiddleware"), exports);
|
|
36
|
+
__exportStar(require("./ValidationServices"), exports);
|
|
37
|
+
__exportStar(require("./ValidationNotification"), exports);
|
|
38
|
+
__exportStar(require("./IValidationFailureHandler"), exports);
|
|
39
|
+
exports.useHttpValidation = (0, containr_1.createServiceModule)('useHttpValidation', (services) => {
|
|
40
|
+
services.use(ValidationServices_1.ValidationServices.Validator, Validator_1.Validator);
|
|
41
|
+
services.use(ValidationServices_1.ValidationServices.ValidatorFactory, ValidatorFactory_1.ValidatorFactory);
|
|
42
|
+
services.use(ValidationServices_1.ValidationServices.ValidationFailureHandler, IValidationFailureHandler_1.ValidatiionFailureHandler);
|
|
43
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aesop-fables/triginta",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A lightweight framework that wraps the basic infrastructure usages of AWS Lambda (SQS, Kinesis, etc.).",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
9
|
+
"default": "./lib/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./lib/index.js",
|
|
13
|
+
"types": "./lib/index.d.ts",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "yarn run lint && rimraf ./lib && tsc --p ./tsconfig.build.json",
|
|
16
|
+
"format": "prettier --write \"src/**/*.(js|ts)\"",
|
|
17
|
+
"lint": "eslint src --ext .js,.ts",
|
|
18
|
+
"lint:fix": "eslint src --fix --ext .js,.ts",
|
|
19
|
+
"test": "jest --config jest.config.js --runInBand",
|
|
20
|
+
"test:watch": "jest --config jest.config.js --watch",
|
|
21
|
+
"prepublishOnly": "npm test && npm run lint",
|
|
22
|
+
"preversion": "npm run lint",
|
|
23
|
+
"version": "0.1.0",
|
|
24
|
+
"postversion": "git push && git push --tags"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@aesop-fables/containr": "^0.3.4",
|
|
28
|
+
"@aesop-fables/containr-testing": "^0.3.0",
|
|
29
|
+
"@middy/core": "^4.5.1",
|
|
30
|
+
"@middy/http-error-handler": "^4.5.1",
|
|
31
|
+
"@middy/http-json-body-parser": "^4.5.1",
|
|
32
|
+
"@middy/util": "^4.5.1",
|
|
33
|
+
"@types/aws-lambda": "^8.10.109",
|
|
34
|
+
"@types/jest": "^29.5.0",
|
|
35
|
+
"@types/node": "^18.16.17",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
|
37
|
+
"@typescript-eslint/parser": "5.59.11",
|
|
38
|
+
"aws-sdk": "^2.1386.0",
|
|
39
|
+
"esbuild": "^0.18.16",
|
|
40
|
+
"eslint": "8.42.0",
|
|
41
|
+
"eslint-config-prettier": "^8.5.0",
|
|
42
|
+
"eslint-plugin-jest": "27.2.3",
|
|
43
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
44
|
+
"jest": "29.6.1",
|
|
45
|
+
"jest-mock-extended": "^3.0.1",
|
|
46
|
+
"prettier": "^2.8.1",
|
|
47
|
+
"reflect-metadata": "^0.1.13",
|
|
48
|
+
"ts-jest": "29.1.0",
|
|
49
|
+
"typescript": "4.9.5"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"lib/**/*"
|
|
53
|
+
],
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@aesop-fables/containr": "0.3.x",
|
|
56
|
+
"@middy/core": "4.x",
|
|
57
|
+
"@middy/http-error-handler": "4.x",
|
|
58
|
+
"@middy/http-json-body-parser": "4.x",
|
|
59
|
+
"aws-sdk": "2.x",
|
|
60
|
+
"reflect-metadata": "0.1.x"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+ssh://git@github.com/aesop-fables/typescript-libraries.git"
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
}
|
|
69
|
+
}
|