@continuous-excellence/ze-great-dashboard-aws 0.1.13
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/client/.vite/manifest.json +11 -0
- package/client/assets/index-3-dS42M8.css +1 -0
- package/client/assets/index-BddJ8Qxp.js +3 -0
- package/client/assets/index-BddJ8Qxp.js.map +1 -0
- package/client/index.html +20 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +238 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +198 -0
- package/dist/internal-board.d.ts +33 -0
- package/dist/lambda.mjs +25017 -0
- package/dist/release.d.ts +22 -0
- package/package.json +32 -0
- package/template.yml +72 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const CORE_RUNTIME_VERSION = "1.0.0";
|
|
2
|
+
export type ReleaseMetadata = {
|
|
3
|
+
dashboardVersion: string;
|
|
4
|
+
clientAssetUrl: string;
|
|
5
|
+
serverRuntimeVersion: string;
|
|
6
|
+
supportedProviders: string[];
|
|
7
|
+
artifactChecksums: Record<string, string>;
|
|
8
|
+
runtimeCompatibility: {
|
|
9
|
+
node: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare function assembleRelease(input: {
|
|
13
|
+
boardConfigPath: string;
|
|
14
|
+
outputDir: string;
|
|
15
|
+
version: string;
|
|
16
|
+
providers?: string[];
|
|
17
|
+
assetDomain?: string;
|
|
18
|
+
}): Promise<{
|
|
19
|
+
metadata: ReleaseMetadata;
|
|
20
|
+
files: Record<string, string>;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function sha256(value: string | Uint8Array): string;
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@continuous-excellence/ze-great-dashboard-aws",
|
|
3
|
+
"version": "0.1.13",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "AWS Lambda and CloudFormation adapter for Ze Great Dashboard.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/robertfmurdock/ze-great-dashboard.git"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"ze-great-dashboard-aws": "dist/cli.js"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"client",
|
|
22
|
+
"template.yml"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"yaml": "^2.8.1",
|
|
26
|
+
"zod": "^4.4.3"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"esbuild": "^0.28.2",
|
|
30
|
+
"tsx": "^4.23.12"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/template.yml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
AWSTemplateFormatVersion: '2010-09-09'
|
|
2
|
+
Description: Provider adapter for a Ze Great Dashboard Lambda deployment
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
Name: { Type: String, Default: dashboard }
|
|
6
|
+
LambdaArtifactBucket: { Type: String }
|
|
7
|
+
LambdaArtifactKey: { Type: String }
|
|
8
|
+
DashboardVersion: { Type: String }
|
|
9
|
+
AssetBaseUrl: { Type: String, Default: https://assets.zegreatrob.com }
|
|
10
|
+
BoardConfigPath: { Type: String, Default: ./board.yaml }
|
|
11
|
+
MemorySize: { Type: Number, Default: 256, MinValue: 128 }
|
|
12
|
+
Timeout: { Type: Number, Default: 10, MinValue: 1, MaxValue: 900 }
|
|
13
|
+
LogRetentionInDays: { Type: Number, Default: 14, MinValue: 1 }
|
|
14
|
+
ReservedConcurrentExecutions: { Type: Number, Default: 0, MinValue: 0 }
|
|
15
|
+
SecretReference: { Type: String, Default: '' }
|
|
16
|
+
|
|
17
|
+
Conditions:
|
|
18
|
+
HasSecretReference: !Not [!Equals [!Ref SecretReference, '']]
|
|
19
|
+
HasReservedConcurrency: !Not [!Equals [!Ref ReservedConcurrentExecutions, 0]]
|
|
20
|
+
|
|
21
|
+
Resources:
|
|
22
|
+
ServerRole:
|
|
23
|
+
Type: AWS::IAM::Role
|
|
24
|
+
Properties:
|
|
25
|
+
AssumeRolePolicyDocument:
|
|
26
|
+
Version: '2012-10-17'
|
|
27
|
+
Statement: [{ Effect: Allow, Principal: { Service: lambda.amazonaws.com }, Action: sts:AssumeRole }]
|
|
28
|
+
ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole]
|
|
29
|
+
Policies:
|
|
30
|
+
- PolicyName: read-consumer-secret
|
|
31
|
+
PolicyDocument:
|
|
32
|
+
Version: '2012-10-17'
|
|
33
|
+
Statement:
|
|
34
|
+
- Effect: Allow
|
|
35
|
+
Action: [secretsmanager:DescribeSecret, secretsmanager:GetSecretValue]
|
|
36
|
+
Resource: !If [HasSecretReference, !Ref SecretReference, !Ref AWS::NoValue]
|
|
37
|
+
ServerLogGroup:
|
|
38
|
+
Type: AWS::Logs::LogGroup
|
|
39
|
+
Properties: { RetentionInDays: !Ref LogRetentionInDays, LogGroupName: !Sub /aws/lambda/${Name} }
|
|
40
|
+
ServerFunction:
|
|
41
|
+
Type: AWS::Lambda::Function
|
|
42
|
+
DependsOn: ServerLogGroup
|
|
43
|
+
Properties:
|
|
44
|
+
FunctionName: !Ref Name
|
|
45
|
+
Architectures: [arm64]
|
|
46
|
+
Runtime: nodejs22.x
|
|
47
|
+
Handler: index.handler
|
|
48
|
+
MemorySize: !Ref MemorySize
|
|
49
|
+
Timeout: !Ref Timeout
|
|
50
|
+
ReservedConcurrentExecutions: !If [HasReservedConcurrency, !Ref ReservedConcurrentExecutions, !Ref AWS::NoValue]
|
|
51
|
+
Role: !GetAtt ServerRole.Arn
|
|
52
|
+
Code: { S3Bucket: !Ref LambdaArtifactBucket, S3Key: !Ref LambdaArtifactKey }
|
|
53
|
+
Environment:
|
|
54
|
+
Variables:
|
|
55
|
+
ASSET_PATH: !Sub '${AssetBaseUrl}/dashboard/${DashboardVersion}'
|
|
56
|
+
BOARD_CONFIG_URL: !Ref BoardConfigPath
|
|
57
|
+
HOST: 0.0.0.0
|
|
58
|
+
SECRET_REFERENCE: !If [HasSecretReference, !Ref SecretReference, !Ref AWS::NoValue]
|
|
59
|
+
ServerUrl:
|
|
60
|
+
Type: AWS::Lambda::Url
|
|
61
|
+
Properties: { TargetFunctionArn: !GetAtt ServerFunction.Arn, AuthType: NONE }
|
|
62
|
+
ServerUrlPermission:
|
|
63
|
+
Type: AWS::Lambda::Permission
|
|
64
|
+
Properties: { FunctionName: !Ref ServerFunction, Action: lambda:InvokeFunctionUrl, Principal: '*', FunctionUrlAuthType: NONE }
|
|
65
|
+
ServerInvokePermission:
|
|
66
|
+
Type: AWS::Lambda::Permission
|
|
67
|
+
Properties: { FunctionName: !Ref ServerFunction, Action: lambda:InvokeFunction, Principal: '*', InvokedViaFunctionUrl: true }
|
|
68
|
+
|
|
69
|
+
Outputs:
|
|
70
|
+
ServerUrl: { Value: !GetAtt ServerUrl.FunctionUrl }
|
|
71
|
+
ServerFunctionName: { Value: !Ref ServerFunction }
|
|
72
|
+
AssetPath: { Value: !Sub '${AssetBaseUrl}/dashboard/${DashboardVersion}' }
|