@stacksjs/cloud 0.57.3 → 0.58.19

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/README.md CHANGED
@@ -5,8 +5,16 @@ This package assists you in setting up & maintaining your application's cloud in
5
5
  ## ☘️ Features
6
6
 
7
7
  - Cloud Creation & Management
8
- - Domain Management
8
+ - Web Application Firewall (WAF) Management
9
+ - CDN Management
10
+ - SSL Certificate Management
11
+ - Domain & DNS Management
9
12
  - Stacks Buddy Commands
13
+ - Serverless Email Server
14
+
15
+ ### Notes
16
+
17
+ - the maximum email size (including headers) is 40 MB. Emails larger than that bounce
10
18
 
11
19
  ### TODO
12
20
 
@@ -15,7 +23,7 @@ This package assists you in setting up & maintaining your application's cloud in
15
23
  ## 🤖 Usage
16
24
 
17
25
  ```bash
18
- pnpm i -D @stacksjs/cloud
26
+ bun install -d @stacksjs/cloud
19
27
  ```
20
28
 
21
29
  Now, you can use it in your project:
@@ -31,7 +39,7 @@ Learn more in the docs.
31
39
  ## 🧪 Testing
32
40
 
33
41
  ```bash
34
- pnpm test
42
+ bun test
35
43
  ```
36
44
 
37
45
  ## 📈 Changelog
@@ -50,10 +58,10 @@ For help, discussion about best practices, or any other conversation that would
50
58
 
51
59
  For casual chit-chat with others using this package:
52
60
 
53
- [Join the Stacks Discord Server](https://discord.ow3.org)
61
+ [Join the Stacks Discord Server](https://discord.gg/stacksjs)
54
62
 
55
63
  ## 📄 License
56
64
 
57
65
  The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
58
66
 
59
- Made with ❤️
67
+ Made with 💙
@@ -0,0 +1,27 @@
1
+ // src/edge/origin-request.ts
2
+ function handler(event, context, callback) {
3
+ const { request } = event.Records[0].cf;
4
+ const { uri } = request;
5
+ const { suffix, appendToDirs } = config;
6
+ if (suffix && uri.match(regexSuffixless)) {
7
+ request.uri = uri + suffix;
8
+ callback(null, request);
9
+ return;
10
+ }
11
+ if (appendToDirs && uri.match(regexTrailingSlash)) {
12
+ request.uri = uri + appendToDirs;
13
+ callback(null, request);
14
+ return;
15
+ }
16
+ callback(null, request);
17
+ }
18
+ var config = {
19
+ suffix: ".html",
20
+ appendToDirs: "index.html",
21
+ removeTrailingSlash: false
22
+ };
23
+ var regexSuffixless = /\/[^/.]+$/;
24
+ var regexTrailingSlash = /.+\/$/;
25
+ export {
26
+ handler
27
+ };
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@stacksjs/cloud",
3
3
  "type": "module",
4
- "version": "0.57.3",
5
- "packageManager": "pnpm@8.6.6",
4
+ "version": "0.58.19",
6
5
  "description": "The Stacks cloud/serverless integration & implementation.",
7
6
  "author": "Chris Breuer",
8
7
  "license": "MIT",
9
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
10
- "homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/cloud#readme",
9
+ "homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/src/cloud#readme",
11
10
  "repository": {
12
11
  "type": "git",
13
12
  "url": "git+https://github.com/stacksjs/stacks.git",
14
- "directory": "./.stacks/core/cloud"
13
+ "directory": "./storage/framework/core/src/cloud"
15
14
  },
16
15
  "bugs": {
17
16
  "url": "https://github.com/stacksjs/stacks/issues"
@@ -22,44 +21,99 @@
22
21
  "infrastructure as code",
23
22
  "automation",
24
23
  "aws",
25
- "google cloud",
26
24
  "stacks"
27
25
  ],
28
26
  "exports": {
29
27
  ".": {
30
- "types": "./dist/index.d.ts",
31
- "import": "./dist/index.mjs"
28
+ "bun": "./src/index.ts",
29
+ "import": "./dist/index.js"
30
+ },
31
+ "./*": {
32
+ "bun": "./src/*",
33
+ "import": "./dist/*"
32
34
  }
33
35
  },
34
- "module": "dist/index.mjs",
36
+ "module": "dist/index.js",
35
37
  "types": "dist/index.d.ts",
36
38
  "contributors": [
37
- "Chris Breuer <chris@ow3.org>"
39
+ "Chris Breuer <chris@stacksjs.org>"
38
40
  ],
39
41
  "files": [
40
- "dist",
41
- "README.md"
42
+ "README.md",
43
+ "dist"
42
44
  ],
45
+ "scripts": {
46
+ "bootstrap": "bunx cdk bootstrap",
47
+ "deploy": "cd ../.. && bun run build && cd ../docs && bun run build && cd ../core/src/cloud && bunx cdk deploy --require-approval never",
48
+ "build": "bun build.ts",
49
+ "build-edge": "bun build ./src/edge/origin-request.ts --outfile ./dist/origin-request.js",
50
+ "build-layer": "bun ./src/runtime/scripts/build-layer.ts",
51
+ "publish-layer": "bun ./src/runtime/scripts/publish-layer.ts",
52
+ "build-server": "echo 'bun --bun build-server.ts'",
53
+ "typecheck": "bun --bun tsc --noEmit",
54
+ "prepublishOnly": "bun run build"
55
+ },
43
56
  "peerDependencies": {
44
- "@aws-cdk/core": "^1.203.0",
45
- "@aws-lambda-powertools/logger": "^1.11.0",
46
- "@aws-lambda-powertools/metrics": "^1.11.0",
47
- "@aws-lambda-powertools/tracer": "^1.11.0",
48
- "@stacksjs/dns": "0.57.3"
57
+ "@aws-sdk/client-bedrock": "^3.490.0",
58
+ "@aws-sdk/client-cloudformation": "^3.490.0",
59
+ "@aws-sdk/client-cloudfront": "^3.490.0",
60
+ "@aws-sdk/client-cloudwatch-logs": "^3.490.0",
61
+ "@aws-sdk/client-ec2": "^3.490.0",
62
+ "@aws-sdk/client-efs": "^3.490.0",
63
+ "@aws-sdk/client-iam": "^3.490.0",
64
+ "@aws-sdk/client-lambda": "^3.490.0",
65
+ "@aws-sdk/client-route-53-domains": "^3.490.0",
66
+ "@aws-sdk/client-s3": "^3.490.0",
67
+ "@aws-sdk/client-ses": "^3.490.0",
68
+ "@aws-sdk/client-sesv2": "^3.490.0",
69
+ "@aws-sdk/client-ssm": "^3.490.0",
70
+ "@aws-sdk/lib-dynamodb": "^3.490.0",
71
+ "@stacksjs/config": "workspace:*",
72
+ "@stacksjs/env": "workspace:*",
73
+ "@stacksjs/logging": "workspace:*",
74
+ "@stacksjs/path": "workspace:*",
75
+ "@stacksjs/router": "workspace:*",
76
+ "@stacksjs/storage": "workspace:*",
77
+ "@stacksjs/strings": "workspace:*",
78
+ "@stacksjs/utils": "workspace:*",
79
+ "@stacksjs/validation": "workspace:*"
49
80
  },
50
81
  "dependencies": {
51
- "@aws-cdk/core": "^1.203.0",
52
- "@aws-lambda-powertools/logger": "^1.11.0",
53
- "@aws-lambda-powertools/metrics": "^1.11.0",
54
- "@aws-lambda-powertools/tracer": "^1.11.0",
55
- "@stacksjs/dns": "0.57.3"
82
+ "@aws-sdk/client-bedrock": "^3.490.0",
83
+ "@aws-sdk/client-cloudformation": "^3.490.0",
84
+ "@aws-sdk/client-cloudfront": "^3.490.0",
85
+ "@aws-sdk/client-cloudwatch-logs": "^3.490.0",
86
+ "@aws-sdk/client-dynamodb": "3.490.0",
87
+ "@aws-sdk/client-ec2": "^3.490.0",
88
+ "@aws-sdk/client-efs": "^3.490.0",
89
+ "@aws-sdk/client-iam": "^3.490.0",
90
+ "@aws-sdk/client-lambda": "^3.490.0",
91
+ "@aws-sdk/client-route-53-domains": "^3.490.0",
92
+ "@aws-sdk/client-s3": "^3.490.0",
93
+ "@aws-sdk/client-ses": "^3.490.0",
94
+ "@aws-sdk/client-sesv2": "^3.490.0",
95
+ "@aws-sdk/client-ssm": "^3.490.0",
96
+ "@stacksjs/config": "workspace:*",
97
+ "@stacksjs/dns": "workspace:*",
98
+ "@stacksjs/env": "workspace:*",
99
+ "@stacksjs/logging": "workspace:*",
100
+ "@stacksjs/path": "workspace:*",
101
+ "@stacksjs/router": "workspace:*",
102
+ "@stacksjs/storage": "workspace:*",
103
+ "@stacksjs/utils": "workspace:*",
104
+ "@stacksjs/validation": "workspace:*",
105
+ "aws-cdk": "^2.119.0",
106
+ "aws-cdk-lib": "^2.119.0",
107
+ "aws4fetch": "^1.0.17",
108
+ "constructs": "^10.3.0"
56
109
  },
57
110
  "devDependencies": {
58
- "@stacksjs/development": "0.57.3"
59
- },
60
- "scripts": {
61
- "build": "unbuild",
62
- "dev": "unbuild --stub",
63
- "typecheck": "tsc --noEmit"
111
+ "@oclif/plugin-plugins": "^4.1.15",
112
+ "@stacksjs/cli": "workspace:*",
113
+ "@stacksjs/development": "workspace:*",
114
+ "@stacksjs/env": "workspace:*",
115
+ "jszip": "^3.10.1",
116
+ "oclif": "^4.3.1",
117
+ "source-map-support": "^0.5.21"
64
118
  }
65
- }
119
+ }
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- # MIT License
2
-
3
- Copyright (c) 2022 Open Web Foundation
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,4 +0,0 @@
1
- import { logger } from './logger';
2
- import { metrics } from './metrics';
3
- import { tracer } from './tracer';
4
- export { logger, metrics, tracer, };
@@ -1,8 +0,0 @@
1
- import { logger } from "./logger.mjs";
2
- import { metrics } from "./metrics.mjs";
3
- import { tracer } from "./tracer.mjs";
4
- export {
5
- logger,
6
- metrics,
7
- tracer
8
- };
@@ -1,2 +0,0 @@
1
- import { Logger } from '@aws-lambda-powertools/logger';
2
- export declare const logger: Logger;
@@ -1,7 +0,0 @@
1
- import { Logger } from "@aws-lambda-powertools/logger";
2
- export const logger = new Logger({
3
- persistentLogAttributes: {
4
- aws_account_id: process.env.AWS_ACCOUNT_ID || "N/A",
5
- aws_region: process.env.AWS_REGION || "N/A"
6
- }
7
- });
@@ -1,2 +0,0 @@
1
- import { Metrics } from '@aws-lambda-powertools/metrics';
2
- export declare const metrics: Metrics;
@@ -1,7 +0,0 @@
1
- import { Metrics } from "@aws-lambda-powertools/metrics";
2
- export const metrics = new Metrics({
3
- defaultDimensions: {
4
- aws_account_id: process.env.AWS_ACCOUNT_ID || "N/A",
5
- aws_region: process.env.AWS_REGION || "N/A"
6
- }
7
- });
@@ -1,5 +0,0 @@
1
- import type { Construct, StackProps } from '@aws-cdk/core';
2
- import { Stack } from '@aws-cdk/core';
3
- export declare class ParentStack extends Stack {
4
- constructor(scope: Construct, id: string, props?: StackProps);
5
- }
@@ -1,8 +0,0 @@
1
- import { Stack } from "@aws-cdk/core";
2
- import { DnsStack } from "@stacksjs/dns";
3
- export class ParentStack extends Stack {
4
- constructor(scope, id, props) {
5
- super(scope, id, props);
6
- new DnsStack(this, "Nested1");
7
- }
8
- }
@@ -1,2 +0,0 @@
1
- import { Tracer } from '@aws-lambda-powertools/tracer';
2
- export declare const tracer: Tracer;
@@ -1,2 +0,0 @@
1
- import { Tracer } from "@aws-lambda-powertools/tracer";
2
- export const tracer = new Tracer();
@@ -1 +0,0 @@
1
- export * as aws from './aws';
@@ -1 +0,0 @@
1
- export * as aws from "./aws/index.mjs";
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './drivers';
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- export * from "./drivers/index.mjs";
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
@@ -1 +0,0 @@
1
- # download & extract nodejs