@stacksjs/cloud 0.58.59 → 0.58.61
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/dist/index.js
CHANGED
|
@@ -890,8 +890,8 @@ class DocsStack {
|
|
|
890
890
|
description: "The Stacks Origin Request function that prettifies URLs",
|
|
891
891
|
runtime: lambda3.Runtime.NODEJS_18_X,
|
|
892
892
|
handler: "dist/origin-request.handler",
|
|
893
|
-
code: lambda3.Code.fromAsset(p3.
|
|
894
|
-
assetHash: originRequestFunctionHash,
|
|
893
|
+
code: lambda3.Code.fromAsset(p3.frameworkCloudPath("dist.zip"), {
|
|
894
|
+
assetHash: originRequestFunctionHash(),
|
|
895
895
|
assetHashType: AssetHashType.CUSTOM
|
|
896
896
|
})
|
|
897
897
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cloud",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.61",
|
|
5
5
|
"description": "The Stacks cloud/serverless integration & implementation.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@stacksjs/development": "latest",
|
|
114
114
|
"@stacksjs/env": "latest",
|
|
115
115
|
"jszip": "^3.10.1",
|
|
116
|
-
"oclif": "^4.4.
|
|
116
|
+
"oclif": "^4.4.11",
|
|
117
117
|
"source-map-support": "^0.5.21"
|
|
118
118
|
}
|
|
119
119
|
}
|
package/src/cloud/dashboard.ts
CHANGED
|
@@ -1,85 +1,86 @@
|
|
|
1
|
-
/* eslint-disable no-new */
|
|
2
|
-
// TODO: finish this cloudwatch dashboard
|
|
3
|
-
// import type { aws_lambda as lambda } from 'aws-cdk-lib'
|
|
4
|
-
import { Aws, CfnOutput as Output, aws_cloudwatch as cloudwatch } from 'aws-cdk-lib'
|
|
5
|
-
import type { Construct } from 'constructs'
|
|
6
|
-
import type { NestedCloudProps } from '../types'
|
|
7
|
-
|
|
8
|
-
export interface DashboardStackProps extends NestedCloudProps {
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class DashboardStack {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
1
|
+
// /* eslint-disable no-new */
|
|
2
|
+
// // TODO: finish this cloudwatch dashboard
|
|
3
|
+
// // import type { aws_lambda as lambda } from 'aws-cdk-lib'
|
|
4
|
+
// import { Aws, CfnOutput as Output, aws_cloudwatch as cloudwatch } from 'aws-cdk-lib'
|
|
5
|
+
// import type { Construct } from 'constructs'
|
|
6
|
+
// import type { NestedCloudProps } from '../types'
|
|
7
|
+
//
|
|
8
|
+
// export interface DashboardStackProps extends NestedCloudProps {
|
|
9
|
+
// dashboardName?: string
|
|
10
|
+
// }
|
|
11
|
+
//
|
|
12
|
+
// export class DashboardStack {
|
|
13
|
+
// // lambdaFunction: lambda.Function
|
|
14
|
+
// dashboard: cloudwatch.Dashboard
|
|
15
|
+
//
|
|
16
|
+
// constructor(scope: Construct, props: DashboardStackProps) {
|
|
17
|
+
// const dashboardName = props.dashboardName || 'StacksDashboard'
|
|
18
|
+
//
|
|
19
|
+
// // Create Sample Lambda Function which will create metrics
|
|
20
|
+
// // this.lambdaFunction = new Function(this, 'SampleLambda', {
|
|
21
|
+
// // handler: 'lambda-handler.handler',
|
|
22
|
+
// // runtime: Runtime.PYTHON_3_7,
|
|
23
|
+
// // code: new AssetCode(`./lambda`),
|
|
24
|
+
// // memorySize: 512,
|
|
25
|
+
// // timeout: Duration.seconds(10),
|
|
26
|
+
// // })
|
|
27
|
+
//
|
|
28
|
+
// // Create CloudWatch Dashboard
|
|
29
|
+
// this.dashboard = new cloudwatch.Dashboard(scope, 'SampleLambdaDashboard', {
|
|
30
|
+
// dashboardName,
|
|
31
|
+
// })
|
|
32
|
+
//
|
|
33
|
+
// // Create Title for Dashboard
|
|
34
|
+
// this.dashboard.addWidgets(new cloudwatch.TextWidget({
|
|
35
|
+
// markdown: `# Dashboard: `,
|
|
36
|
+
// // markdown: `# Dashboard: ${this.lambdaFunction.functionName}`,
|
|
37
|
+
// height: 1,
|
|
38
|
+
// width: 24,
|
|
39
|
+
// }))
|
|
40
|
+
//
|
|
41
|
+
// // Create CloudWatch Dashboard Widgets: Errors, Invocations, Duration, Throttles
|
|
42
|
+
// this.dashboard.addWidgets(new cloudwatch.GraphWidget({
|
|
43
|
+
// title: 'Invocations',
|
|
44
|
+
// left: [this.lambdaFunction.metricInvocations()],
|
|
45
|
+
// width: 24,
|
|
46
|
+
// }))
|
|
47
|
+
//
|
|
48
|
+
// this.dashboard.addWidgets(new cloudwatch.GraphWidget({
|
|
49
|
+
// title: 'Errors',
|
|
50
|
+
// left: [this.lambdaFunction.metricErrors()],
|
|
51
|
+
// width: 24,
|
|
52
|
+
// }))
|
|
53
|
+
//
|
|
54
|
+
// this.dashboard.addWidgets(new cloudwatch.GraphWidget({
|
|
55
|
+
// title: 'Duration',
|
|
56
|
+
// left: [this.lambdaFunction.metricDuration()],
|
|
57
|
+
// width: 24,
|
|
58
|
+
// }))
|
|
59
|
+
//
|
|
60
|
+
// this.dashboard.addWidgets(new cloudwatch.GraphWidget({
|
|
61
|
+
// title: 'Throttles',
|
|
62
|
+
// left: [this.lambdaFunction.metricThrottles()],
|
|
63
|
+
// width: 24,
|
|
64
|
+
// }))
|
|
65
|
+
//
|
|
66
|
+
// // Create Widget to show last 20 Log Entries
|
|
67
|
+
// this.dashboard.addWidgets(new cloudwatch.LogQueryWidget({
|
|
68
|
+
// logGroupNames: [this.lambdaFunction.logGroup.logGroupName],
|
|
69
|
+
// queryLines: [
|
|
70
|
+
// 'fields @timestamp, @message',
|
|
71
|
+
// 'sort @timestamp desc',
|
|
72
|
+
// 'limit 20',
|
|
73
|
+
// ],
|
|
74
|
+
// width: 24,
|
|
75
|
+
// }))
|
|
76
|
+
//
|
|
77
|
+
// // Generate Output
|
|
78
|
+
// const cloudwatchDashboardURL = `https://${Aws.REGION}.console.aws.amazon.com/cloudwatch/home?region=${Aws.REGION}#dashboards:name=${dashboardName}`
|
|
79
|
+
//
|
|
80
|
+
// new Output(scope, 'DashboardOutput', {
|
|
81
|
+
// value: cloudwatchDashboardURL,
|
|
82
|
+
// description: 'The CloudWatch Dashboard URL',
|
|
83
|
+
// exportName: 'StacksDashboardURL',
|
|
84
|
+
// })
|
|
85
|
+
// }
|
|
86
|
+
// }
|
package/src/cloud/docs.ts
CHANGED
|
@@ -28,8 +28,8 @@ export class DocsStack {
|
|
|
28
28
|
description: 'The Stacks Origin Request function that prettifies URLs',
|
|
29
29
|
runtime: lambda.Runtime.NODEJS_18_X,
|
|
30
30
|
handler: 'dist/origin-request.handler',
|
|
31
|
-
code: lambda.Code.fromAsset(p.
|
|
32
|
-
assetHash: originRequestFunctionHash,
|
|
31
|
+
code: lambda.Code.fromAsset(p.frameworkCloudPath('dist.zip'), {
|
|
32
|
+
assetHash: originRequestFunctionHash(),
|
|
33
33
|
assetHashType: AssetHashType.CUSTOM,
|
|
34
34
|
}),
|
|
35
35
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stacks-router-layer",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.61",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@stacksjs/router": "^0.58.
|
|
13
|
+
"@stacksjs/router": "^0.58.59"
|
|
14
14
|
}
|
|
15
15
|
}
|