@friggframework/devtools 2.0.0--canary.667.a0620c7.0 → 2.0.0--canary.702.d5e6de1.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 +1 -0
- package/frigg-cli/README.md +76 -78
- package/frigg-cli/__tests__/unit/commands/build.test.js +3 -0
- package/frigg-cli/__tests__/unit/commands/deploy.test.js +27 -30
- package/frigg-cli/__tests__/unit/commands/doctor.test.js +6 -10
- package/frigg-cli/__tests__/unit/commands/generate-iam.test.js +0 -18
- package/frigg-cli/__tests__/unit/commands/install.test.js +341 -601
- package/frigg-cli/__tests__/unit/commands/ui.test.js +30 -31
- package/frigg-cli/__tests__/unit/commands/validate-wiring.test.js +92 -0
- package/frigg-cli/__tests__/unit/dependencies.test.js +2 -6
- package/frigg-cli/build-command/index.js +6 -0
- package/frigg-cli/deploy-command/index.js +6 -0
- package/frigg-cli/generate-command/index.js +0 -1
- package/frigg-cli/generate-iam-command.js +0 -1
- package/frigg-cli/index.js +23 -10
- package/frigg-cli/index.test.js +158 -0
- package/frigg-cli/init-command/backend-first-handler.js +531 -395
- package/frigg-cli/init-command/index.js +35 -82
- package/frigg-cli/install-command/commit-changes.js +8 -40
- package/frigg-cli/install-command/environment-variables.js +0 -15
- package/frigg-cli/install-command/index.js +21 -96
- package/frigg-cli/install-command/install-package.js +4 -77
- package/frigg-cli/install-command/integration-file.js +11 -20
- package/frigg-cli/install-command/template.js +75 -102
- package/frigg-cli/install-command/validate-package.js +4 -36
- package/frigg-cli/package.json +1 -1
- package/frigg-cli/start-command/index.js +4 -0
- package/frigg-cli/start-command/start-command.test.js +3 -0
- package/frigg-cli/test/init-command.test.js +2 -9
- package/frigg-cli/validate-command/__tests__/init-validation.test.js +63 -0
- package/frigg-cli/validate-command/__tests__/integrations-checks.test.js +133 -0
- package/frigg-cli/validate-command/__tests__/validate-app-definition.test.js +326 -0
- package/frigg-cli/validate-command/__tests__/validate-command.test.js +241 -0
- package/frigg-cli/validate-command/__tests__/validate-module-command.test.js +119 -0
- package/frigg-cli/validate-command/checks/config.js +468 -0
- package/frigg-cli/validate-command/checks/integrations.js +274 -0
- package/frigg-cli/validate-command/fixtures/bad-module/index.js +18 -0
- package/frigg-cli/validate-command/fixtures/fathom-module/definition.js +76 -0
- package/frigg-cli/validate-command/fixtures/fathom-module/index.js +6 -0
- package/frigg-cli/validate-command/format-report.js +60 -0
- package/frigg-cli/validate-command/index.js +151 -0
- package/frigg-cli/validate-command/load-app-definition.js +93 -0
- package/frigg-cli/validate-command/load-module-definition.js +64 -0
- package/frigg-cli/validate-command/schema-issues.js +154 -0
- package/frigg-cli/validate-command/validate-app-definition.js +60 -0
- package/frigg-cli/validate-command/validate-module-definition.js +46 -0
- package/infrastructure/__tests__/postgres-config.test.js +835 -241
- package/infrastructure/__tests__/template-generation.test.js +8 -36
- package/infrastructure/app-definition-schema-contract.test.js +607 -0
- package/infrastructure/create-frigg-infrastructure.js +4 -1
- package/infrastructure/create-frigg-infrastructure.test.js +51 -0
- package/infrastructure/docs/POSTGRES-CONFIGURATION.md +60 -118
- package/infrastructure/domains/database/aurora-builder.js +2 -13
- package/infrastructure/domains/database/aurora-builder.test.js +0 -22
- package/infrastructure/domains/health/application/use-cases/__tests__/mismatch-analyzer-method-name.test.js +8 -12
- package/infrastructure/domains/health/application/use-cases/__tests__/repair-via-import-use-case.test.js +7 -19
- package/infrastructure/domains/health/application/use-cases/run-health-check-use-case.test.js +8 -12
- package/infrastructure/domains/health/domain/services/__tests__/import-progress-monitor.test.js +18 -17
- package/infrastructure/domains/health/domain/services/__tests__/update-progress-monitor.test.js +2 -12
- package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-relationship-analysis.test.js +1 -8
- package/infrastructure/domains/health/infrastructure/adapters/aws-property-reconciler.test.js +2 -4
- package/infrastructure/domains/health/infrastructure/adapters/aws-resource-detector.test.js +0 -10
- package/infrastructure/domains/networking/vpc-builder.js +8 -18
- package/infrastructure/domains/networking/vpc-builder.test.js +12 -26
- package/infrastructure/domains/security/iam-generator.js +5 -112
- package/infrastructure/domains/security/iam-generator.test.js +0 -94
- package/infrastructure/domains/shared/cloudformation-discovery.test.js +6 -36
- package/infrastructure/domains/shared/utilities/base-definition-factory.js +2 -26
- package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +1 -34
- package/infrastructure/infrastructure-composer.test.js +794 -268
- package/infrastructure/integration.test.js +381 -0
- package/infrastructure/scripts/build-prisma-layer.test.js +7 -28
- package/infrastructure/scripts/build-time-discovery.test.js +3 -18
- package/package.json +8 -10
- package/frigg-cli/__tests__/unit/commands/init.test.js +0 -688
- package/frigg-cli/init-command/deployment-modes.js +0 -7
- package/frigg-cli/init-command/safe-path.js +0 -58
- package/frigg-cli/init-command/scaffold-dependencies.js +0 -202
- package/frigg-cli/install-command/app-definition.js +0 -174
- package/frigg-cli/install-command/resolve-module.js +0 -69
- package/frigg-cli/templates/backend/README.md +0 -267
- package/frigg-cli/templates/backend/env.example +0 -20
- package/frigg-cli/templates/backend/gitignore +0 -10
- package/frigg-cli/templates/backend/index.js +0 -114
- package/frigg-cli/templates/backend/infrastructure.js +0 -20
- package/infrastructure/__tests__/management-api-gateway-routes.test.js +0 -281
- package/infrastructure/__tests__/scaffold-default-infrastructure.test.js +0 -148
|
@@ -94,19 +94,7 @@ describe('Base Definition Factory', () => {
|
|
|
94
94
|
|
|
95
95
|
expect(result.functions.auth.handler).toBe('node_modules/@friggframework/core/handlers/routers/auth.handler');
|
|
96
96
|
expect(result.functions.auth.layers).toEqual([{ Ref: 'PrismaLambdaLayer' }]);
|
|
97
|
-
expect(
|
|
98
|
-
result.functions.auth.events.map(
|
|
99
|
-
(e) => `${e.httpApi.method} ${e.httpApi.path}`
|
|
100
|
-
)
|
|
101
|
-
).toEqual([
|
|
102
|
-
'ANY /api/integrations',
|
|
103
|
-
'ANY /api/integrations/{proxy+}',
|
|
104
|
-
'ANY /api/authorize',
|
|
105
|
-
'ANY /api/entity',
|
|
106
|
-
'ANY /api/entity/{proxy+}',
|
|
107
|
-
'ANY /api/entities',
|
|
108
|
-
'ANY /api/entities/{proxy+}',
|
|
109
|
-
]);
|
|
97
|
+
expect(result.functions.auth.events).toHaveLength(3);
|
|
110
98
|
});
|
|
111
99
|
|
|
112
100
|
it('should NOT include legacy dbMigrate function', () => {
|
|
@@ -133,27 +121,6 @@ describe('Base Definition Factory', () => {
|
|
|
133
121
|
expect(result.resources.Resources.ApiGatewayAlarm5xx).toBeDefined();
|
|
134
122
|
});
|
|
135
123
|
|
|
136
|
-
it('alarms on the HTTP API 5xx metric of the API osls creates', () => {
|
|
137
|
-
// The Frigg functions use `httpApi` events, so osls creates an
|
|
138
|
-
// API Gateway v2 HTTP API (logical ID HttpApi) with only the
|
|
139
|
-
// `$default` stage. HTTP APIs publish `5xx` (REST APIs publish
|
|
140
|
-
// `5XXError`) with the ApiId dimension; a Stage dimension set to
|
|
141
|
-
// the deploy stage name would never match `$default`.
|
|
142
|
-
const result = createBaseDefinition({}, {}, {});
|
|
143
|
-
const usesHttpApi = Object.values(result.functions).some((fn) =>
|
|
144
|
-
(fn.events || []).some((event) => event.httpApi)
|
|
145
|
-
);
|
|
146
|
-
expect(usesHttpApi).toBe(true);
|
|
147
|
-
|
|
148
|
-
const alarm = result.resources.Resources.ApiGatewayAlarm5xx;
|
|
149
|
-
expect(alarm.Properties).toMatchObject({
|
|
150
|
-
Namespace: 'AWS/ApiGateway',
|
|
151
|
-
MetricName: '5xx',
|
|
152
|
-
Dimensions: [{ Name: 'ApiId', Value: { Ref: 'HttpApi' } }],
|
|
153
|
-
AlarmActions: [{ Ref: 'InternalErrorBridgeTopic' }],
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
|
|
157
124
|
it('should include base IAM permissions', () => {
|
|
158
125
|
const result = createBaseDefinition({}, {}, {});
|
|
159
126
|
|