Setting the file. One moment.
Prereq Schemas · Azure App Onboard Prereq · microsoft/azure-skills · Skills Docs
ContentsBack to the top of the page references/prereq-schemas.ts
references/ prereq-schemas.ts
TypeScript · 80 lines · 4 KB
16
export
interface
BuildRequirements
{
17 hasNativeModules : boolean ;
18 hasDockerfile : boolean ;
19 /** True when the app can deploy on App Service F1 (Free) SKU */
20 f1Viable : boolean ;
21 /** True when Dockerfile uses BuildKit-only syntax (--mount, # syntax=docker/dockerfile:1) */
22 hasBuildKitSyntax ?: boolean ;
23 /** Port from EXPOSE directive — used for Container Apps targetPort */
24 exposedPort ?: number ;
25 /** Estimated native module compilation time in seconds (typically 30–300s;
26 * larger compiled dependencies like scipy may take 600+s).
27 * Used by deploy phase to set WEBSITES_CONTAINER_START_TIME_LIMIT. */
28 estimatedInstallTime ?: number ;
29 /** Why F1 is not viable — set when f1Viable is false.
30 * Examples: "native modules (node-gyp)", "large dependency tree (27 pinned deps)",
31 * "build-time compilation (TypeScript tsc)", "major migration (Flask 0.12→2.3)" */
32 f1BlockReason ?: string ;
33 }
34
35 /** Structured warning from prereq evaluation */
36 export interface PrereqWarning {
37 id : string ;
38 component : string ;
39 axis : "build" | "completeness" | "deployability" ;
40 summary : string ;
41 detail : string ;
42 /** What to do about this warning — actionable fix instruction.
43 * Examples: "Set PGSSLMODE=require env var in IaC", "Add trust proxy setting to Express app" */
44 fix : string ;
45 /** When the fix should be applied in the pipeline.
46 * "prereq" = prereq can fix this NOW with user approval (code/config changes that prevent deploy failures).
47 * "scaffold" = handled in generated IaC only (env var override, probe config). NEVER modifies user code.
48 * "deploy-gate" = surface at deploy approval gate for user awareness. No code changes.
49 * "post-deploy" = informational — add to postDeployRecommendations[], no action during pipeline. */
50 fixPhase : "prereq" | "scaffold" | "deploy-gate" | "post-deploy" ;
51 }
52
53 export interface PrereqOutput {
54 // AppOnboardComponent[] — see session-schemas.ts
55 components : any [];
56 /** Structured warnings — see prereq-artifacts.md for write rules */
57 warnings : PrereqWarning [];
58 detectedStack : string ;
59 /** Prereq-only: auto-approves readiness gate + simplifies prepare alt analysis.
60 * Does NOT skip any phase, gate, reference read, or validation. */
61 fastTrackEligible : boolean ;
62 overallHealth ?: "ready" | "readyWithCaveats" | "blocked" ;
63 /** Build-time requirements detected from manifests and lockfiles */
64 buildRequirements ?: BuildRequirements ;
65 /** Detected health endpoint path (e.g., "/health", "/api/v1/health/").
66 * Used by scaffold for Azure health probe config and deploy for curl health check.
67 * null if no health endpoint found (triggers W-HEALTH warning). */
68 healthEndpoint ?: string | null ;
69 /** Application entry point detected from manifest (e.g., "index.js", "main.py", "cmd/main.go").
70 * Used by prepare/deploy-strategy.md for startupCommand generation. */
71 entryPoint ?: string ;
72 /** Structured recommendations derived from WARN findings.
73 * Merged into prepare-plan.json.postDeployRecommendations[] by the prepare phase.
74 * PostDeployRecommendation type — see session-schemas.ts */
75 postDeployRecommendations ?: any [];
76 /** First-run init commands (DB migrations, seed data) detected from
77 * framework signals + migrations/ dir. Prepare prepends required entries
78 * to deployStrategy.startupCommand. See dependency-compatibility.md § First-Run. */
79 initCommands ?: { type : string ; framework : string ; command : string ; required : boolean }[];
80 }