@caddis/cli 0.1.0 → 0.2.0
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 +29 -16
- package/bundles/antigravity-plugin-extras/plugin.json +5 -0
- package/bundles/antigravity-plugin-extras/skills/_registry.md +154 -0
- package/bundles/antigravity-plugin-extras/skills/agent-md-refactor/SKILL.md +356 -0
- package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +517 -0
- package/bundles/antigravity-plugin-extras/skills/algorithmic-art/SKILL.md +293 -0
- package/bundles/antigravity-plugin-extras/skills/anchor-review/SKILL.md +135 -0
- package/bundles/antigravity-plugin-extras/skills/api-client-patterns/SKILL.md +367 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-design/SKILL.md +244 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-diagram/SKILL.md +156 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-document/SKILL.md +321 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/SKILL.md +74 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/bundles/antigravity-plugin-extras/skills/ascii-art/SKILL.md +144 -0
- package/bundles/antigravity-plugin-extras/skills/asking-questions/SKILL.md +81 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/SKILL.md +118 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/cross-service/credential-management.md +450 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/browser/README.md +363 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/code-interpreter/README.md +232 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/README.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deploy-template.sh +117 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deployment-strategies.md +416 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/troubleshooting-guide.md +384 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/validate-deployment.sh +186 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/identity/README.md +186 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/memory/README.md +253 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/observability/README.md +517 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/runtime/README.md +215 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/SKILL.md +279 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/references/cdk-patterns.md +431 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/scripts/validate-stack.sh +240 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/SKILL.md +318 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/cloudwatch-alarms.md +567 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/operations-patterns.md +394 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/SKILL.md +758 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/deployment-best-practices.md +830 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/eda-patterns.md +1002 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/observability-best-practices.md +770 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/performance-optimization.md +671 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/security-best-practices.md +625 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/serverless-patterns.md +838 -0
- package/bundles/antigravity-plugin-extras/skills/backend-to-frontend-handoff/SKILL.md +139 -0
- package/bundles/antigravity-plugin-extras/skills/banner-design/SKILL.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/brand-design/SKILL.md +298 -0
- package/bundles/antigravity-plugin-extras/skills/brand-guidelines/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/brand-guidelines/SKILL.md +118 -0
- package/bundles/antigravity-plugin-extras/skills/brand-voice/SKILL.md +93 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +392 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md +461 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/examples.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/state-patterns.md +360 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/troubleshooting.md +362 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +266 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/examples.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/oauth-setup.md +338 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/troubleshooting.md +317 -0
- package/bundles/antigravity-plugin-extras/skills/caching-patterns/SKILL.md +385 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/SKILL.md +91 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/changelog-generator/SKILL.md +105 -0
- package/bundles/antigravity-plugin-extras/skills/code-explainer/SKILL.md +91 -0
- package/bundles/antigravity-plugin-extras/skills/competitive-ads-extractor/SKILL.md +294 -0
- package/bundles/antigravity-plugin-extras/skills/component-testing/SKILL.md +310 -0
- package/bundles/antigravity-plugin-extras/skills/content-research-writer/SKILL.md +539 -0
- package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +51 -0
- package/bundles/antigravity-plugin-extras/skills/data-analysis/SKILL.md +111 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/README.md +248 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +203 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/adapter.py.template +44 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/api-router.py.template +43 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/contract-test.py.template +384 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/display-dto.py.template +39 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-service.ts.template +46 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-types.ts.template +38 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/ingestion-model.py.template +42 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/mapping-doc.md.template +46 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/normalizer.py.template +48 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_requirements.md +36 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_ui_demand.md +35 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/reconcile_mapping.md +66 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/query-catalog.md.template +62 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/consumer-driven-contracts.md +131 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/drift-check-catalog.md +305 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/layer-responsibilities.md +333 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_connections.py +170 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_sources.py +161 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/drift_check.py +171 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/extract_schema.py +1363 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_gap_report.py +81 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_mapping_doc.py +294 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/ts_dto_compare.py +214 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/validate_lineage.py +51 -0
- package/bundles/antigravity-plugin-extras/skills/data-loader/SKILL.md +753 -0
- package/bundles/antigravity-plugin-extras/skills/data-validation/SKILL.md +220 -0
- package/bundles/antigravity-plugin-extras/skills/db-testing/SKILL.md +117 -0
- package/bundles/antigravity-plugin-extras/skills/deploy-local/SKILL.md +259 -0
- package/bundles/antigravity-plugin-extras/skills/design-md/SKILL.md +167 -0
- package/bundles/antigravity-plugin-extras/skills/design-system-tokens/SKILL.md +240 -0
- package/bundles/antigravity-plugin-extras/skills/design-system-tokens/references/DESIGN-SYSTEM-TEMPLATE.md +577 -0
- package/bundles/antigravity-plugin-extras/skills/developer-growth-analysis/SKILL.md +323 -0
- package/bundles/antigravity-plugin-extras/skills/doc-coauthoring/SKILL.md +378 -0
- package/bundles/antigravity-plugin-extras/skills/documentation-analyzer/SKILL.md +78 -0
- package/bundles/antigravity-plugin-extras/skills/domain-name-brainstormer/SKILL.md +213 -0
- package/bundles/antigravity-plugin-extras/skills/enterprise-dashboard-aesthetic-system/SKILL.md +120 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/SKILL.md +193 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/element-types.md +497 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/excalidraw-schema.md +356 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/reliable-diagrams.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/README.md +60 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-arrow.py +354 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-icon-to-diagram.py +412 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/split-excalidraw-library.py +183 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/business-flow-swimlane-template.excalidraw +334 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/class-diagram-template.excalidraw +558 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/data-flow-diagram-template.excalidraw +279 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/er-diagram-template.excalidraw +662 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/flowchart-template.excalidraw +179 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/mindmap-template.excalidraw +244 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/relationship-template.excalidraw +145 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/reliable-flowchart.excalidraw +1 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/sequence-diagram-template.excalidraw +509 -0
- package/bundles/antigravity-plugin-extras/skills/file-organizer/SKILL.md +434 -0
- package/bundles/antigravity-plugin-extras/skills/game-changing-features/README.md +221 -0
- package/bundles/antigravity-plugin-extras/skills/game-changing-features/SKILL.md +265 -0
- package/bundles/antigravity-plugin-extras/skills/github-issues/SKILL.md +359 -0
- package/bundles/antigravity-plugin-extras/skills/github-issues/references/templates.md +90 -0
- package/bundles/antigravity-plugin-extras/skills/golden-nuggets/SKILL.md +192 -0
- package/bundles/antigravity-plugin-extras/skills/humanizer/SKILL.md +194 -0
- package/bundles/antigravity-plugin-extras/skills/image-enhancer/SKILL.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/intent-writer/SKILL.md +201 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/SKILL.md +124 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/3p-updates.md +47 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/faq-answers.md +30 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/general-comms.md +16 -0
- package/bundles/antigravity-plugin-extras/skills/invoice-organizer/SKILL.md +447 -0
- package/bundles/antigravity-plugin-extras/skills/jira-issues/SKILL.md +182 -0
- package/bundles/antigravity-plugin-extras/skills/job-application/SKILL.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/lead-research-assistant/SKILL.md +200 -0
- package/bundles/antigravity-plugin-extras/skills/llm-application-dev/SKILL.md +217 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/SKILL.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/evaluation.md +602 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/mcp_best_practices.md +915 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/node_mcp_server.md +916 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/python_mcp_server.md +752 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/connections.py +151 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/bundles/antigravity-plugin-extras/skills/meeting-insights-analyzer/SKILL.md +328 -0
- package/bundles/antigravity-plugin-extras/skills/monorepo/SKILL.md +267 -0
- package/bundles/antigravity-plugin-extras/skills/naming-analyzer/SKILL.md +376 -0
- package/bundles/antigravity-plugin-extras/skills/nextjs-app-router/SKILL.md +271 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/AUTHENTICATION.md +154 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/SKILL.md +270 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/api_reference.md +309 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/troubleshooting.md +376 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/usage_patterns.md +338 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/__init__.py +81 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/ask_question.py +256 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/auth_manager.py +358 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_session.py +255 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_utils.py +107 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/cleanup_manager.py +302 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/config.py +44 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/notebook_manager.py +410 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/run.py +102 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/setup_environment.py +204 -0
- package/bundles/antigravity-plugin-extras/skills/observability/SKILL.md +371 -0
- package/bundles/antigravity-plugin-extras/skills/onboard-project/SKILL.md +192 -0
- package/bundles/antigravity-plugin-extras/skills/performance-testing/SKILL.md +226 -0
- package/bundles/antigravity-plugin-extras/skills/pipeline-state/SKILL.md +208 -0
- package/bundles/antigravity-plugin-extras/skills/plantuml/SKILL.md +228 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/SKILL.md +142 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/linear.app.md +196 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/stripe.md +214 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/vercel.md +218 -0
- package/bundles/antigravity-plugin-extras/skills/prd-to-code/SKILL.md +127 -0
- package/bundles/antigravity-plugin-extras/skills/raffle-winner-picker/SKILL.md +159 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/README.md +320 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/SKILL.md +53 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/alternatives.md +258 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/anti-patterns.md +290 -0
- package/bundles/antigravity-plugin-extras/skills/receiving-code-review/SKILL.md +213 -0
- package/bundles/antigravity-plugin-extras/skills/relay/SKILL.md +246 -0
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/SKILL.md +105 -0
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/code-reviewer.md +146 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +350 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/pwa-checklist.md +226 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/touch-and-interaction.md +265 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/transformation-catalogue.md +326 -0
- package/bundles/antigravity-plugin-extras/skills/schema-migration/SKILL.md +275 -0
- package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +120 -0
- package/bundles/antigravity-plugin-extras/skills/shadcn-radix/SKILL.md +330 -0
- package/bundles/antigravity-plugin-extras/skills/sketch/SKILL.md +104 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/SKILL.md +646 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/color_palettes.py +302 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/easing.py +230 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/frame_composer.py +469 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/gif_builder.py +246 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/typography.py +357 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/validators.py +264 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/visual_effects.py +494 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/requirements.txt +4 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/bounce.py +106 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/explode.py +331 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/fade.py +329 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/flip.py +291 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/morph.py +329 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/move.py +293 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/pulse.py +268 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/shake.py +127 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/slide.py +291 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/spin.py +269 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/wiggle.py +300 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/zoom.py +312 -0
- package/bundles/antigravity-plugin-extras/skills/slides/SKILL.md +38 -0
- package/bundles/antigravity-plugin-extras/skills/state-tracking/SKILL.md +131 -0
- package/bundles/antigravity-plugin-extras/skills/streamlit-dev/SKILL.md +268 -0
- package/bundles/antigravity-plugin-extras/skills/svg-create/SKILL.md +251 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/SKILL.md +59 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/theme-showcase.pdf +0 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/desert-rose.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/golden-hour.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/SKILL.md +320 -0
- package/bundles/antigravity-plugin-extras/skills/ui-testing/SKILL.md +660 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/SKILL.md +660 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/_sync_all.py +414 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/app-interface.csv +31 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/charts.csv +26 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/colors.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/design.csv +1776 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/draft.csv +1779 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/google-fonts.csv +1924 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/icons.csv +106 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/landing.csv +35 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/products.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/react-performance.csv +45 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/styles.csv +85 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/typography.csv +74 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ui-reasoning.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ux-guidelines.csv +100 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/core.py +247 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/design_system.py +1067 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/search.py +114 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +140 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/commands.md +252 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/graph-schema.md +116 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/pipeline.md +331 -0
- package/bundles/antigravity-plugin-extras/skills/update-readme/SKILL.md +74 -0
- package/bundles/antigravity-plugin-extras/skills/verification-loop/SKILL.md +209 -0
- package/bundles/antigravity-plugin-extras/skills/video-downloader/SKILL.md +107 -0
- package/bundles/antigravity-plugin-extras/skills/webapp-development/SKILL.md +288 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/SKILL.md +339 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/agents/agent-interface.md +175 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/html.md +384 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/nlp-keywords.md +127 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/palettes.md +149 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/python.md +249 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/react.md +427 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/shapes.md +135 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/stopwords.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/youtube-transcript/SKILL.md +416 -0
- package/bundles/manifest.json +2 -1
- package/dist/cli.js +166 -37
- package/package.json +1 -1
package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/references/cdk-patterns.md
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# AWS CDK Patterns and Best Practices
|
|
2
|
+
|
|
3
|
+
This reference provides detailed patterns, anti-patterns, and best practices for AWS CDK development.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Naming Conventions](#naming-conventions)
|
|
8
|
+
- [Construct Patterns](#construct-patterns)
|
|
9
|
+
- [Security Patterns](#security-patterns)
|
|
10
|
+
- [Lambda Integration](#lambda-integration)
|
|
11
|
+
- [Testing Patterns](#testing-patterns)
|
|
12
|
+
- [Cost Optimization](#cost-optimization)
|
|
13
|
+
- [Anti-Patterns](#anti-patterns)
|
|
14
|
+
|
|
15
|
+
## Naming Conventions
|
|
16
|
+
|
|
17
|
+
### Automatic Resource Naming (Recommended)
|
|
18
|
+
|
|
19
|
+
Let CDK and CloudFormation generate unique resource names automatically:
|
|
20
|
+
|
|
21
|
+
**Benefits**:
|
|
22
|
+
- Enables multiple deployments in the same region/account
|
|
23
|
+
- Supports parallel environments (dev, staging, prod)
|
|
24
|
+
- Prevents naming conflicts
|
|
25
|
+
- Allows stack cloning and testing
|
|
26
|
+
|
|
27
|
+
**Example**:
|
|
28
|
+
```typescript
|
|
29
|
+
// ✅ GOOD - Automatic naming
|
|
30
|
+
const bucket = new s3.Bucket(this, 'DataBucket', {
|
|
31
|
+
// No bucketName specified
|
|
32
|
+
encryption: s3.BucketEncryption.S3_MANAGED,
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### When Explicit Naming is Required
|
|
37
|
+
|
|
38
|
+
Some scenarios require explicit names:
|
|
39
|
+
- Resources referenced by external systems
|
|
40
|
+
- Resources that must maintain consistent names across deployments
|
|
41
|
+
- Cross-stack references requiring stable names
|
|
42
|
+
|
|
43
|
+
**Pattern**: Use logical prefixes and environment suffixes
|
|
44
|
+
```typescript
|
|
45
|
+
// Only when absolutely necessary
|
|
46
|
+
const bucket = new s3.Bucket(this, 'DataBucket', {
|
|
47
|
+
bucketName: `${props.projectName}-data-${props.environment}`,
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Construct Patterns
|
|
52
|
+
|
|
53
|
+
### L3 Constructs (Patterns)
|
|
54
|
+
|
|
55
|
+
Prefer high-level patterns that encapsulate best practices:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import * as patterns from 'aws-cdk-lib/aws-apigateway';
|
|
59
|
+
|
|
60
|
+
new patterns.LambdaRestApi(this, 'MyApi', {
|
|
61
|
+
handler: myFunction,
|
|
62
|
+
// Includes CloudWatch Logs, IAM roles, and API Gateway configuration
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Custom Constructs
|
|
67
|
+
|
|
68
|
+
Create reusable constructs for repeated patterns:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
export class ApiWithDatabase extends Construct {
|
|
72
|
+
public readonly api: apigateway.RestApi;
|
|
73
|
+
public readonly table: dynamodb.Table;
|
|
74
|
+
|
|
75
|
+
constructor(scope: Construct, id: string, props: ApiWithDatabaseProps) {
|
|
76
|
+
super(scope, id);
|
|
77
|
+
|
|
78
|
+
this.table = new dynamodb.Table(this, 'Table', {
|
|
79
|
+
partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },
|
|
80
|
+
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const handler = new NodejsFunction(this, 'Handler', {
|
|
84
|
+
entry: props.handlerEntry,
|
|
85
|
+
environment: {
|
|
86
|
+
TABLE_NAME: this.table.tableName,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
this.table.grantReadWriteData(handler);
|
|
91
|
+
|
|
92
|
+
this.api = new apigateway.LambdaRestApi(this, 'Api', {
|
|
93
|
+
handler,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Security Patterns
|
|
100
|
+
|
|
101
|
+
### IAM Least Privilege
|
|
102
|
+
|
|
103
|
+
Use grant methods instead of broad policies:
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// ✅ GOOD - Specific grants
|
|
107
|
+
const table = new dynamodb.Table(this, 'Table', { /* ... */ });
|
|
108
|
+
const lambda = new lambda.Function(this, 'Function', { /* ... */ });
|
|
109
|
+
|
|
110
|
+
table.grantReadWriteData(lambda);
|
|
111
|
+
|
|
112
|
+
// ❌ BAD - Overly broad permissions
|
|
113
|
+
lambda.addToRolePolicy(new iam.PolicyStatement({
|
|
114
|
+
actions: ['dynamodb:*'],
|
|
115
|
+
resources: ['*'],
|
|
116
|
+
}));
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Secrets Management
|
|
120
|
+
|
|
121
|
+
Use Secrets Manager for sensitive data:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
|
|
125
|
+
|
|
126
|
+
const secret = new secretsmanager.Secret(this, 'DbPassword', {
|
|
127
|
+
generateSecretString: {
|
|
128
|
+
secretStringTemplate: JSON.stringify({ username: 'admin' }),
|
|
129
|
+
generateStringKey: 'password',
|
|
130
|
+
excludePunctuation: true,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Grant read access to Lambda
|
|
135
|
+
secret.grantRead(myFunction);
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### VPC Configuration
|
|
139
|
+
|
|
140
|
+
Follow VPC best practices:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
const vpc = new ec2.Vpc(this, 'Vpc', {
|
|
144
|
+
maxAzs: 2,
|
|
145
|
+
natGateways: 1, // Cost optimization: use 1 for dev, 2+ for prod
|
|
146
|
+
subnetConfiguration: [
|
|
147
|
+
{
|
|
148
|
+
name: 'Public',
|
|
149
|
+
subnetType: ec2.SubnetType.PUBLIC,
|
|
150
|
+
cidrMask: 24,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'Private',
|
|
154
|
+
subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
|
|
155
|
+
cidrMask: 24,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'Isolated',
|
|
159
|
+
subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
|
|
160
|
+
cidrMask: 24,
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
});
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Lambda Integration
|
|
167
|
+
|
|
168
|
+
### NodejsFunction (TypeScript/JavaScript)
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
172
|
+
|
|
173
|
+
const fn = new NodejsFunction(this, 'Function', {
|
|
174
|
+
entry: 'src/handlers/process.ts',
|
|
175
|
+
handler: 'handler',
|
|
176
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
177
|
+
timeout: Duration.seconds(30),
|
|
178
|
+
memorySize: 512,
|
|
179
|
+
environment: {
|
|
180
|
+
TABLE_NAME: table.tableName,
|
|
181
|
+
},
|
|
182
|
+
bundling: {
|
|
183
|
+
minify: true,
|
|
184
|
+
sourceMap: true,
|
|
185
|
+
externalModules: ['@aws-sdk/*'], // Use AWS SDK from Lambda runtime
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### PythonFunction
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
import { PythonFunction } from '@aws-cdk/aws-lambda-python-alpha';
|
|
194
|
+
|
|
195
|
+
const fn = new PythonFunction(this, 'Function', {
|
|
196
|
+
entry: 'src/handlers',
|
|
197
|
+
index: 'process.py',
|
|
198
|
+
handler: 'handler',
|
|
199
|
+
runtime: lambda.Runtime.PYTHON_3_12,
|
|
200
|
+
timeout: Duration.seconds(30),
|
|
201
|
+
memorySize: 512,
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Lambda Layers
|
|
206
|
+
|
|
207
|
+
Share code across functions:
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
const layer = new lambda.LayerVersion(this, 'CommonLayer', {
|
|
211
|
+
code: lambda.Code.fromAsset('layers/common'),
|
|
212
|
+
compatibleRuntimes: [lambda.Runtime.NODEJS_20_X],
|
|
213
|
+
description: 'Common utilities',
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
new NodejsFunction(this, 'Function', {
|
|
217
|
+
entry: 'src/handler.ts',
|
|
218
|
+
layers: [layer],
|
|
219
|
+
});
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Testing Patterns
|
|
223
|
+
|
|
224
|
+
### Snapshot Testing
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
import { Template } from 'aws-cdk-lib/assertions';
|
|
228
|
+
|
|
229
|
+
test('Stack creates expected resources', () => {
|
|
230
|
+
const app = new cdk.App();
|
|
231
|
+
const stack = new MyStack(app, 'TestStack');
|
|
232
|
+
|
|
233
|
+
const template = Template.fromStack(stack);
|
|
234
|
+
expect(template.toJSON()).toMatchSnapshot();
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Fine-Grained Assertions
|
|
239
|
+
|
|
240
|
+
```typescript
|
|
241
|
+
test('Lambda has correct environment', () => {
|
|
242
|
+
const app = new cdk.App();
|
|
243
|
+
const stack = new MyStack(app, 'TestStack');
|
|
244
|
+
|
|
245
|
+
const template = Template.fromStack(stack);
|
|
246
|
+
|
|
247
|
+
template.hasResourceProperties('AWS::Lambda::Function', {
|
|
248
|
+
Runtime: 'nodejs20.x',
|
|
249
|
+
Timeout: 30,
|
|
250
|
+
Environment: {
|
|
251
|
+
Variables: {
|
|
252
|
+
TABLE_NAME: { Ref: Match.anyValue() },
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Resource Count Validation
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
test('Stack has correct number of functions', () => {
|
|
263
|
+
const app = new cdk.App();
|
|
264
|
+
const stack = new MyStack(app, 'TestStack');
|
|
265
|
+
|
|
266
|
+
const template = Template.fromStack(stack);
|
|
267
|
+
template.resourceCountIs('AWS::Lambda::Function', 3);
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Cost Optimization
|
|
272
|
+
|
|
273
|
+
### Right-Sizing Lambda
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
// Development
|
|
277
|
+
const devFunction = new NodejsFunction(this, 'DevFunction', {
|
|
278
|
+
memorySize: 256, // Lower for dev
|
|
279
|
+
timeout: Duration.seconds(30),
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
// Production
|
|
283
|
+
const prodFunction = new NodejsFunction(this, 'ProdFunction', {
|
|
284
|
+
memorySize: 1024, // Higher for prod performance
|
|
285
|
+
timeout: Duration.seconds(10),
|
|
286
|
+
reservedConcurrentExecutions: 10, // Prevent runaway costs
|
|
287
|
+
});
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### DynamoDB Billing Modes
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
// Development/Low Traffic
|
|
294
|
+
const devTable = new dynamodb.Table(this, 'DevTable', {
|
|
295
|
+
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// Production/Predictable Load
|
|
299
|
+
const prodTable = new dynamodb.Table(this, 'ProdTable', {
|
|
300
|
+
billingMode: dynamodb.BillingMode.PROVISIONED,
|
|
301
|
+
readCapacity: 5,
|
|
302
|
+
writeCapacity: 5,
|
|
303
|
+
autoScaling: { /* ... */ },
|
|
304
|
+
});
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### S3 Lifecycle Policies
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
const bucket = new s3.Bucket(this, 'DataBucket', {
|
|
311
|
+
lifecycleRules: [
|
|
312
|
+
{
|
|
313
|
+
id: 'MoveToIA',
|
|
314
|
+
transitions: [
|
|
315
|
+
{
|
|
316
|
+
storageClass: s3.StorageClass.INFREQUENT_ACCESS,
|
|
317
|
+
transitionAfter: Duration.days(30),
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
storageClass: s3.StorageClass.GLACIER,
|
|
321
|
+
transitionAfter: Duration.days(90),
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
id: 'CleanupOldVersions',
|
|
327
|
+
noncurrentVersionExpiration: Duration.days(30),
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
});
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## Anti-Patterns
|
|
334
|
+
|
|
335
|
+
### ❌ Hardcoded Values
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
// BAD
|
|
339
|
+
new lambda.Function(this, 'Function', {
|
|
340
|
+
functionName: 'my-function', // Prevents multiple deployments
|
|
341
|
+
code: lambda.Code.fromAsset('lambda'),
|
|
342
|
+
handler: 'index.handler',
|
|
343
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
// GOOD
|
|
347
|
+
new NodejsFunction(this, 'Function', {
|
|
348
|
+
entry: 'src/handler.ts',
|
|
349
|
+
// Let CDK generate the name
|
|
350
|
+
});
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### ❌ Overly Broad IAM Permissions
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
// BAD
|
|
357
|
+
function.addToRolePolicy(new iam.PolicyStatement({
|
|
358
|
+
actions: ['*'],
|
|
359
|
+
resources: ['*'],
|
|
360
|
+
}));
|
|
361
|
+
|
|
362
|
+
// GOOD
|
|
363
|
+
table.grantReadWriteData(function);
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### ❌ Manual Dependency Management
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
// BAD - Manual bundling
|
|
370
|
+
new lambda.Function(this, 'Function', {
|
|
371
|
+
code: lambda.Code.fromAsset('lambda.zip'), // Pre-bundled manually
|
|
372
|
+
// ...
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
// GOOD - Let CDK handle it
|
|
376
|
+
new NodejsFunction(this, 'Function', {
|
|
377
|
+
entry: 'src/handler.ts',
|
|
378
|
+
// CDK handles bundling automatically
|
|
379
|
+
});
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### ❌ Missing Environment Variables
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
// BAD
|
|
386
|
+
new NodejsFunction(this, 'Function', {
|
|
387
|
+
entry: 'src/handler.ts',
|
|
388
|
+
// Table name hardcoded in Lambda code
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
// GOOD
|
|
392
|
+
new NodejsFunction(this, 'Function', {
|
|
393
|
+
entry: 'src/handler.ts',
|
|
394
|
+
environment: {
|
|
395
|
+
TABLE_NAME: table.tableName,
|
|
396
|
+
},
|
|
397
|
+
});
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### ❌ Ignoring Stack Outputs
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
// BAD - No way to reference resources
|
|
404
|
+
new MyStack(app, 'Stack', {});
|
|
405
|
+
|
|
406
|
+
// GOOD - Export important values
|
|
407
|
+
class MyStack extends Stack {
|
|
408
|
+
constructor(scope: Construct, id: string) {
|
|
409
|
+
super(scope, id);
|
|
410
|
+
|
|
411
|
+
const api = new apigateway.RestApi(this, 'Api', {});
|
|
412
|
+
|
|
413
|
+
new CfnOutput(this, 'ApiUrl', {
|
|
414
|
+
value: api.url,
|
|
415
|
+
description: 'API Gateway URL',
|
|
416
|
+
exportName: 'MyApiUrl',
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
## Summary
|
|
423
|
+
|
|
424
|
+
- **Always** let CDK generate resource names unless explicitly required
|
|
425
|
+
- **Use** high-level constructs (L2/L3) over low-level (L1)
|
|
426
|
+
- **Prefer** grant methods for IAM permissions
|
|
427
|
+
- **Leverage** `NodejsFunction` and `PythonFunction` for automatic bundling
|
|
428
|
+
- **Test** stacks with assertions and snapshots
|
|
429
|
+
- **Optimize** costs based on environment (dev vs prod)
|
|
430
|
+
- **Validate** infrastructure before deployment
|
|
431
|
+
- **Document** custom constructs and patterns
|
package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/scripts/validate-stack.sh
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# AWS CDK Stack Validation Script
|
|
4
|
+
#
|
|
5
|
+
# This script performs meta-level validation of CDK stacks before deployment.
|
|
6
|
+
# Run this as part of pre-commit checks to ensure infrastructure quality.
|
|
7
|
+
#
|
|
8
|
+
# Focus areas:
|
|
9
|
+
# - CDK synthesis success validation
|
|
10
|
+
# - CloudFormation template size and resource count checks
|
|
11
|
+
# - Language detection and dependency verification
|
|
12
|
+
# - Integration with cdk-nag (recommended for comprehensive best practice checks)
|
|
13
|
+
#
|
|
14
|
+
# Supports CDK projects in multiple languages:
|
|
15
|
+
# - TypeScript/JavaScript (detects via package.json)
|
|
16
|
+
# - Python (detects via requirements.txt or setup.py)
|
|
17
|
+
# - Java (detects via pom.xml)
|
|
18
|
+
# - C# (detects via .csproj files)
|
|
19
|
+
# - Go (detects via go.mod)
|
|
20
|
+
#
|
|
21
|
+
# For comprehensive CDK best practice validation (IAM policies, security,
|
|
22
|
+
# naming conventions, etc.), use cdk-nag: https://github.com/cdklabs/cdk-nag
|
|
23
|
+
# cdk-nag provides suppression mechanisms and supports all CDK languages.
|
|
24
|
+
|
|
25
|
+
set -e
|
|
26
|
+
|
|
27
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
28
|
+
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
|
29
|
+
|
|
30
|
+
echo "🔍 AWS CDK Stack Validation"
|
|
31
|
+
echo "============================"
|
|
32
|
+
echo ""
|
|
33
|
+
|
|
34
|
+
# Colors for output
|
|
35
|
+
RED='\033[0;31m'
|
|
36
|
+
GREEN='\033[0;32m'
|
|
37
|
+
YELLOW='\033[1;33m'
|
|
38
|
+
NC='\033[0m' # No Color
|
|
39
|
+
|
|
40
|
+
# Track validation status
|
|
41
|
+
VALIDATION_PASSED=true
|
|
42
|
+
|
|
43
|
+
# Function to print success
|
|
44
|
+
success() {
|
|
45
|
+
echo -e "${GREEN}✓${NC} $1"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# Function to print error
|
|
49
|
+
error() {
|
|
50
|
+
echo -e "${RED}✗${NC} $1"
|
|
51
|
+
VALIDATION_PASSED=false
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# Function to print warning
|
|
55
|
+
warning() {
|
|
56
|
+
echo -e "${YELLOW}⚠${NC} $1"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# Function to print info
|
|
60
|
+
info() {
|
|
61
|
+
echo "ℹ $1"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# Check if cdk is installed
|
|
65
|
+
if ! command -v cdk &> /dev/null; then
|
|
66
|
+
error "AWS CDK CLI not found. Install with: npm install -g aws-cdk"
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
success "AWS CDK CLI found"
|
|
71
|
+
|
|
72
|
+
# Detect CDK project language
|
|
73
|
+
detect_language() {
|
|
74
|
+
if [ -f "${PROJECT_ROOT}/package.json" ]; then
|
|
75
|
+
echo "typescript"
|
|
76
|
+
elif [ -f "${PROJECT_ROOT}/requirements.txt" ] || [ -f "${PROJECT_ROOT}/setup.py" ]; then
|
|
77
|
+
echo "python"
|
|
78
|
+
elif [ -f "${PROJECT_ROOT}/pom.xml" ]; then
|
|
79
|
+
echo "java"
|
|
80
|
+
elif [ -f "${PROJECT_ROOT}/cdk.csproj" ] || find "${PROJECT_ROOT}" -name "*.csproj" 2>/dev/null | grep -q .; then
|
|
81
|
+
echo "csharp"
|
|
82
|
+
elif [ -f "${PROJECT_ROOT}/go.mod" ]; then
|
|
83
|
+
echo "go"
|
|
84
|
+
else
|
|
85
|
+
echo "unknown"
|
|
86
|
+
fi
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
CDK_LANGUAGE=$(detect_language)
|
|
90
|
+
|
|
91
|
+
case "$CDK_LANGUAGE" in
|
|
92
|
+
typescript)
|
|
93
|
+
info "Detected TypeScript/JavaScript CDK project"
|
|
94
|
+
success "package.json found"
|
|
95
|
+
;;
|
|
96
|
+
python)
|
|
97
|
+
info "Detected Python CDK project"
|
|
98
|
+
success "requirements.txt or setup.py found"
|
|
99
|
+
;;
|
|
100
|
+
java)
|
|
101
|
+
info "Detected Java CDK project"
|
|
102
|
+
success "pom.xml found"
|
|
103
|
+
;;
|
|
104
|
+
csharp)
|
|
105
|
+
info "Detected C# CDK project"
|
|
106
|
+
success ".csproj file found"
|
|
107
|
+
;;
|
|
108
|
+
go)
|
|
109
|
+
info "Detected Go CDK project"
|
|
110
|
+
success "go.mod found"
|
|
111
|
+
;;
|
|
112
|
+
unknown)
|
|
113
|
+
warning "Could not detect CDK project language"
|
|
114
|
+
warning "Proceeding with generic validation only"
|
|
115
|
+
;;
|
|
116
|
+
esac
|
|
117
|
+
|
|
118
|
+
echo ""
|
|
119
|
+
info "Running CDK synthesis..."
|
|
120
|
+
|
|
121
|
+
# Synthesize stacks
|
|
122
|
+
if cdk synth --quiet > /dev/null 2>&1; then
|
|
123
|
+
success "CDK synthesis successful"
|
|
124
|
+
else
|
|
125
|
+
error "CDK synthesis failed"
|
|
126
|
+
echo ""
|
|
127
|
+
echo "Run 'cdk synth' for detailed error information"
|
|
128
|
+
exit 1
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
echo ""
|
|
132
|
+
info "Checking for cdk-nag integration..."
|
|
133
|
+
|
|
134
|
+
# Check if cdk-nag is being used for comprehensive validation
|
|
135
|
+
case "$CDK_LANGUAGE" in
|
|
136
|
+
typescript)
|
|
137
|
+
if grep -r "cdk-nag" "${PROJECT_ROOT}/package.json" 2>/dev/null | grep -q "."; then
|
|
138
|
+
success "cdk-nag found in package.json"
|
|
139
|
+
else
|
|
140
|
+
warning "cdk-nag not found - recommended for comprehensive CDK validation"
|
|
141
|
+
warning "Install with: npm install --save-dev cdk-nag"
|
|
142
|
+
warning "See: https://github.com/cdklabs/cdk-nag"
|
|
143
|
+
fi
|
|
144
|
+
;;
|
|
145
|
+
python)
|
|
146
|
+
if grep -r "cdk-nag" "${PROJECT_ROOT}/requirements.txt" 2>/dev/null | grep -q "."; then
|
|
147
|
+
success "cdk-nag found in requirements.txt"
|
|
148
|
+
elif grep -r "cdk-nag" "${PROJECT_ROOT}/setup.py" 2>/dev/null | grep -q "."; then
|
|
149
|
+
success "cdk-nag found in setup.py"
|
|
150
|
+
else
|
|
151
|
+
warning "cdk-nag not found - recommended for comprehensive CDK validation"
|
|
152
|
+
warning "Install with: pip install cdk-nag"
|
|
153
|
+
warning "See: https://github.com/cdklabs/cdk-nag"
|
|
154
|
+
fi
|
|
155
|
+
;;
|
|
156
|
+
java)
|
|
157
|
+
if grep -r "cdk-nag" "${PROJECT_ROOT}/pom.xml" 2>/dev/null | grep -q "."; then
|
|
158
|
+
success "cdk-nag found in pom.xml"
|
|
159
|
+
else
|
|
160
|
+
warning "cdk-nag not found - recommended for comprehensive CDK validation"
|
|
161
|
+
warning "See: https://github.com/cdklabs/cdk-nag"
|
|
162
|
+
fi
|
|
163
|
+
;;
|
|
164
|
+
csharp)
|
|
165
|
+
if find "${PROJECT_ROOT}" -name "*.csproj" -exec grep -l "CdkNag" {} \; 2>/dev/null | grep -q "."; then
|
|
166
|
+
success "cdk-nag found in .csproj"
|
|
167
|
+
else
|
|
168
|
+
warning "cdk-nag not found - recommended for comprehensive CDK validation"
|
|
169
|
+
warning "See: https://github.com/cdklabs/cdk-nag"
|
|
170
|
+
fi
|
|
171
|
+
;;
|
|
172
|
+
go)
|
|
173
|
+
if grep -r "cdk-nag-go" "${PROJECT_ROOT}/go.mod" 2>/dev/null | grep -q "."; then
|
|
174
|
+
success "cdk-nag-go found in go.mod"
|
|
175
|
+
else
|
|
176
|
+
warning "cdk-nag-go not found - recommended for comprehensive CDK validation"
|
|
177
|
+
warning "See: https://github.com/cdklabs/cdk-nag-go"
|
|
178
|
+
fi
|
|
179
|
+
;;
|
|
180
|
+
esac
|
|
181
|
+
|
|
182
|
+
success "Integration checks completed"
|
|
183
|
+
|
|
184
|
+
echo ""
|
|
185
|
+
info "💡 Note: This script focuses on template and meta-level validation."
|
|
186
|
+
info "For comprehensive CDK best practice checks (IAM, security, naming, etc.),"
|
|
187
|
+
info "use cdk-nag: https://github.com/cdklabs/cdk-nag"
|
|
188
|
+
|
|
189
|
+
echo ""
|
|
190
|
+
info "Checking synthesized templates..."
|
|
191
|
+
|
|
192
|
+
# Get list of synthesized templates
|
|
193
|
+
TEMPLATES=$(find "${PROJECT_ROOT}/cdk.out" -name "*.template.json" 2>/dev/null || echo "")
|
|
194
|
+
|
|
195
|
+
if [ -z "$TEMPLATES" ]; then
|
|
196
|
+
error "No CloudFormation templates found in cdk.out/"
|
|
197
|
+
exit 1
|
|
198
|
+
fi
|
|
199
|
+
|
|
200
|
+
TEMPLATE_COUNT=$(echo "$TEMPLATES" | wc -l)
|
|
201
|
+
success "Found ${TEMPLATE_COUNT} CloudFormation template(s)"
|
|
202
|
+
|
|
203
|
+
# Validate each template
|
|
204
|
+
for template in $TEMPLATES; do
|
|
205
|
+
STACK_NAME=$(basename "$template" .template.json)
|
|
206
|
+
|
|
207
|
+
# Check template size
|
|
208
|
+
TEMPLATE_SIZE=$(wc -c < "$template")
|
|
209
|
+
MAX_SIZE=51200 # 50KB warning threshold
|
|
210
|
+
|
|
211
|
+
if [ "$TEMPLATE_SIZE" -gt "$MAX_SIZE" ]; then
|
|
212
|
+
warning "${STACK_NAME}: Template size (${TEMPLATE_SIZE} bytes) is large"
|
|
213
|
+
warning "Consider using nested stacks to reduce size"
|
|
214
|
+
fi
|
|
215
|
+
|
|
216
|
+
# Count resources
|
|
217
|
+
RESOURCE_COUNT=$(jq '.Resources | length' "$template" 2>/dev/null || echo 0)
|
|
218
|
+
|
|
219
|
+
if [ "$RESOURCE_COUNT" -gt 200 ]; then
|
|
220
|
+
warning "${STACK_NAME}: High resource count (${RESOURCE_COUNT})"
|
|
221
|
+
warning "Consider splitting into multiple stacks"
|
|
222
|
+
else
|
|
223
|
+
success "${STACK_NAME}: ${RESOURCE_COUNT} resources"
|
|
224
|
+
fi
|
|
225
|
+
done
|
|
226
|
+
|
|
227
|
+
echo ""
|
|
228
|
+
echo "============================"
|
|
229
|
+
|
|
230
|
+
if [ "$VALIDATION_PASSED" = true ]; then
|
|
231
|
+
echo -e "${GREEN}✓ Validation passed${NC}"
|
|
232
|
+
echo ""
|
|
233
|
+
info "Stack is ready for deployment"
|
|
234
|
+
exit 0
|
|
235
|
+
else
|
|
236
|
+
echo -e "${RED}✗ Validation failed${NC}"
|
|
237
|
+
echo ""
|
|
238
|
+
error "Please fix the errors above before deploying"
|
|
239
|
+
exit 1
|
|
240
|
+
fi
|