@goldstack/template-lambda-api 0.4.41 → 0.4.42

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.
Files changed (59) hide show
  1. package/dist/src/templateLambdaApi.d.ts +0 -1
  2. package/dist/src/templateLambdaApi.d.ts.map +1 -1
  3. package/dist/src/templateLambdaApi.js +0 -71
  4. package/dist/src/templateLambdaApi.js.map +1 -1
  5. package/package.json +2 -21
  6. package/bin/template +0 -12
  7. package/bin/template.ts +0 -6
  8. package/dist/src/generateLambdaConfig.d.ts +0 -5
  9. package/dist/src/generateLambdaConfig.d.ts.map +0 -1
  10. package/dist/src/generateLambdaConfig.js +0 -28
  11. package/dist/src/generateLambdaConfig.js.map +0 -1
  12. package/dist/src/generateLambdaConfig.spec.d.ts +0 -2
  13. package/dist/src/generateLambdaConfig.spec.d.ts.map +0 -1
  14. package/dist/src/generateLambdaConfig.spec.js +0 -72
  15. package/dist/src/generateLambdaConfig.spec.js.map +0 -1
  16. package/dist/src/templateLambdaApiBuild.d.ts +0 -9
  17. package/dist/src/templateLambdaApiBuild.d.ts.map +0 -1
  18. package/dist/src/templateLambdaApiBuild.js +0 -50
  19. package/dist/src/templateLambdaApiBuild.js.map +0 -1
  20. package/dist/src/templateLambdaApiBuild.spec.d.ts +0 -2
  21. package/dist/src/templateLambdaApiBuild.spec.d.ts.map +0 -1
  22. package/dist/src/templateLambdaApiBuild.spec.js +0 -50
  23. package/dist/src/templateLambdaApiBuild.spec.js.map +0 -1
  24. package/dist/src/templateLambdaApiDeploy.d.ts +0 -10
  25. package/dist/src/templateLambdaApiDeploy.d.ts.map +0 -1
  26. package/dist/src/templateLambdaApiDeploy.js +0 -37
  27. package/dist/src/templateLambdaApiDeploy.js.map +0 -1
  28. package/dist/src/templateLambdaConsts.d.ts +0 -2
  29. package/dist/src/templateLambdaConsts.d.ts.map +0 -1
  30. package/dist/src/templateLambdaConsts.js +0 -5
  31. package/dist/src/templateLambdaConsts.js.map +0 -1
  32. package/dist/tsconfig.tsbuildinfo +0 -1
  33. package/jest.config.js +0 -12
  34. package/schemas/deployment-configuration.schema.json +0 -74
  35. package/schemas/deployment.schema.json +0 -176
  36. package/schemas/package-configuration.schema.json +0 -16
  37. package/schemas/package.schema.json +0 -244
  38. package/scripts/buildTestLambdas.ts +0 -23
  39. package/scripts/generateSchemas.ts +0 -3
  40. package/src/generateLambdaConfig.spec.ts +0 -97
  41. package/src/generateLambdaConfig.ts +0 -37
  42. package/src/templateLambdaApi.ts +0 -88
  43. package/src/templateLambdaApiBuild.spec.ts +0 -49
  44. package/src/templateLambdaApiBuild.ts +0 -72
  45. package/src/templateLambdaApiDeploy.ts +0 -54
  46. package/src/templateLambdaConsts.ts +0 -1
  47. package/src/types/LambdaApiPackage.ts +0 -90
  48. package/testData/build-test/customBuild.esbuild.config.json +0 -5
  49. package/testData/build-test/customBuild.ts +0 -10
  50. package/testData/build-test/index.ts +0 -12
  51. package/testData/routes-test/$default.ts +0 -0
  52. package/testData/routes-test/folder/nested.ts +0 -0
  53. package/testData/routes-test/folder/{pathparam}.ts +0 -0
  54. package/testData/routes-test/health/$index.ts +0 -0
  55. package/testData/routes-test/index.ts +0 -0
  56. package/testData/routes-test/resource/{path}/object.ts +0 -0
  57. package/testData/routes-test/resource.ts +0 -0
  58. package/tsconfig.generate.json +0 -12
  59. package/tsconfig.json +0 -64
@@ -1,90 +0,0 @@
1
- import { AWSDeployment } from '@goldstack/infra-aws';
2
- import { TerraformDeployment } from '@goldstack/utils-terraform';
3
- import { Deployment, DeploymentConfiguration } from '@goldstack/infra';
4
- import { Package, Configuration } from '@goldstack/utils-package';
5
-
6
- /**
7
- * The prefix to be used for names of the generated lambdas for the API endpoints.
8
- *
9
- * @title Lambda Name Prefix
10
- * @pattern ^[A-Za-z0-9-_]*$
11
- */
12
- type LambdaNamePrefix = string;
13
-
14
- /**
15
- * The domain name that the API should be deployed to (e.g. api.mysite.com)
16
- *
17
- * @title API Domain
18
- * @pattern ^[^\s]*
19
- */
20
- export type APIDomain = string;
21
-
22
- /**
23
- * The domain name of the Route 53 hosted zone that the domain for this API should be added to.
24
- *
25
- * @title Hosted Zone Domain
26
- * @pattern ^[^\s]*
27
- */
28
- export type HostedZoneDomain = string;
29
-
30
- /**
31
- * Optional URL for an UI that should be allowed to access this server.
32
- *
33
- * @title CORS Header
34
- * @pattern ^[^\s]*
35
- */
36
- export type CorsHeader = string;
37
-
38
- export interface LambdaRouteConfig {
39
- function_name: string;
40
- route: string;
41
- }
42
-
43
- export type LambdaRoutesConfig = {
44
- [key: string]: LambdaRouteConfig;
45
- };
46
-
47
- export interface ThisDeploymentConfiguration extends DeploymentConfiguration {
48
- lambdaNamePrefix?: LambdaNamePrefix;
49
- apiDomain: APIDomain;
50
- hostedZoneDomain: HostedZoneDomain;
51
- cors?: CorsHeader;
52
- lambdas: LambdaRoutesConfig;
53
- }
54
-
55
- export interface ThisDeployment
56
- extends Deployment,
57
- AWSDeployment,
58
- TerraformDeployment {
59
- configuration: ThisDeploymentConfiguration;
60
- }
61
-
62
- /**
63
- * Places where the lambda should be deployed to.
64
- *
65
- * @title Deployments
66
- */
67
- export type LambdaApiDeployments = ThisDeployment[];
68
-
69
- /**
70
- * Configures this lambda.
71
- *
72
- * @title Lambda Configuration
73
- *
74
- */
75
- export type ThisPackageConfiguration = Configuration;
76
-
77
- /**
78
- * A deployment for a lambda API.
79
- *
80
- * @title Lambda API Package
81
- */
82
- export interface ThisPackage extends Package {
83
- configuration: ThisPackageConfiguration;
84
- deployments: LambdaApiDeployments;
85
- }
86
-
87
- export { ThisDeploymentConfiguration as LambdaApiDeploymentConfiguration };
88
- export { ThisDeployment as LambdaApiDeployment };
89
- export { ThisPackageConfiguration as LambdaApiConfiguration };
90
- export { ThisPackage as LambdaApiPackage };
@@ -1,5 +0,0 @@
1
- {
2
- "footer": {
3
- "js": "// Custom config in operation"
4
- }
5
- }
@@ -1,10 +0,0 @@
1
- import { Handler, APIGatewayProxyEventV2 } from 'aws-lambda';
2
-
3
- type ProxyHandler = Handler<APIGatewayProxyEventV2, any>;
4
-
5
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
- export const handler: ProxyHandler = async (event, context) => {
7
- return {
8
- message: 'Hi',
9
- };
10
- };
@@ -1,12 +0,0 @@
1
- import { Handler, APIGatewayProxyEventV2 } from 'aws-lambda';
2
-
3
- type ProxyHandler = Handler<APIGatewayProxyEventV2, any>;
4
-
5
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
- export const handler: ProxyHandler = async (event, context) => {
7
- const message = event.queryStringParameters?.message || 'no message';
8
-
9
- return {
10
- message: `${message}`,
11
- };
12
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": [
4
- "./src/**/*"
5
- ],
6
- "compilerOptions": {
7
- "incremental": false,
8
- "declarationMap": false,
9
- "outDir": "dist",
10
- "baseUrl": "."
11
- }
12
- }
package/tsconfig.json DELETED
@@ -1,64 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "include": [
4
- "./src/**/*",
5
- "./src/**/*.json"
6
- ],
7
- "compilerOptions": {
8
- "outDir": "dist",
9
- "baseUrl": "."
10
- },
11
- "references": [
12
- {
13
- "path": "../infra"
14
- },
15
- {
16
- "path": "../infra-aws"
17
- },
18
- {
19
- "path": "../utils-aws-lambda"
20
- },
21
- {
22
- "path": "../utils-cli"
23
- },
24
- {
25
- "path": "../utils-config"
26
- },
27
- {
28
- "path": "../utils-docker"
29
- },
30
- {
31
- "path": "../utils-log"
32
- },
33
- {
34
- "path": "../utils-package"
35
- },
36
- {
37
- "path": "../utils-package-config"
38
- },
39
- {
40
- "path": "../utils-s3-deployment"
41
- },
42
- {
43
- "path": "../utils-sh"
44
- },
45
- {
46
- "path": "../utils-template"
47
- },
48
- {
49
- "path": "../utils-terraform"
50
- },
51
- {
52
- "path": "../utils-terraform-aws"
53
- },
54
- {
55
- "path": "../../../docs/packages/utils-docs-cli"
56
- },
57
- {
58
- "path": "../utils-git"
59
- },
60
- {
61
- "path": "../utils-package-config-generate"
62
- }
63
- ]
64
- }