@phila/cli 0.0.1
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/commands/config.d.ts +30 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +135 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/deploy.d.ts +2 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +224 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/destroy.d.ts +3 -0
- package/dist/commands/destroy.d.ts.map +1 -0
- package/dist/commands/destroy.js +110 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/init.d.ts +25 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +513 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/map.d.ts +8 -0
- package/dist/commands/map.d.ts.map +1 -0
- package/dist/commands/map.js +186 -0
- package/dist/commands/map.js.map +1 -0
- package/dist/commands/ship.d.ts +20 -0
- package/dist/commands/ship.d.ts.map +1 -0
- package/dist/commands/ship.js +445 -0
- package/dist/commands/ship.js.map +1 -0
- package/dist/commands/templates.d.ts +3 -0
- package/dist/commands/templates.d.ts.map +1 -0
- package/dist/commands/templates.js +120 -0
- package/dist/commands/templates.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/_shared/city.config.json.tmpl +24 -0
- package/dist/templates/_shared/dotnet-api/Api.csproj +17 -0
- package/dist/templates/_shared/dotnet-api/Program.cs +58 -0
- package/dist/templates/_shared/dotnet-api/aws-lambda-tools-defaults.json +10 -0
- package/dist/templates/_shared/dotnet-api/obj/Api.csproj.nuget.dgspec.json +80 -0
- package/dist/templates/_shared/dotnet-api/obj/Api.csproj.nuget.g.props +15 -0
- package/dist/templates/_shared/dotnet-api/obj/Api.csproj.nuget.g.targets +2 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/_shared/dotnet-api/obj/Debug/net8.0/Api.csproj.AssemblyReference.cache +0 -0
- package/dist/templates/_shared/dotnet-api/obj/project.assets.json +708 -0
- package/dist/templates/_shared/dotnet-api/obj/project.nuget.cache +35 -0
- package/dist/templates/_shared/dotnet-api-postgres/Api.csproj +19 -0
- package/dist/templates/_shared/dotnet-api-postgres/Program.cs +167 -0
- package/dist/templates/_shared/dotnet-api-postgres/aws-lambda-tools-defaults.json +10 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Api.csproj.nuget.dgspec.json +88 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Api.csproj.nuget.g.props +15 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Api.csproj.nuget.g.targets +2 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/project.assets.json +106 -0
- package/dist/templates/_shared/dotnet-api-postgres/obj/project.nuget.cache +15 -0
- package/dist/templates/_shared/nuxt-frontend/app.vue +3 -0
- package/dist/templates/_shared/nuxt-frontend/nuxt.config.ts +25 -0
- package/dist/templates/_shared/nuxt-frontend/package.json.tmpl +19 -0
- package/dist/templates/_shared/nuxt-frontend/pages/index.vue +6 -0
- package/dist/templates/_shared/nuxt-frontend/public/.gitkeep +0 -0
- package/dist/templates/_shared/nuxt-frontend/tsconfig.json +3 -0
- package/dist/templates/_shared/webapp-cdk-package.json.tmpl +23 -0
- package/dist/templates/_shared/webapp-frontend/app.vue +3 -0
- package/dist/templates/_shared/webapp-frontend/nuxt.config.ts +25 -0
- package/dist/templates/_shared/webapp-frontend/package.json.tmpl +19 -0
- package/dist/templates/_shared/webapp-frontend/pages/index.vue +7 -0
- package/dist/templates/_shared/webapp-frontend/public/.gitkeep +0 -0
- package/dist/templates/_shared/webapp-frontend/tsconfig.json +3 -0
- package/dist/templates/lambda-api-nodejs/README.md.tmpl +203 -0
- package/dist/templates/lambda-api-nodejs/apps/__lambdaName__/index.ts +89 -0
- package/dist/templates/lambda-api-nodejs/apps/__lambdaName__/package.json +17 -0
- package/dist/templates/lambda-api-nodejs/apps/__lambdaName__/tsconfig.json +8 -0
- package/dist/templates/lambda-api-nodejs/cdk/app.ts.tmpl +53 -0
- package/dist/templates/lambda-api-nodejs/cdk/cdk.json +68 -0
- package/dist/templates/lambda-api-nodejs/cdk/package.json +23 -0
- package/dist/templates/lambda-api-nodejs/cdk/tsconfig.json +9 -0
- package/dist/templates/lambda-api-nodejs/package.json.tmpl +20 -0
- package/dist/templates/lambda-api-nodejs/tsconfig.json +27 -0
- package/dist/templates/lambda-dynamo-api/README.md.tmpl +184 -0
- package/dist/templates/lambda-dynamo-api/apps/__lambdaName__/index.ts +109 -0
- package/dist/templates/lambda-dynamo-api/apps/__lambdaName__/package.json +19 -0
- package/dist/templates/lambda-dynamo-api/apps/__lambdaName__/tsconfig.json +24 -0
- package/dist/templates/lambda-dynamo-api/cdk/app.ts.tmpl +59 -0
- package/dist/templates/lambda-dynamo-api/cdk/cdk.json +73 -0
- package/dist/templates/lambda-dynamo-api/cdk/package.json +23 -0
- package/dist/templates/lambda-dynamo-api/cdk/tsconfig.json +14 -0
- package/dist/templates/lambda-dynamo-api/package.json.tmpl +20 -0
- package/dist/templates/lambda-dynamo-api/tsconfig.json +27 -0
- package/dist/templates/lambda-postgres-api/README.md.tmpl +234 -0
- package/dist/templates/lambda-postgres-api/apps/__lambdaName__/index.ts +76 -0
- package/dist/templates/lambda-postgres-api/apps/__lambdaName__/package.json +18 -0
- package/dist/templates/lambda-postgres-api/apps/__lambdaName__/tsconfig.json +26 -0
- package/dist/templates/lambda-postgres-api/cdk/app.ts.tmpl +55 -0
- package/dist/templates/lambda-postgres-api/cdk/cdk.json +4 -0
- package/dist/templates/lambda-postgres-api/cdk/package.json +23 -0
- package/dist/templates/lambda-postgres-api/cdk/tsconfig.json +25 -0
- package/dist/templates/lambda-postgres-api/package.json.tmpl +20 -0
- package/dist/templates/lambda-postgres-api/tsconfig.json +11 -0
- package/dist/templates/static-site/README.md.tmpl +72 -0
- package/dist/templates/static-site/cdk/app.ts.tmpl +50 -0
- package/dist/templates/static-site/cdk/cdk.json +68 -0
- package/dist/templates/static-site/cdk/package.json +23 -0
- package/dist/templates/static-site/cdk/tsconfig.json +9 -0
- package/dist/templates/static-site/frontend/.gitkeep +0 -0
- package/dist/templates/static-site/frontend/README.md +41 -0
- package/dist/templates/static-site/frontend/package.json +9 -0
- package/dist/templates/static-site/package.json.tmpl +19 -0
- package/dist/templates/static-site/tsconfig.json +27 -0
- package/dist/templates/webapp-ecs-dotnet/README.md.tmpl +213 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/Api.csproj +12 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/Dockerfile +30 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/Program.cs +85 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Api.csproj.nuget.dgspec.json +70 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Api.csproj.nuget.g.props +15 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Api.csproj.nuget.g.targets +2 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/project.assets.json +75 -0
- package/dist/templates/webapp-ecs-dotnet/apps/api/obj/project.nuget.cache +8 -0
- package/dist/templates/webapp-ecs-dotnet/cdk/app.ts.tmpl +60 -0
- package/dist/templates/webapp-ecs-dotnet/cdk/cdk.json +38 -0
- package/dist/templates/webapp-ecs-dotnet/cdk/tsconfig.json +25 -0
- package/dist/templates/webapp-ecs-dotnet/package.json.tmpl +23 -0
- package/dist/templates/webapp-ecs-dotnet/tsconfig.json +26 -0
- package/dist/templates/webapp-ecs-node/README.md.tmpl +207 -0
- package/dist/templates/webapp-ecs-node/apps/api/Dockerfile +33 -0
- package/dist/templates/webapp-ecs-node/apps/api/index.ts +74 -0
- package/dist/templates/webapp-ecs-node/apps/api/package.json +22 -0
- package/dist/templates/webapp-ecs-node/apps/api/tsconfig.json +18 -0
- package/dist/templates/webapp-ecs-node/cdk/app.ts.tmpl +60 -0
- package/dist/templates/webapp-ecs-node/cdk/cdk.json +38 -0
- package/dist/templates/webapp-ecs-node/cdk/tsconfig.json +25 -0
- package/dist/templates/webapp-ecs-node/package.json.tmpl +25 -0
- package/dist/templates/webapp-ecs-node/tsconfig.json +26 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/README.md.tmpl +271 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/Api.csproj +17 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/Dockerfile +30 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/Program.cs +194 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Api.csproj.nuget.dgspec.json +80 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Api.csproj.nuget.g.props +19 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Api.csproj.nuget.g.targets +6 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.csproj.AssemblyReference.cache +0 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/project.assets.json +395 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/apps/api/obj/project.nuget.cache +49 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/cdk/app.ts.tmpl +62 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/cdk/cdk.json +38 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/cdk/tsconfig.json +25 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/package.json.tmpl +23 -0
- package/dist/templates/webapp-ecs-postgres-dotnet/tsconfig.json +26 -0
- package/dist/templates/webapp-ecs-postgres-node/README.md.tmpl +261 -0
- package/dist/templates/webapp-ecs-postgres-node/apps/api/Dockerfile +33 -0
- package/dist/templates/webapp-ecs-postgres-node/apps/api/index.ts +160 -0
- package/dist/templates/webapp-ecs-postgres-node/apps/api/package.json +25 -0
- package/dist/templates/webapp-ecs-postgres-node/apps/api/tsconfig.json +18 -0
- package/dist/templates/webapp-ecs-postgres-node/cdk/app.ts.tmpl +62 -0
- package/dist/templates/webapp-ecs-postgres-node/cdk/cdk.json +38 -0
- package/dist/templates/webapp-ecs-postgres-node/cdk/tsconfig.json +25 -0
- package/dist/templates/webapp-ecs-postgres-node/package.json.tmpl +25 -0
- package/dist/templates/webapp-ecs-postgres-node/tsconfig.json +26 -0
- package/dist/templates/webapp-lambda-dotnet/README.md.tmpl +188 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/Api.csproj +17 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/Program.cs +58 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/aws-lambda-tools-defaults.json +10 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Api.csproj.nuget.dgspec.json +80 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Api.csproj.nuget.g.props +15 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Api.csproj.nuget.g.targets +2 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.csproj.AssemblyReference.cache +0 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/project.assets.json +708 -0
- package/dist/templates/webapp-lambda-dotnet/apps/api/obj/project.nuget.cache +35 -0
- package/dist/templates/webapp-lambda-dotnet/cdk/app.ts.tmpl +59 -0
- package/dist/templates/webapp-lambda-dotnet/cdk/cdk.json +68 -0
- package/dist/templates/webapp-lambda-dotnet/cdk/tsconfig.json +9 -0
- package/dist/templates/webapp-lambda-dotnet/package.json.tmpl +23 -0
- package/dist/templates/webapp-lambda-dotnet/tsconfig.json +27 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/README.md.tmpl +223 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/Api.csproj +18 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/Program.cs +155 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/aws-lambda-tools-defaults.json +10 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Api.csproj.nuget.dgspec.json +84 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Api.csproj.nuget.g.props +19 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Api.csproj.nuget.g.targets +2 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/Debug/net8.0/Api.csproj.AssemblyReference.cache +0 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/project.assets.json +989 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/apps/api/obj/project.nuget.cache +223 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/cdk/app.ts.tmpl +65 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/cdk/cdk.json +68 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/cdk/tsconfig.json +9 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/package.json.tmpl +23 -0
- package/dist/templates/webapp-lambda-dynamo-dotnet/tsconfig.json +27 -0
- package/dist/templates/webapp-lambda-dynamo-node/README.md.tmpl +189 -0
- package/dist/templates/webapp-lambda-dynamo-node/apps/api/index.ts +109 -0
- package/dist/templates/webapp-lambda-dynamo-node/apps/api/package.json +19 -0
- package/dist/templates/webapp-lambda-dynamo-node/apps/api/tsconfig.json +8 -0
- package/dist/templates/webapp-lambda-dynamo-node/cdk/app.ts.tmpl +65 -0
- package/dist/templates/webapp-lambda-dynamo-node/cdk/cdk.json +68 -0
- package/dist/templates/webapp-lambda-dynamo-node/cdk/tsconfig.json +9 -0
- package/dist/templates/webapp-lambda-dynamo-node/package.json.tmpl +24 -0
- package/dist/templates/webapp-lambda-dynamo-node/tsconfig.json +27 -0
- package/dist/templates/webapp-lambda-node/README.md.tmpl +179 -0
- package/dist/templates/webapp-lambda-node/apps/api/index.ts +100 -0
- package/dist/templates/webapp-lambda-node/apps/api/package.json +17 -0
- package/dist/templates/webapp-lambda-node/apps/api/tsconfig.json +8 -0
- package/dist/templates/webapp-lambda-node/cdk/app.ts.tmpl +59 -0
- package/dist/templates/webapp-lambda-node/cdk/cdk.json +68 -0
- package/dist/templates/webapp-lambda-node/cdk/tsconfig.json +9 -0
- package/dist/templates/webapp-lambda-node/package.json.tmpl +24 -0
- package/dist/templates/webapp-lambda-node/tsconfig.json +27 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/README.md.tmpl +240 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/Api.csproj +19 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/Program.cs +167 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/aws-lambda-tools-defaults.json +10 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Api.csproj.nuget.dgspec.json +88 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Api.csproj.nuget.g.props +15 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Api.csproj.nuget.g.targets +2 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfo.cs +22 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache +1 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.GeneratedMSBuildEditorConfig.editorconfig +19 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.GlobalUsings.g.cs +17 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/Debug/net8.0/Api.assets.cache +0 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/project.assets.json +106 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/apps/api/obj/project.nuget.cache +15 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/cdk/app.ts.tmpl +61 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/cdk/cdk.json +68 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/cdk/tsconfig.json +9 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/package.json.tmpl +23 -0
- package/dist/templates/webapp-lambda-postgres-dotnet/tsconfig.json +27 -0
- package/dist/templates/webapp-lambda-postgres-node/README.md.tmpl +190 -0
- package/dist/templates/webapp-lambda-postgres-node/apps/api/index.ts +76 -0
- package/dist/templates/webapp-lambda-postgres-node/apps/api/package.json +18 -0
- package/dist/templates/webapp-lambda-postgres-node/apps/api/tsconfig.json +8 -0
- package/dist/templates/webapp-lambda-postgres-node/cdk/app.ts.tmpl +61 -0
- package/dist/templates/webapp-lambda-postgres-node/cdk/cdk.json +68 -0
- package/dist/templates/webapp-lambda-postgres-node/cdk/tsconfig.json +9 -0
- package/dist/templates/webapp-lambda-postgres-node/package.json.tmpl +24 -0
- package/dist/templates/webapp-lambda-postgres-node/tsconfig.json +27 -0
- package/dist/utils/aws.d.ts +4 -0
- package/dist/utils/aws.d.ts.map +1 -0
- package/dist/utils/aws.js +90 -0
- package/dist/utils/aws.js.map +1 -0
- package/dist/utils/dependencies.d.ts +27 -0
- package/dist/utils/dependencies.d.ts.map +1 -0
- package/dist/utils/dependencies.js +267 -0
- package/dist/utils/dependencies.js.map +1 -0
- package/dist/utils/template.d.ts +23 -0
- package/dist/utils/template.d.ts.map +1 -0
- package/dist/utils/template.js +115 -0
- package/dist/utils/template.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import 'source-map-support/register';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import { App, Aspects, Stack } from 'aws-cdk-lib';
|
|
5
|
+
import * as ecs from 'aws-cdk-lib/aws-ecs';
|
|
6
|
+
import { AwsSolutionsChecks, NIST80053R5Checks } from 'cdk-nag';
|
|
7
|
+
import { StaticSite, EcsPostgresApi, Confidentiality, Environment } from '@phila/constructs';
|
|
8
|
+
|
|
9
|
+
const app = new App();
|
|
10
|
+
|
|
11
|
+
// Environment is determined by CDK context
|
|
12
|
+
const environment = app.node.tryGetContext('environment') as Environment;
|
|
13
|
+
|
|
14
|
+
if (!environment) {
|
|
15
|
+
throw new Error('Environment must be specified via context. Use: cdk deploy -c environment=dev');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Read compliance frameworks from context
|
|
19
|
+
const compliance = app.node.tryGetContext('compliance');
|
|
20
|
+
const complianceFrameworks = compliance ? compliance.split(',') : [];
|
|
21
|
+
|
|
22
|
+
// Application context with governance metadata
|
|
23
|
+
const context = {
|
|
24
|
+
appName: '{{appName}}',
|
|
25
|
+
environment,
|
|
26
|
+
department: '{{department}}',
|
|
27
|
+
team: '{{team}}',
|
|
28
|
+
contact: '{{contact}}',
|
|
29
|
+
compliance: complianceFrameworks,
|
|
30
|
+
confidentiality: Confidentiality.{{CONFIDENTIALITY}},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// Stack name follows pattern: {appName}-{environment}
|
|
34
|
+
const stack = new Stack(app, '{{appName}}-' + environment, {
|
|
35
|
+
env: {
|
|
36
|
+
account: process.env.CDK_DEFAULT_ACCOUNT,
|
|
37
|
+
region: process.env.CDK_DEFAULT_REGION || 'us-east-1',
|
|
38
|
+
},
|
|
39
|
+
stackName: '{{appName}}-' + environment,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// Create the StaticSite construct for the Nuxt frontend
|
|
43
|
+
new StaticSite(stack, '{{appName}}Site', {
|
|
44
|
+
...context,
|
|
45
|
+
assetDir: '../frontend/dist',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// Create the EcsPostgresApi construct for the containerized Express API with PostgreSQL
|
|
49
|
+
new EcsPostgresApi(stack, '{{appName}}Api', {
|
|
50
|
+
...context,
|
|
51
|
+
apiId: 'api',
|
|
52
|
+
image: ecs.ContainerImage.fromAsset(path.join(__dirname, '../apps/api')),
|
|
53
|
+
containerPort: 80,
|
|
54
|
+
// Uncomment for serverless Aurora instead of provisioned RDS:
|
|
55
|
+
// serverless: true,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Apply compliance checks
|
|
59
|
+
Aspects.of(app).add(new NIST80053R5Checks({ verbose: true }));
|
|
60
|
+
Aspects.of(app).add(new AwsSolutionsChecks({ verbose: true }));
|
|
61
|
+
|
|
62
|
+
app.synth();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": "npx ts-node --prefer-ts-exts app.ts",
|
|
3
|
+
"watch": {
|
|
4
|
+
"include": ["**"],
|
|
5
|
+
"exclude": [
|
|
6
|
+
"README.md",
|
|
7
|
+
"cdk*.json",
|
|
8
|
+
"**/*.d.ts",
|
|
9
|
+
"**/*.js",
|
|
10
|
+
"tsconfig.json",
|
|
11
|
+
"package*.json",
|
|
12
|
+
"node_modules",
|
|
13
|
+
"test"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"context": {
|
|
17
|
+
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
|
|
18
|
+
"@aws-cdk/core:checkSecretUsage": true,
|
|
19
|
+
"@aws-cdk/core:target-partitions": ["aws", "aws-cn"],
|
|
20
|
+
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
|
|
21
|
+
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
|
|
22
|
+
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
|
|
23
|
+
"@aws-cdk/aws-iam:minimizePolicies": true,
|
|
24
|
+
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
|
|
25
|
+
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
|
|
26
|
+
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
|
|
27
|
+
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
|
|
28
|
+
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
|
|
29
|
+
"@aws-cdk/core:enablePartitionLiterals": true,
|
|
30
|
+
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
|
|
31
|
+
"@aws-cdk/aws-iam:standardizedServicePrincipals": true,
|
|
32
|
+
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
|
|
33
|
+
"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true,
|
|
34
|
+
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
|
|
35
|
+
"@aws-cdk/aws-route53-patters:useCertificate": true,
|
|
36
|
+
"@aws-cdk/customresources:installLatestAwsSdkDefault": false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noImplicitAny": true,
|
|
9
|
+
"strictNullChecks": true,
|
|
10
|
+
"noImplicitThis": true,
|
|
11
|
+
"alwaysStrict": true,
|
|
12
|
+
"noUnusedLocals": false,
|
|
13
|
+
"noUnusedParameters": false,
|
|
14
|
+
"noImplicitReturns": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": false,
|
|
16
|
+
"inlineSourceMap": true,
|
|
17
|
+
"inlineSources": true,
|
|
18
|
+
"experimentalDecorators": true,
|
|
19
|
+
"strictPropertyInitialization": false,
|
|
20
|
+
"outDir": "./dist",
|
|
21
|
+
"rootDir": "./"
|
|
22
|
+
},
|
|
23
|
+
"include": ["./*.ts"],
|
|
24
|
+
"exclude": ["node_modules", "cdk.out"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{appName}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Web application with Nuxt frontend, ECS containerized API backend, and PostgreSQL",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "npm run build --workspaces",
|
|
8
|
+
"build:frontend": "cd frontend && npm run build",
|
|
9
|
+
"build:api": "cd apps/api && npm run build",
|
|
10
|
+
"dev": "cd frontend && npm run dev",
|
|
11
|
+
"dev:api": "cd apps/api && npm run dev",
|
|
12
|
+
"test": "npm test --workspaces --if-present",
|
|
13
|
+
"synth": "cd cdk && cdk synth",
|
|
14
|
+
"deploy": "cd cdk && cdk deploy",
|
|
15
|
+
"diff": "cd cdk && cdk diff"
|
|
16
|
+
},
|
|
17
|
+
"workspaces": [
|
|
18
|
+
"cdk",
|
|
19
|
+
"apps/*",
|
|
20
|
+
"frontend"
|
|
21
|
+
],
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"typescript": "^5.3.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noImplicitAny": true,
|
|
9
|
+
"strictNullChecks": true,
|
|
10
|
+
"noImplicitThis": true,
|
|
11
|
+
"alwaysStrict": true,
|
|
12
|
+
"noUnusedLocals": false,
|
|
13
|
+
"noUnusedParameters": false,
|
|
14
|
+
"noImplicitReturns": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": false,
|
|
16
|
+
"inlineSourceMap": true,
|
|
17
|
+
"inlineSources": true,
|
|
18
|
+
"experimentalDecorators": true,
|
|
19
|
+
"strictPropertyInitialization": false,
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"esModuleInterop": true,
|
|
22
|
+
"resolveJsonModule": true,
|
|
23
|
+
"forceConsistentCasingInFileNames": true
|
|
24
|
+
},
|
|
25
|
+
"exclude": ["node_modules", "cdk", "apps", "frontend"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# {{appName}}
|
|
2
|
+
|
|
3
|
+
Web application with Nuxt SSG frontend and .NET Lambda API backend using Philadelphia constructs.
|
|
4
|
+
|
|
5
|
+
Generated on {{timestamp}}
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
View the [architecture diagram](https://github.com/CityOfPhiladelphia/phila-ctl/blob/main/packages/constructs/docs/diagrams/webapp-lambda.drawio) in draw.io or VS Code with the Draw.io extension.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
### Prerequisites
|
|
16
|
+
|
|
17
|
+
- Node.js 20+
|
|
18
|
+
- .NET 8 SDK
|
|
19
|
+
- AWS CLI configured with SSO
|
|
20
|
+
- AWS profile named `phila-{{appName}}`
|
|
21
|
+
|
|
22
|
+
### Setup
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Install frontend and CDK dependencies
|
|
26
|
+
npm install
|
|
27
|
+
|
|
28
|
+
# Restore .NET dependencies
|
|
29
|
+
cd apps/api && dotnet restore && cd ../..
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Development
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Run frontend dev server
|
|
36
|
+
npm run dev
|
|
37
|
+
|
|
38
|
+
# Build frontend for production
|
|
39
|
+
npm run build:frontend
|
|
40
|
+
|
|
41
|
+
# Build API
|
|
42
|
+
npm run build:api
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Deployment
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Configure AWS profile
|
|
49
|
+
export AWS_PROFILE=phila-{{appName}}
|
|
50
|
+
|
|
51
|
+
# Deploy to dev environment
|
|
52
|
+
city deploy dev
|
|
53
|
+
|
|
54
|
+
# Deploy to test environment
|
|
55
|
+
city deploy test
|
|
56
|
+
|
|
57
|
+
# Deploy to production (requires confirmation)
|
|
58
|
+
city deploy prod
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Shipping Updates
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Ship frontend changes to S3/CloudFront
|
|
65
|
+
city ship dev --web
|
|
66
|
+
|
|
67
|
+
# Ship API changes to Lambda
|
|
68
|
+
city ship dev --lambda api
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Project Structure
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
.
|
|
75
|
+
├── cdk/ # CDK infrastructure code
|
|
76
|
+
│ └── app.ts # Main CDK application
|
|
77
|
+
├── frontend/ # Nuxt 3 SSG frontend
|
|
78
|
+
│ ├── pages/ # File-based routing
|
|
79
|
+
│ ├── app.vue # Root component
|
|
80
|
+
│ └── nuxt.config.ts # Nuxt configuration
|
|
81
|
+
├── apps/ # Backend code
|
|
82
|
+
│ └── api/ # .NET Minimal API
|
|
83
|
+
│ ├── Program.cs # API entry point and routes
|
|
84
|
+
│ └── Api.csproj # Project file
|
|
85
|
+
└── city.config.json # City CLI configuration
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Frontend
|
|
89
|
+
|
|
90
|
+
The frontend uses [Nuxt 3](https://nuxt.com) with Static Site Generation (SSG):
|
|
91
|
+
|
|
92
|
+
- Pre-renders to static HTML for S3/CloudFront
|
|
93
|
+
- File-based routing in `pages/` directory
|
|
94
|
+
- TypeScript support enabled
|
|
95
|
+
|
|
96
|
+
### Adding Pages
|
|
97
|
+
|
|
98
|
+
Create Vue files in `frontend/pages/`:
|
|
99
|
+
|
|
100
|
+
```vue
|
|
101
|
+
<!-- frontend/pages/about.vue -->
|
|
102
|
+
<template>
|
|
103
|
+
<div>
|
|
104
|
+
<h1>About</h1>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This automatically creates a route at `/about`.
|
|
110
|
+
|
|
111
|
+
## API
|
|
112
|
+
|
|
113
|
+
The API uses [.NET Minimal API](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis) with AWS Lambda hosting.
|
|
114
|
+
|
|
115
|
+
### Adding Endpoints
|
|
116
|
+
|
|
117
|
+
Edit `apps/api/Program.cs`:
|
|
118
|
+
|
|
119
|
+
```csharp
|
|
120
|
+
app.MapGet("/users", () => Results.Ok(new { users = new List<object>() }));
|
|
121
|
+
|
|
122
|
+
app.MapPost("/users", (UserRequest request) =>
|
|
123
|
+
{
|
|
124
|
+
// Handle user creation
|
|
125
|
+
return Results.Created($"/users/{Guid.NewGuid()}", request);
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Environment Variables
|
|
130
|
+
|
|
131
|
+
Lambda functions automatically receive:
|
|
132
|
+
- `APP_NAME` - Application name ({{appName}})
|
|
133
|
+
- `ENVIRONMENT` - Current environment (dev/test/prod)
|
|
134
|
+
|
|
135
|
+
### Building the API
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Debug build
|
|
139
|
+
cd apps/api && dotnet build
|
|
140
|
+
|
|
141
|
+
# Release build for deployment
|
|
142
|
+
cd apps/api && dotnet publish -c Release -o publish
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Resources Created
|
|
146
|
+
|
|
147
|
+
This application creates:
|
|
148
|
+
|
|
149
|
+
**Frontend:**
|
|
150
|
+
- **S3 Bucket** - Static asset storage
|
|
151
|
+
- **CloudFront Distribution** - CDN with HTTPS
|
|
152
|
+
- **Origin Access Control** - Secure S3 access
|
|
153
|
+
|
|
154
|
+
**API:**
|
|
155
|
+
- **API Gateway REST API** - HTTP endpoint
|
|
156
|
+
- **Lambda Function** - .NET 8 serverless compute
|
|
157
|
+
- **VPC Security Group** - Network security
|
|
158
|
+
- **IAM Role** - Permissions for Lambda execution
|
|
159
|
+
|
|
160
|
+
**Shared:**
|
|
161
|
+
- **SSM Parameters** - Resource discovery
|
|
162
|
+
- **CloudWatch Logs** - Application logs
|
|
163
|
+
- **KMS Keys** - Encryption
|
|
164
|
+
|
|
165
|
+
## URLs
|
|
166
|
+
|
|
167
|
+
After deployment, URLs are available via:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Frontend URL
|
|
171
|
+
city config list --env dev | grep cloudfront
|
|
172
|
+
|
|
173
|
+
# API URL
|
|
174
|
+
city config list --env dev | grep api
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Adding a Database
|
|
178
|
+
|
|
179
|
+
To add a database, use one of these templates instead:
|
|
180
|
+
- `webapp-lambda-dynamo-dotnet` - For DynamoDB
|
|
181
|
+
- `webapp-lambda-postgres-dotnet` - For PostgreSQL
|
|
182
|
+
|
|
183
|
+
## Support
|
|
184
|
+
|
|
185
|
+
For issues or questions:
|
|
186
|
+
- [Philadelphia Infrastructure Library Documentation](https://github.com/CityOfPhiladelphia/phila-ctl)
|
|
187
|
+
- [.NET Minimal APIs Documentation](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis)
|
|
188
|
+
- [Nuxt Documentation](https://nuxt.com/docs)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- ABOUTME: .NET 8 Minimal API project for AWS Lambda deployment -->
|
|
2
|
+
<!-- ABOUTME: Uses AOT-compatible serialization for Lambda runtime -->
|
|
3
|
+
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
4
|
+
<PropertyGroup>
|
|
5
|
+
<TargetFramework>net8.0</TargetFramework>
|
|
6
|
+
<Nullable>enable</Nullable>
|
|
7
|
+
<ImplicitUsings>enable</ImplicitUsings>
|
|
8
|
+
<OutputType>Exe</OutputType>
|
|
9
|
+
<AssemblyName>Api</AssemblyName>
|
|
10
|
+
<RootNamespace>Api</RootNamespace>
|
|
11
|
+
</PropertyGroup>
|
|
12
|
+
|
|
13
|
+
<ItemGroup>
|
|
14
|
+
<PackageReference Include="Amazon.Lambda.AspNetCoreServer.Hosting" Version="1.7.2" />
|
|
15
|
+
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.4" />
|
|
16
|
+
</ItemGroup>
|
|
17
|
+
</Project>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// ABOUTME: Minimal API Lambda handler with REST endpoints
|
|
2
|
+
// ABOUTME: Provides health check and example CRUD endpoints for web application backend
|
|
3
|
+
|
|
4
|
+
var builder = WebApplication.CreateBuilder(args);
|
|
5
|
+
|
|
6
|
+
// Add AWS Lambda hosting
|
|
7
|
+
builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi);
|
|
8
|
+
|
|
9
|
+
var app = builder.Build();
|
|
10
|
+
|
|
11
|
+
// Health check endpoint
|
|
12
|
+
app.MapGet("/health", () => Results.Ok(new
|
|
13
|
+
{
|
|
14
|
+
Status = "healthy",
|
|
15
|
+
Timestamp = DateTime.UtcNow.ToString("o")
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
// Hello world endpoint
|
|
19
|
+
app.MapGet("/hello", (HttpContext context) =>
|
|
20
|
+
{
|
|
21
|
+
var name = context.Request.Query["name"].FirstOrDefault() ?? "World";
|
|
22
|
+
return Results.Ok(new
|
|
23
|
+
{
|
|
24
|
+
Message = $"Hello, {name}!",
|
|
25
|
+
AppName = Environment.GetEnvironmentVariable("APP_NAME"),
|
|
26
|
+
Environment = Environment.GetEnvironmentVariable("ENVIRONMENT"),
|
|
27
|
+
Timestamp = DateTime.UtcNow.ToString("o")
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Example: Create item
|
|
32
|
+
app.MapPost("/items", (ItemRequest request) =>
|
|
33
|
+
{
|
|
34
|
+
Console.WriteLine($"Creating item: {request.Name}");
|
|
35
|
+
|
|
36
|
+
return Results.Created($"/items/{Guid.NewGuid()}", new
|
|
37
|
+
{
|
|
38
|
+
Message = "Item created",
|
|
39
|
+
Item = request
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Example: Get item by ID
|
|
44
|
+
app.MapGet("/items/{id}", (string id) =>
|
|
45
|
+
{
|
|
46
|
+
return Results.Ok(new
|
|
47
|
+
{
|
|
48
|
+
Id = id,
|
|
49
|
+
Message = $"Retrieved item {id}"
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
app.Run();
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
/// Request model for creating items
|
|
57
|
+
/// </summary>
|
|
58
|
+
public record ItemRequest(string Name, string? Description);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Information": ["Configuration used by AWS Lambda .NET tooling when deploying"],
|
|
3
|
+
"profile": "",
|
|
4
|
+
"region": "",
|
|
5
|
+
"configuration": "Release",
|
|
6
|
+
"function-runtime": "dotnet8",
|
|
7
|
+
"function-memory-size": 256,
|
|
8
|
+
"function-timeout": 30,
|
|
9
|
+
"function-handler": "Api"
|
|
10
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": 1,
|
|
3
|
+
"restore": {
|
|
4
|
+
"/Users/alejandro.lopez/code/phila-ctl/templates/webapp-lambda-dotnet/apps/api/Api.csproj": {}
|
|
5
|
+
},
|
|
6
|
+
"projects": {
|
|
7
|
+
"/Users/alejandro.lopez/code/phila-ctl/templates/webapp-lambda-dotnet/apps/api/Api.csproj": {
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"restore": {
|
|
10
|
+
"projectUniqueName": "/Users/alejandro.lopez/code/phila-ctl/templates/webapp-lambda-dotnet/apps/api/Api.csproj",
|
|
11
|
+
"projectName": "Api",
|
|
12
|
+
"projectPath": "/Users/alejandro.lopez/code/phila-ctl/templates/webapp-lambda-dotnet/apps/api/Api.csproj",
|
|
13
|
+
"packagesPath": "/Users/alejandro.lopez/.nuget/packages/",
|
|
14
|
+
"outputPath": "/Users/alejandro.lopez/code/phila-ctl/templates/webapp-lambda-dotnet/apps/api/obj/",
|
|
15
|
+
"projectStyle": "PackageReference",
|
|
16
|
+
"configFilePaths": [
|
|
17
|
+
"/Users/alejandro.lopez/.nuget/NuGet/NuGet.Config"
|
|
18
|
+
],
|
|
19
|
+
"originalTargetFrameworks": [
|
|
20
|
+
"net8.0"
|
|
21
|
+
],
|
|
22
|
+
"sources": {
|
|
23
|
+
"https://api.nuget.org/v3/index.json": {},
|
|
24
|
+
"https://philagov-102658671810.d.codeartifact.us-east-1.amazonaws.com/nuget/se-team/v3/index.json": {}
|
|
25
|
+
},
|
|
26
|
+
"frameworks": {
|
|
27
|
+
"net8.0": {
|
|
28
|
+
"targetAlias": "net8.0",
|
|
29
|
+
"projectReferences": {}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"warningProperties": {
|
|
33
|
+
"warnAsError": [
|
|
34
|
+
"NU1605"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"restoreAuditProperties": {
|
|
38
|
+
"enableAudit": "true",
|
|
39
|
+
"auditLevel": "low",
|
|
40
|
+
"auditMode": "direct"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"frameworks": {
|
|
44
|
+
"net8.0": {
|
|
45
|
+
"targetAlias": "net8.0",
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"Amazon.Lambda.AspNetCoreServer.Hosting": {
|
|
48
|
+
"target": "Package",
|
|
49
|
+
"version": "[1.7.2, )"
|
|
50
|
+
},
|
|
51
|
+
"Amazon.Lambda.Serialization.SystemTextJson": {
|
|
52
|
+
"target": "Package",
|
|
53
|
+
"version": "[2.4.4, )"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"imports": [
|
|
57
|
+
"net461",
|
|
58
|
+
"net462",
|
|
59
|
+
"net47",
|
|
60
|
+
"net471",
|
|
61
|
+
"net472",
|
|
62
|
+
"net48",
|
|
63
|
+
"net481"
|
|
64
|
+
],
|
|
65
|
+
"assetTargetFallback": true,
|
|
66
|
+
"warn": true,
|
|
67
|
+
"frameworkReferences": {
|
|
68
|
+
"Microsoft.AspNetCore.App": {
|
|
69
|
+
"privateAssets": "none"
|
|
70
|
+
},
|
|
71
|
+
"Microsoft.NETCore.App": {
|
|
72
|
+
"privateAssets": "all"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/8.0.403/PortableRuntimeIdentifierGraph.json"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
|
2
|
+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
|
4
|
+
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
|
5
|
+
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
|
6
|
+
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
|
7
|
+
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/alejandro.lopez/.nuget/packages/</NuGetPackageRoot>
|
|
8
|
+
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/alejandro.lopez/.nuget/packages/</NuGetPackageFolders>
|
|
9
|
+
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
|
10
|
+
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.1</NuGetToolVersion>
|
|
11
|
+
</PropertyGroup>
|
|
12
|
+
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
|
13
|
+
<SourceRoot Include="/Users/alejandro.lopez/.nuget/packages/" />
|
|
14
|
+
</ItemGroup>
|
|
15
|
+
</Project>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//------------------------------------------------------------------------------
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// This code was generated by a tool.
|
|
4
|
+
//
|
|
5
|
+
// Changes to this file may cause incorrect behavior and will be lost if
|
|
6
|
+
// the code is regenerated.
|
|
7
|
+
// </auto-generated>
|
|
8
|
+
//------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
using System;
|
|
11
|
+
using System.Reflection;
|
|
12
|
+
|
|
13
|
+
[assembly: System.Reflection.AssemblyCompanyAttribute("Api")]
|
|
14
|
+
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
|
15
|
+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
16
|
+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f4db1eb14515a4157a4850a57c0b8c85baa6740e")]
|
|
17
|
+
[assembly: System.Reflection.AssemblyProductAttribute("Api")]
|
|
18
|
+
[assembly: System.Reflection.AssemblyTitleAttribute("Api")]
|
|
19
|
+
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
20
|
+
|
|
21
|
+
// Generated by the MSBuild WriteCodeFragment class.
|
|
22
|
+
|
package/dist/templates/webapp-lambda-dotnet/apps/api/obj/Debug/net8.0/Api.AssemblyInfoInputs.cache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1799ac38bbc38f0c289f5500dbe232d0d25d9ca54a2558cbd39eded73fb8a4ca
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
is_global = true
|
|
2
|
+
build_property.TargetFramework = net8.0
|
|
3
|
+
build_property.TargetPlatformMinVersion =
|
|
4
|
+
build_property.UsingMicrosoftNETSdkWeb = true
|
|
5
|
+
build_property.ProjectTypeGuids =
|
|
6
|
+
build_property.InvariantGlobalization =
|
|
7
|
+
build_property.PlatformNeutralAssembly =
|
|
8
|
+
build_property.EnforceExtendedAnalyzerRules =
|
|
9
|
+
build_property._SupportedPlatformList = Linux,macOS,Windows
|
|
10
|
+
build_property.RootNamespace = Api
|
|
11
|
+
build_property.RootNamespace = Api
|
|
12
|
+
build_property.ProjectDir = /Users/alejandro.lopez/code/phila-ctl/packages/cli/dist/templates/webapp-lambda-dotnet/apps/api/
|
|
13
|
+
build_property.EnableComHosting =
|
|
14
|
+
build_property.EnableGeneratedComInterfaceComImportInterop =
|
|
15
|
+
build_property.RazorLangVersion = 8.0
|
|
16
|
+
build_property.SupportLocalizedComponentNames =
|
|
17
|
+
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
|
18
|
+
build_property.MSBuildProjectDirectory = /Users/alejandro.lopez/code/phila-ctl/packages/cli/dist/templates/webapp-lambda-dotnet/apps/api
|
|
19
|
+
build_property._RazorSourceGeneratorDebug =
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// <auto-generated/>
|
|
2
|
+
global using global::Microsoft.AspNetCore.Builder;
|
|
3
|
+
global using global::Microsoft.AspNetCore.Hosting;
|
|
4
|
+
global using global::Microsoft.AspNetCore.Http;
|
|
5
|
+
global using global::Microsoft.AspNetCore.Routing;
|
|
6
|
+
global using global::Microsoft.Extensions.Configuration;
|
|
7
|
+
global using global::Microsoft.Extensions.DependencyInjection;
|
|
8
|
+
global using global::Microsoft.Extensions.Hosting;
|
|
9
|
+
global using global::Microsoft.Extensions.Logging;
|
|
10
|
+
global using global::System;
|
|
11
|
+
global using global::System.Collections.Generic;
|
|
12
|
+
global using global::System.IO;
|
|
13
|
+
global using global::System.Linq;
|
|
14
|
+
global using global::System.Net.Http;
|
|
15
|
+
global using global::System.Net.Http.Json;
|
|
16
|
+
global using global::System.Threading;
|
|
17
|
+
global using global::System.Threading.Tasks;
|
|
Binary file
|