@fjall/deploy-core 2.27.0 → 2.30.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.
Files changed (151) hide show
  1. package/dist/.minified +1 -1
  2. package/dist/src/aws/organisations/backup.d.ts +7 -2
  3. package/dist/src/aws/organisations/backup.js +2 -2
  4. package/dist/src/aws/organisations/index.d.ts +1 -1
  5. package/dist/src/aws/organisations/index.js +1 -1
  6. package/dist/src/aws/organisations/oidcProvider.d.ts +37 -0
  7. package/dist/src/aws/organisations/oidcProvider.js +1 -1
  8. package/dist/src/aws/organisations/organisation.d.ts +21 -0
  9. package/dist/src/aws/organisations/organisation.js +1 -1
  10. package/dist/src/aws/utils/cloudformationEventHelpers.d.ts +45 -0
  11. package/dist/src/aws/utils/cloudformationEventHelpers.js +1 -1
  12. package/dist/src/aws/utils/cloudformationEventTypes.d.ts +1 -1
  13. package/dist/src/aws/utils/cloudformationEvents.d.ts +2 -1
  14. package/dist/src/aws/utils/cloudformationEvents.js +1 -1
  15. package/dist/src/aws/utils/stackStatus.js +1 -1
  16. package/dist/src/index.d.ts +16 -3
  17. package/dist/src/index.js +1 -1
  18. package/dist/src/orchestration/activeDeploymentGuard.d.ts +41 -0
  19. package/dist/src/orchestration/activeDeploymentGuard.js +8 -4
  20. package/dist/src/orchestration/application/applicationDeploy.d.ts +9 -0
  21. package/dist/src/orchestration/application/applicationDeploy.js +1 -1
  22. package/dist/src/orchestration/application/applicationDeployHelpers.d.ts +20 -3
  23. package/dist/src/orchestration/application/applicationDeployHelpers.js +3 -3
  24. package/dist/src/orchestration/application/applicationDestroy.js +1 -1
  25. package/dist/src/orchestration/application/approvalGate.d.ts +15 -1
  26. package/dist/src/orchestration/application/approvalGate.js +1 -1
  27. package/dist/src/orchestration/application/destructionGate.d.ts +164 -0
  28. package/dist/src/orchestration/application/destructionGate.js +5 -0
  29. package/dist/src/orchestration/application/dockerBuildHelper.js +1 -1
  30. package/dist/src/orchestration/application/leaseGate.d.ts +30 -0
  31. package/dist/src/orchestration/application/leaseGate.js +1 -0
  32. package/dist/src/orchestration/application/openNextBuild.d.ts +1 -1
  33. package/dist/src/orchestration/application/openNextBuild.js +3 -3
  34. package/dist/src/orchestration/application/plan/approvalToken.d.ts +15 -0
  35. package/dist/src/orchestration/application/plan/approvalToken.js +1 -1
  36. package/dist/src/orchestration/application/plan/changeSetEscalation.d.ts +46 -0
  37. package/dist/src/orchestration/application/plan/changeSetEscalation.js +1 -0
  38. package/dist/src/orchestration/application/plan/computeDeployPlan.d.ts +13 -0
  39. package/dist/src/orchestration/application/plan/computeDeployPlan.js +1 -1
  40. package/dist/src/orchestration/application/plan/index.d.ts +4 -1
  41. package/dist/src/orchestration/application/plan/index.js +1 -1
  42. package/dist/src/orchestration/application/plan/loadDeployPlan.d.ts +32 -0
  43. package/dist/src/orchestration/application/plan/loadDeployPlan.js +1 -0
  44. package/dist/src/orchestration/application/plan/pinnedNames.d.ts +31 -0
  45. package/dist/src/orchestration/application/plan/pinnedNames.js +1 -0
  46. package/dist/src/orchestration/application/plan/registryOverlay.d.ts +83 -0
  47. package/dist/src/orchestration/application/plan/registryOverlay.js +1 -0
  48. package/dist/src/orchestration/application/plan/renderDeployPlan.d.ts +4 -1
  49. package/dist/src/orchestration/application/plan/renderDeployPlan.js +1 -1
  50. package/dist/src/orchestration/application/plan/types.d.ts +31 -0
  51. package/dist/src/orchestration/application/plan/types.js +1 -0
  52. package/dist/src/orchestration/builders/frameworkRegistry.js +1 -1
  53. package/dist/src/orchestration/builders/index.d.ts +1 -0
  54. package/dist/src/orchestration/builders/index.js +1 -1
  55. package/dist/src/orchestration/builders/openNextBuilder.js +1 -1
  56. package/dist/src/orchestration/builders/staticSiteBuilder.d.ts +27 -0
  57. package/dist/src/orchestration/builders/staticSiteBuilder.js +2 -0
  58. package/dist/src/orchestration/contextHelpers.d.ts +37 -1
  59. package/dist/src/orchestration/contextHelpers.js +1 -1
  60. package/dist/src/orchestration/drift/classifyDriftFailure.d.ts +31 -0
  61. package/dist/src/orchestration/drift/classifyDriftFailure.js +1 -0
  62. package/dist/src/orchestration/drift/detectStackDrift.d.ts +37 -0
  63. package/dist/src/orchestration/drift/detectStackDrift.js +1 -0
  64. package/dist/src/orchestration/drift/driftPreFlight.d.ts +73 -0
  65. package/dist/src/orchestration/drift/driftPreFlight.js +7 -0
  66. package/dist/src/orchestration/drift/driftProbe.d.ts +113 -0
  67. package/dist/src/orchestration/drift/driftProbe.js +1 -0
  68. package/dist/src/orchestration/drift/driftSuspectJournal.d.ts +40 -0
  69. package/dist/src/orchestration/drift/driftSuspectJournal.js +1 -0
  70. package/dist/src/orchestration/drift/preFlightGate.d.ts +44 -0
  71. package/dist/src/orchestration/drift/preFlightGate.js +2 -0
  72. package/dist/src/orchestration/index.d.ts +19 -0
  73. package/dist/src/orchestration/index.js +1 -1
  74. package/dist/src/orchestration/organisation/cascadeDestroyHelpers.d.ts +7 -0
  75. package/dist/src/orchestration/organisation/cascadeDestroyHelpers.js +1 -1
  76. package/dist/src/orchestration/organisation/cascadeHelpers.js +1 -1
  77. package/dist/src/orchestration/organisation/organisationDestroy.js +3 -3
  78. package/dist/src/orchestration/organisationDeploy/infraSteps.d.ts +8 -1
  79. package/dist/src/orchestration/organisationDeploy/infraSteps.js +1 -1
  80. package/dist/src/orchestration/organisationDeploy/orgCascadeDeploy.js +5 -5
  81. package/dist/src/orchestration/organisationDeploy/orgContext.d.ts +21 -2
  82. package/dist/src/orchestration/organisationDeploy/orgContext.js +1 -1
  83. package/dist/src/orchestration/organisationDeploy/singleComponentDeploy.js +1 -1
  84. package/dist/src/orchestration/remediation/driftRepairGate.d.ts +66 -0
  85. package/dist/src/orchestration/remediation/driftRepairGate.js +1 -0
  86. package/dist/src/orchestration/remediation/forensicsCapture.d.ts +49 -0
  87. package/dist/src/orchestration/remediation/forensicsCapture.js +1 -0
  88. package/dist/src/orchestration/remediation/forgetResource.d.ts +423 -0
  89. package/dist/src/orchestration/remediation/forgetResource.js +1 -0
  90. package/dist/src/orchestration/remediation/pinRemediation.d.ts +121 -0
  91. package/dist/src/orchestration/remediation/pinRemediation.js +1 -0
  92. package/dist/src/orchestration/remediation/postFailureRepairOffer.d.ts +77 -0
  93. package/dist/src/orchestration/remediation/postFailureRepairOffer.js +14 -0
  94. package/dist/src/orchestration/remediation/recreatePreFlight.d.ts +47 -0
  95. package/dist/src/orchestration/remediation/recreatePreFlight.js +1 -0
  96. package/dist/src/orchestration/remediation/recreateResource.d.ts +110 -0
  97. package/dist/src/orchestration/remediation/recreateResource.js +1 -0
  98. package/dist/src/orchestration/remediation/remediationJournal.d.ts +88 -0
  99. package/dist/src/orchestration/remediation/remediationJournal.js +2 -0
  100. package/dist/src/orchestration/remediation/removalUpdate.d.ts +135 -0
  101. package/dist/src/orchestration/remediation/removalUpdate.js +1 -0
  102. package/dist/src/orchestration/remediation/retainFlip.d.ts +294 -0
  103. package/dist/src/orchestration/remediation/retainFlip.js +1 -0
  104. package/dist/src/orchestration/spawnHelpers.d.ts +9 -0
  105. package/dist/src/orchestration/spawnHelpers.js +1 -1
  106. package/dist/src/services/application/ApplicationStackService.d.ts +5 -3
  107. package/dist/src/services/application/ApplicationStackService.js +1 -1
  108. package/dist/src/services/application/applicationStackHelpers.d.ts +8 -6
  109. package/dist/src/services/application/applicationStackHelpers.js +3 -3
  110. package/dist/src/services/index.d.ts +2 -2
  111. package/dist/src/services/index.js +1 -1
  112. package/dist/src/services/infrastructure/CdkEventMonitoring.d.ts +15 -0
  113. package/dist/src/services/infrastructure/CdkEventMonitoring.js +1 -1
  114. package/dist/src/services/infrastructure/CdkOutputAnalyser.d.ts +8 -0
  115. package/dist/src/services/infrastructure/CdkOutputAnalyser.js +2 -1
  116. package/dist/src/services/infrastructure/CdkService.js +3 -3
  117. package/dist/src/services/infrastructure/CfnRegistryService.d.ts +68 -0
  118. package/dist/src/services/infrastructure/CfnRegistryService.js +1 -0
  119. package/dist/src/services/infrastructure/CloudFormationService.d.ts +5 -2
  120. package/dist/src/services/infrastructure/CloudFormationService.js +1 -1
  121. package/dist/src/services/infrastructure/EcsServiceResolver.d.ts +23 -3
  122. package/dist/src/services/infrastructure/EcsServiceResolver.js +1 -1
  123. package/dist/src/services/infrastructure/cfnRegistrySeed.d.ts +10 -0
  124. package/dist/src/services/infrastructure/cfnRegistrySeed.js +1 -0
  125. package/dist/src/services/infrastructure/changeSetProbe.d.ts +88 -0
  126. package/dist/src/services/infrastructure/changeSetProbe.js +1 -0
  127. package/dist/src/services/infrastructure/index.d.ts +2 -0
  128. package/dist/src/services/infrastructure/index.js +1 -1
  129. package/dist/src/types/callbackKeys.d.ts +1 -1
  130. package/dist/src/types/callbackKeys.js +1 -1
  131. package/dist/src/types/callbacks.d.ts +22 -0
  132. package/dist/src/types/config/entitlements.d.ts +9 -0
  133. package/dist/src/types/config/orgConfig.d.ts +6 -0
  134. package/dist/src/types/deployEvent.d.ts +10 -3
  135. package/dist/src/types/deployEvent.js +1 -1
  136. package/dist/src/types/deploymentEventSchema.d.ts +1 -0
  137. package/dist/src/types/deploymentEventSchema.js +1 -1
  138. package/dist/src/types/destruction.d.ts +212 -0
  139. package/dist/src/types/destruction.js +1 -0
  140. package/dist/src/types/detection/patternTypes.d.ts +9 -4
  141. package/dist/src/types/detection/patternTypes.js +1 -1
  142. package/dist/src/types/drift.d.ts +72 -0
  143. package/dist/src/types/drift.js +1 -0
  144. package/dist/src/types/frameworkBuilder.d.ts +14 -0
  145. package/dist/src/types/index.d.ts +44 -4
  146. package/dist/src/types/index.js +1 -1
  147. package/dist/src/types/operations.d.ts +2 -1
  148. package/dist/src/types/params.d.ts +142 -0
  149. package/dist/src/types/remediation.d.ts +126 -0
  150. package/dist/src/types/remediation.js +1 -0
  151. package/package.json +6 -4
@@ -1 +1 @@
1
- import{z as e}from"zod";import{TRAIL_MIGRATION_PHASES as r,TRAIL_MIGRATION_STATUSES as i}from"./events.js";const c=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],n=["platform","domains","accounts"],m=["started","deploying","completed","failed"],l=2048,p=4096,u=2048,g=["step","resource","docker","ecs","error","complete","cascade_phase","cascade_account","cascade_missing_accounts","parallel_phase","detection","trail_migration","log"],d={step:"step",resource:"resource",docker:"docker",ecs:"ecs",error:"error",complete:null,cascade_phase:"cascadePhase",cascade_account:"cascadeAccount",cascade_missing_accounts:"cascadeMissingAccounts",parallel_phase:"parallelPhase",detection:"detection",trail_migration:"trailMigration",log:"log"},_=e.object({type:e.enum(g),timestamp:e.string().max(64),sequence:e.number().int().nonnegative().optional(),step:e.object({id:e.string().max(256),name:e.string().max(256),index:e.number(),total:e.number(),status:e.string().max(64)}).strict().optional(),resource:e.object({logicalId:e.string().max(256),resourceType:e.string().max(256),category:e.enum(c),group:e.string().max(128).optional(),constructPath:e.string().max(512).optional(),displayName:e.string().max(256),status:e.string().max(64),statusReason:e.string().max(l).optional(),physicalId:e.string().max(2048).optional(),expectedDurationSeconds:e.number().optional(),stack:e.string().max(256).optional()}).strict().optional(),docker:e.object({message:e.string().max(2048),percentage:e.number().optional()}).strict().optional(),ecs:e.object({status:e.string().max(64),message:e.string().max(2048).optional(),percentage:e.number().optional()}).strict().optional(),error:e.object({message:e.string().max(p),category:e.string().max(128).optional(),remediation:e.array(e.string().max(1024)).max(10).optional()}).strict().optional(),message:e.string().max(2048).optional(),cascadePhase:e.object({phase:e.enum(n),status:e.enum(["started","completed"])}).strict().optional(),cascadeAccount:e.object({accountId:e.string().max(32),region:e.string().max(32),operationKey:e.string().max(256),status:e.enum(m),error:e.string().max(2048).optional(),phase:e.enum(["bootstrap","synth","deploy","destroy"]).optional(),cascadePhase:e.enum(n).optional()}).strict().optional(),cascadeMissingAccounts:e.object({accountNames:e.array(e.string().max(256)).max(256)}).strict().optional(),parallelPhase:e.object({stacks:e.array(e.string().max(256)).max(20),status:e.enum(["started","completed"]),results:e.array(e.object({stack:e.string().max(256),success:e.boolean(),error:e.string().max(2048).optional()}).strict()).max(20).optional()}).strict().optional(),detection:e.object({pattern:e.string().max(128).nullable(),hasDockerfile:e.boolean(),hasDifferences:e.boolean(),resources:e.object({hasNetwork:e.boolean(),hasCompute:e.boolean(),hasDatabase:e.boolean(),hasStorage:e.boolean(),hasMessaging:e.boolean(),hasCdn:e.boolean()}).strict(),requiredSecrets:e.array(e.string().max(512)).max(100).optional()}).strict().optional(),trailMigration:e.object({accountId:e.string().max(32),accountName:e.string().max(256),phase:e.enum(r),status:e.enum(i),detail:e.string().max(u).optional()}).strict().optional(),log:e.object({message:e.string().max(2048),level:e.enum(["info","debug","warn"])}).strict().optional()}).strict().superRefine((t,o)=>{const a=d[t.type],s=a?t[a]:void 0;a&&s==null&&o.addIssue({code:e.ZodIssueCode.custom,message:`"${a}" is required when type is "${t.type}"`,path:[a]}),t.type==="complete"&&!t.message&&o.addIssue({code:e.ZodIssueCode.custom,message:'"message" is required when type is "complete"',path:["message"]})});function b(t){if(t==="platform")return"platform";if(t==="account")return"accounts"}export{m as CASCADE_ACCOUNT_STATUSES,n as CASCADE_PHASES,p as DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX,c as DEPLOYMENT_EVENT_RESOURCE_CATEGORIES,l as DEPLOYMENT_EVENT_STATUS_REASON_MAX,u as DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX,g as DEPLOYMENT_EVENT_TYPES,_ as DeploymentEventSchema,b as toCascadePhase};
1
+ import{z as e}from"zod";import{TRAIL_MIGRATION_PHASES as r,TRAIL_MIGRATION_STATUSES as i}from"./events.js";const c=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],n=["platform","domains","accounts"],m=["started","deploying","completed","failed"],l=2048,p=4096,u=2048,g=["step","resource","docker","ecs","error","complete","cascade_phase","cascade_account","cascade_missing_accounts","parallel_phase","detection","trail_migration","log"],d={step:"step",resource:"resource",docker:"docker",ecs:"ecs",error:"error",complete:null,cascade_phase:"cascadePhase",cascade_account:"cascadeAccount",cascade_missing_accounts:"cascadeMissingAccounts",parallel_phase:"parallelPhase",detection:"detection",trail_migration:"trailMigration",log:"log"},_=e.object({type:e.enum(g),timestamp:e.string().max(64),sequence:e.number().int().nonnegative().optional(),step:e.object({id:e.string().max(256),name:e.string().max(256),index:e.number(),total:e.number(),status:e.string().max(64)}).strict().optional(),resource:e.object({logicalId:e.string().max(256),resourceType:e.string().max(256),category:e.enum(c),group:e.string().max(128).optional(),constructPath:e.string().max(512).optional(),displayName:e.string().max(256),status:e.string().max(64),statusReason:e.string().max(l).optional(),physicalId:e.string().max(2048).optional(),expectedDurationSeconds:e.number().optional(),stack:e.string().max(256).optional(),clientRequestToken:e.string().max(256).optional()}).strict().optional(),docker:e.object({message:e.string().max(2048),percentage:e.number().optional()}).strict().optional(),ecs:e.object({status:e.string().max(64),message:e.string().max(2048).optional(),percentage:e.number().optional()}).strict().optional(),error:e.object({message:e.string().max(p),category:e.string().max(128).optional(),remediation:e.array(e.string().max(1024)).max(10).optional()}).strict().optional(),message:e.string().max(2048).optional(),cascadePhase:e.object({phase:e.enum(n),status:e.enum(["started","completed"])}).strict().optional(),cascadeAccount:e.object({accountId:e.string().max(32),region:e.string().max(32),operationKey:e.string().max(256),status:e.enum(m),error:e.string().max(2048).optional(),phase:e.enum(["bootstrap","synth","deploy","destroy"]).optional(),cascadePhase:e.enum(n).optional()}).strict().optional(),cascadeMissingAccounts:e.object({accountNames:e.array(e.string().max(256)).max(256)}).strict().optional(),parallelPhase:e.object({stacks:e.array(e.string().max(256)).max(20),status:e.enum(["started","completed"]),results:e.array(e.object({stack:e.string().max(256),success:e.boolean(),error:e.string().max(2048).optional()}).strict()).max(20).optional()}).strict().optional(),detection:e.object({pattern:e.string().max(128).nullable(),hasDockerfile:e.boolean(),hasDifferences:e.boolean(),resources:e.object({hasNetwork:e.boolean(),hasCompute:e.boolean(),hasDatabase:e.boolean(),hasStorage:e.boolean(),hasMessaging:e.boolean(),hasCdn:e.boolean()}).strict(),requiredSecrets:e.array(e.string().max(512)).max(100).optional()}).strict().optional(),trailMigration:e.object({accountId:e.string().max(32),accountName:e.string().max(256),phase:e.enum(r),status:e.enum(i),detail:e.string().max(u).optional()}).strict().optional(),log:e.object({message:e.string().max(2048),level:e.enum(["info","debug","warn"])}).strict().optional()}).strict().superRefine((t,o)=>{const a=d[t.type],s=a?t[a]:void 0;a&&s==null&&o.addIssue({code:e.ZodIssueCode.custom,message:`"${a}" is required when type is "${t.type}"`,path:[a]}),t.type==="complete"&&!t.message&&o.addIssue({code:e.ZodIssueCode.custom,message:'"message" is required when type is "complete"',path:["message"]})});function b(t){if(t==="platform")return"platform";if(t==="account")return"accounts"}export{m as CASCADE_ACCOUNT_STATUSES,n as CASCADE_PHASES,p as DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX,c as DEPLOYMENT_EVENT_RESOURCE_CATEGORIES,l as DEPLOYMENT_EVENT_STATUS_REASON_MAX,u as DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX,g as DEPLOYMENT_EVENT_TYPES,_ as DeploymentEventSchema,b as toCascadePhase};
@@ -0,0 +1,212 @@
1
+ /**
2
+ * The destruction-ticket contract — the single cross-surface shape for the
3
+ * unconditional destruction gate (drift-remediation plan § 4.1). Declared ONCE
4
+ * here; the CLI and webapp re-export, never redeclare (coupled discriminated
5
+ * unions share a source at 2 occurrences).
6
+ *
7
+ * Consent semantics: exact, case-sensitive `{physicalName, verb}` pairs. No
8
+ * blanket flag exists or will exist — `autoApprove`, `skipConfirmation`,
9
+ * `force`, and approval tokens NEVER satisfy the gate.
10
+ */
11
+ import { z } from "zod";
12
+ export declare const RemediationVerbSchema: z.ZodEnum<{
13
+ abort: "abort";
14
+ forget: "forget";
15
+ recreate: "recreate";
16
+ pin: "pin";
17
+ repair: "repair";
18
+ }>;
19
+ export type RemediationVerb = z.infer<typeof RemediationVerbSchema>;
20
+ /**
21
+ * Canonical one-line meaning per verb (plan § 3) — the SSoT gloss every
22
+ * surface renders (coupled values, one home): the interactive ceremony's verb
23
+ * menu and the drift surface's verb list consume THIS record, never local
24
+ * prose. Exhaustive over the schema-derived union, so a verb addition fails
25
+ * typecheck here. Context-neutral wording — the same line must read correctly
26
+ * as a menu consequence and as a `verb (gloss)` parenthetical.
27
+ */
28
+ export declare const REMEDIATION_VERB_GLOSS: Readonly<Record<RemediationVerb, string>>;
29
+ export declare const DESTRUCTION_FINDINGS: readonly ["replacement-required", "pinned-name-replacement", "resource-deleted", "stack-deleted", "data-loss-delete"];
30
+ export declare const DestructionFindingSchema: z.ZodEnum<{
31
+ "replacement-required": "replacement-required";
32
+ "pinned-name-replacement": "pinned-name-replacement";
33
+ "resource-deleted": "resource-deleted";
34
+ "stack-deleted": "stack-deleted";
35
+ "data-loss-delete": "data-loss-delete";
36
+ }>;
37
+ export type DestructionFinding = z.infer<typeof DestructionFindingSchema>;
38
+ /**
39
+ * Ticket verdict provenance = the plan's replacement-verdict sources plus
40
+ * `drift-probe` (a resource-deleted row proven by a direct NotFound from the
41
+ * owning service — Phase 6 drift-repair tickets). Deliberately a superset:
42
+ * plan rows never claim `drift-probe`, and the plan union must not widen.
43
+ */
44
+ export declare const TICKET_VERDICT_SOURCES: readonly ["registry", "registry (change-set unverified)", "change-set", "cdk-spec (unverified)", "drift-probe"];
45
+ export declare const TicketVerdictSourceSchema: z.ZodEnum<{
46
+ registry: "registry";
47
+ "registry (change-set unverified)": "registry (change-set unverified)";
48
+ "change-set": "change-set";
49
+ "cdk-spec (unverified)": "cdk-spec (unverified)";
50
+ "drift-probe": "drift-probe";
51
+ }>;
52
+ export type TicketVerdictSource = z.infer<typeof TicketVerdictSourceSchema>;
53
+ export declare const DestructionTicketResourceSchema: z.ZodObject<{
54
+ stack: z.ZodString;
55
+ logicalId: z.ZodString;
56
+ resourceType: z.ZodString;
57
+ physicalName: z.ZodString;
58
+ finding: z.ZodEnum<{
59
+ "replacement-required": "replacement-required";
60
+ "pinned-name-replacement": "pinned-name-replacement";
61
+ "resource-deleted": "resource-deleted";
62
+ "stack-deleted": "stack-deleted";
63
+ "data-loss-delete": "data-loss-delete";
64
+ }>;
65
+ cause: z.ZodString;
66
+ offendingProperties: z.ZodArray<z.ZodString>;
67
+ verdictSource: z.ZodEnum<{
68
+ registry: "registry";
69
+ "registry (change-set unverified)": "registry (change-set unverified)";
70
+ "change-set": "change-set";
71
+ "cdk-spec (unverified)": "cdk-spec (unverified)";
72
+ "drift-probe": "drift-probe";
73
+ }>;
74
+ dataLossRisk: z.ZodBoolean;
75
+ verbs: z.ZodArray<z.ZodEnum<{
76
+ abort: "abort";
77
+ forget: "forget";
78
+ recreate: "recreate";
79
+ pin: "pin";
80
+ repair: "repair";
81
+ }>>;
82
+ }, z.core.$strict>;
83
+ export type DestructionTicketResource = z.infer<typeof DestructionTicketResourceSchema>;
84
+ export declare const DestructionTicketSchema: z.ZodObject<{
85
+ ticketDigest: z.ZodString;
86
+ resources: z.ZodArray<z.ZodObject<{
87
+ stack: z.ZodString;
88
+ logicalId: z.ZodString;
89
+ resourceType: z.ZodString;
90
+ physicalName: z.ZodString;
91
+ finding: z.ZodEnum<{
92
+ "replacement-required": "replacement-required";
93
+ "pinned-name-replacement": "pinned-name-replacement";
94
+ "resource-deleted": "resource-deleted";
95
+ "stack-deleted": "stack-deleted";
96
+ "data-loss-delete": "data-loss-delete";
97
+ }>;
98
+ cause: z.ZodString;
99
+ offendingProperties: z.ZodArray<z.ZodString>;
100
+ verdictSource: z.ZodEnum<{
101
+ registry: "registry";
102
+ "registry (change-set unverified)": "registry (change-set unverified)";
103
+ "change-set": "change-set";
104
+ "cdk-spec (unverified)": "cdk-spec (unverified)";
105
+ "drift-probe": "drift-probe";
106
+ }>;
107
+ dataLossRisk: z.ZodBoolean;
108
+ verbs: z.ZodArray<z.ZodEnum<{
109
+ abort: "abort";
110
+ forget: "forget";
111
+ recreate: "recreate";
112
+ pin: "pin";
113
+ repair: "repair";
114
+ }>>;
115
+ }, z.core.$strict>>;
116
+ }, z.core.$strict>;
117
+ export type DestructionTicket = z.infer<typeof DestructionTicketSchema>;
118
+ /** One named consent: the exact physical name plus the chosen verb. */
119
+ export declare const DestructionConsentSchema: z.ZodObject<{
120
+ physicalName: z.ZodString;
121
+ verb: z.ZodEnum<{
122
+ abort: "abort";
123
+ forget: "forget";
124
+ recreate: "recreate";
125
+ pin: "pin";
126
+ repair: "repair";
127
+ }>;
128
+ }, z.core.$strict>;
129
+ export type DestructionConsent = z.infer<typeof DestructionConsentSchema>;
130
+ /**
131
+ * Per-consent verdicts for the fail-closed report ([G6]): a consent either
132
+ * matched a pending resource with a legal verb, named a resource the ticket
133
+ * does not contain (surplus / misspelt — fail closed, never ignored), or
134
+ * named a real resource with an illegal verb.
135
+ */
136
+ export declare const CONSENT_VERDICTS: readonly ["matched", "unmatched", "wrong-verb"];
137
+ export type ConsentVerdict = (typeof CONSENT_VERDICTS)[number];
138
+ export interface ConsentVerdictRow {
139
+ physicalName: string;
140
+ verb: RemediationVerb;
141
+ verdict: ConsentVerdict;
142
+ /** Human detail for non-matched rows (e.g. the legal verbs). */
143
+ detail?: string;
144
+ }
145
+ /** The full consent evaluation — rendered as the per-name verdict table. */
146
+ export interface DestructionConsentReport {
147
+ /** One row per supplied consent, in supply order. */
148
+ rows: ConsentVerdictRow[];
149
+ /** Ticket physical names no consent covered. */
150
+ uncovered: string[];
151
+ /**
152
+ * Consents were minted against a different ticket digest (the plan changed
153
+ * between mint and apply) — every consent is treated as stale (TOCTOU).
154
+ */
155
+ digestMismatch: boolean;
156
+ /** On mismatch: the digest the consents were minted against. */
157
+ suppliedDigest?: string;
158
+ /** On mismatch: what the pending destructive changes digest to now. */
159
+ currentDigest?: string;
160
+ /** True only when every resource is covered by a matched consent. */
161
+ satisfied: boolean;
162
+ }
163
+ /**
164
+ * WHY the gate withheld — the structured outcome every surface branches on so
165
+ * a user who completed the ceremony is never told to consent again:
166
+ * - `awaiting-consent` — no consents were supplied at all
167
+ * - `declined` — the interactive ceremony was declined, or an
168
+ * abort verb was consented (operator withhold)
169
+ * - `consents-invalid` — consents were supplied but failed evaluation
170
+ * (mismatch, wrong verb, uncovered, stale digest)
171
+ * - `consent-not-executable` — consents fully satisfied the ticket, but a
172
+ * consented verb has no execution arm in this
173
+ * release (truthful withhold, reasons name it)
174
+ */
175
+ export declare const DestructionOutcomeSchema: z.ZodEnum<{
176
+ "awaiting-consent": "awaiting-consent";
177
+ declined: "declined";
178
+ "consents-invalid": "consents-invalid";
179
+ "consent-not-executable": "consent-not-executable";
180
+ }>;
181
+ export type DestructionOutcome = z.infer<typeof DestructionOutcomeSchema>;
182
+ /** What the interactive ceremony is asked to resolve. */
183
+ export interface DestructionConsentRequest {
184
+ target: string;
185
+ ticket: DestructionTicket;
186
+ }
187
+ /**
188
+ * The ceremony's answer: resolved consent pairs bound to the digest of the
189
+ * ticket the user actually saw, or an abort (decline). The pairs are
190
+ * re-evaluated engine-side against the live ticket — the resolution can never
191
+ * widen consent beyond what the `--remediate` flags could express.
192
+ */
193
+ export type DestructionConsentResolution = {
194
+ kind: "consents";
195
+ consents: readonly DestructionConsent[];
196
+ /** Digest of the ticket the ceremony displayed (TOCTOU binding). */
197
+ ticketDigest: string;
198
+ } | {
199
+ kind: "abort";
200
+ };
201
+ /**
202
+ * Interactive destruction-consent resolver — the injected-resolver mirror of
203
+ * the approval gate's `ApprovalGate` (types/approval.ts), for the
204
+ * UNCONDITIONAL destruction gate. Consent EVALUATION stays engine-side: the
205
+ * resolved pairs feed the same `evaluateDestructionConsents` + ticket-digest
206
+ * TOCTOU path the `--remediate` flags use, so a typed name that does not
207
+ * exactly match is rejected by the engine regardless of what the surface
208
+ * validated. Omitting the resolver leaves the gate fail-closed (withheld).
209
+ */
210
+ export interface DestructionConsentGate {
211
+ resolve(request: DestructionConsentRequest): Promise<DestructionConsentResolution>;
212
+ }
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";import{REPLACEMENT_VERDICT_SOURCES as r}from"../orchestration/application/plan/types.js";const t=e.enum(["abort","pin","recreate","forget","repair"]),u={abort:"stop here \u2014 nothing is changed",pin:"accept the live value into your fjall config so the change disappears; non-destructive",recreate:"accept a new physical resource under this name \u2014 data survives only via snapshot or backup (none if the resource is already deleted and no backup exists)",forget:"stop managing the resource \u2014 the physical resource is never touched",repair:"report-only: forensics plus a manual runbook, nothing is mutated"},n=["replacement-required","pinned-name-replacement","resource-deleted","stack-deleted","data-loss-delete"],o=e.enum(n),c=[...r,"drift-probe"],s=e.enum(c),a=e.object({stack:e.string(),logicalId:e.string(),resourceType:e.string(),physicalName:e.string(),finding:o,cause:e.string(),offendingProperties:e.array(e.string()),verdictSource:s,dataLossRisk:e.boolean(),verbs:e.array(t)}).strict(),d=e.object({ticketDigest:e.string(),resources:e.array(a)}).strict(),m=e.object({physicalName:e.string().min(1,"Consent physical name cannot be empty"),verb:t}).strict(),h=["matched","unmatched","wrong-verb"],l=e.enum(["awaiting-consent","declined","consents-invalid","consent-not-executable"]);export{h as CONSENT_VERDICTS,n as DESTRUCTION_FINDINGS,m as DestructionConsentSchema,o as DestructionFindingSchema,l as DestructionOutcomeSchema,a as DestructionTicketResourceSchema,d as DestructionTicketSchema,u as REMEDIATION_VERB_GLOSS,t as RemediationVerbSchema,c as TICKET_VERDICT_SOURCES,s as TicketVerdictSourceSchema};
@@ -4,10 +4,16 @@
4
4
  * These are safe for browser bundles. Filesystem-based detection functions
5
5
  * remain in patternDetection.ts.
6
6
  */
7
- declare const OPENNEXT_PATTERNS_ARRAY: readonly ["payload", "nextjs"];
8
- export type OpenNextPattern = (typeof OPENNEXT_PATTERNS_ARRAY)[number];
7
+ import { isOpenNextPatternType, type OpenNextPatternType } from "@fjall/util/patterns";
8
+ /**
9
+ * The OpenNext accept-set is derived from `PATTERN_REGISTRY` in `@fjall/util`:
10
+ * a pattern is OpenNext-shaped iff its declared artefact is an OpenNext Lambda
11
+ * bundle. Re-listing the members here is how `staticsite` would silently join
12
+ * the OpenNext build path.
13
+ */
14
+ export type OpenNextPattern = OpenNextPatternType;
9
15
  export declare const OPENNEXT_PATTERNS: ReadonlySet<string>;
10
- export declare function isOpenNextPattern(pattern: string | undefined | null): pattern is OpenNextPattern;
16
+ export declare const isOpenNextPattern: typeof isOpenNextPatternType;
11
17
  export interface AppResourceFlags {
12
18
  hasNetwork: boolean;
13
19
  hasCompute: boolean;
@@ -16,4 +22,3 @@ export interface AppResourceFlags {
16
22
  hasMessaging: boolean;
17
23
  hasCdn: boolean;
18
24
  }
19
- export {};
@@ -1 +1 @@
1
- const e=["payload","nextjs"],t=new Set(e);function N(n){return n!=null&&t.has(n)}export{t as OPENNEXT_PATTERNS,N as isOpenNextPattern};
1
+ import{OPENNEXT_PATTERN_TYPES as t,isOpenNextPatternType as e}from"@fjall/util/patterns";const T=new Set(t),n=e;export{T as OPENNEXT_PATTERNS,n as isOpenNextPattern};
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The Class 1 drift contract — out-of-band-deletion suspects, probe verdicts
3
+ * and the persisted suspect journal (drift-remediation plan § Phase 5).
4
+ * Declared ONCE here; the CLI re-exports, never redeclares (coupled
5
+ * discriminated unions share a source at 2 occurrences).
6
+ *
7
+ * Verdict semantics are fail-closed: only an authoritative NotFound from the
8
+ * service that owns the resource yields `confirmed-deleted`. Every other
9
+ * probe outcome (throttle, AccessDenied, network failure) stays `unconfirmed`
10
+ * and presentation is repair-only — no destructive verbs.
11
+ */
12
+ import { z } from "zod";
13
+ import { type RemediationVerb } from "./destruction.js";
14
+ export declare const DRIFT_VERDICTS: readonly ["confirmed-deleted", "present", "unconfirmed", "stack-missing"];
15
+ export declare const DriftVerdictSchema: z.ZodEnum<{
16
+ "confirmed-deleted": "confirmed-deleted";
17
+ present: "present";
18
+ unconfirmed: "unconfirmed";
19
+ "stack-missing": "stack-missing";
20
+ }>;
21
+ export type DriftVerdict = z.infer<typeof DriftVerdictSchema>;
22
+ export declare const DriftSuspectSchema: z.ZodObject<{
23
+ stackName: z.ZodString;
24
+ logicalId: z.ZodString;
25
+ resourceType: z.ZodString;
26
+ physicalId: z.ZodOptional<z.ZodString>;
27
+ failedStatus: z.ZodString;
28
+ statusReason: z.ZodString;
29
+ }, z.core.$strict>;
30
+ export type DriftSuspect = z.infer<typeof DriftSuspectSchema>;
31
+ export declare const DriftFindingSchema: z.ZodObject<{
32
+ verdict: z.ZodEnum<{
33
+ "confirmed-deleted": "confirmed-deleted";
34
+ present: "present";
35
+ unconfirmed: "unconfirmed";
36
+ "stack-missing": "stack-missing";
37
+ }>;
38
+ verdictDetail: z.ZodString;
39
+ probeMethod: z.ZodString;
40
+ verbs: z.ZodArray<z.ZodEnum<{
41
+ abort: "abort";
42
+ forget: "forget";
43
+ recreate: "recreate";
44
+ pin: "pin";
45
+ repair: "repair";
46
+ }>>;
47
+ stackName: z.ZodString;
48
+ logicalId: z.ZodString;
49
+ resourceType: z.ZodString;
50
+ physicalId: z.ZodOptional<z.ZodString>;
51
+ failedStatus: z.ZodString;
52
+ statusReason: z.ZodString;
53
+ }, z.core.$strict>;
54
+ export type DriftFinding = z.infer<typeof DriftFindingSchema>;
55
+ /** Legal verbs per verdict — single source for CLI presentation. */
56
+ export declare function verbsForDriftVerdict(verdict: DriftVerdict): RemediationVerb[];
57
+ export declare const DriftJournalRecordSchema: z.ZodObject<{
58
+ version: z.ZodLiteral<1>;
59
+ accountId: z.ZodString;
60
+ region: z.ZodString;
61
+ stackName: z.ZodString;
62
+ recordedAt: z.ZodString;
63
+ suspects: z.ZodArray<z.ZodObject<{
64
+ stackName: z.ZodString;
65
+ logicalId: z.ZodString;
66
+ resourceType: z.ZodString;
67
+ physicalId: z.ZodOptional<z.ZodString>;
68
+ failedStatus: z.ZodString;
69
+ statusReason: z.ZodString;
70
+ }, z.core.$strict>>;
71
+ }, z.core.$strict>;
72
+ export type DriftJournalRecord = z.infer<typeof DriftJournalRecordSchema>;
@@ -0,0 +1 @@
1
+ import{z as t}from"zod";import{RemediationVerbSchema as i}from"./destruction.js";const n=["confirmed-deleted","present","unconfirmed","stack-missing"],s=t.enum(n),e=t.object({stackName:t.string().min(1),logicalId:t.string().min(1),resourceType:t.string().min(1),physicalId:t.string().min(1).optional(),failedStatus:t.string().min(1),statusReason:t.string()}).strict(),a=t.object({...e.shape,verdict:s,verdictDetail:t.string(),probeMethod:t.string(),verbs:t.array(i)}).strict();function m(r){switch(r){case"confirmed-deleted":return["forget","recreate"];case"present":return[];case"unconfirmed":case"stack-missing":return["repair"]}}const d=t.object({version:t.literal(1),accountId:t.string().min(1),region:t.string().min(1),stackName:t.string().min(1),recordedAt:t.string().min(1),suspects:t.array(e)}).strict();export{n as DRIFT_VERDICTS,a as DriftFindingSchema,d as DriftJournalRecordSchema,e as DriftSuspectSchema,s as DriftVerdictSchema,m as verbsForDriftVerdict};
@@ -40,6 +40,13 @@ export interface BuildPlan {
40
40
  readonly buildCommand: BuildCommand | null;
41
41
  /** Whether this plan requires a Docker build (standard apps with Dockerfile) */
42
42
  readonly requiresDockerBuild: boolean;
43
+ /**
44
+ * Directory the build must produce, relative to the build command's `cwd`.
45
+ * Verified to exist after `build()` completes. Set by builders whose artefacts
46
+ * are uploaded to a bucket rather than containerised (static sites); the
47
+ * Docker/OpenNext builders leave it undefined.
48
+ */
49
+ readonly artefactDir?: string;
43
50
  /** Infrastructure requirements */
44
51
  readonly resources: AppResourceFlags;
45
52
  }
@@ -71,6 +78,13 @@ export interface BuildOptions {
71
78
  readonly skipBuild?: boolean;
72
79
  /** Only deploy infrastructure, skip application build */
73
80
  readonly infraOnly?: boolean;
81
+ /**
82
+ * The deploy's cancellation signal (`DeployParams.abortSignal` — Ctrl-C, or
83
+ * `fjall deployments cancel`). A build can run for minutes; without the
84
+ * signal a cancelled deploy has no way to reach the child process and waits
85
+ * out the full build timeout before noticing.
86
+ */
87
+ readonly abortSignal?: AbortSignal;
74
88
  }
75
89
  /** The FrameworkBuilder interface — detect/plan/build lifecycle */
76
90
  export interface FrameworkBuilder {
@@ -1,7 +1,43 @@
1
+ /**
2
+ * `@fjall/deploy-core/types` — the BROWSER-SAFE type/schema barrel.
3
+ *
4
+ * INVARIANT: nothing re-exported here may ACCESS a Node builtin at MODULE-EVAL.
5
+ * The webapp imports this subpath from CLIENT-reachable modules (e.g.
6
+ * `app/types/approval-plan.ts`, `app/types/destruction-consent.ts`); Vite's dev
7
+ * esbuild bundles the whole barrel without tree-shaking and stubs each Node
8
+ * builtin with a shim that THROWS ON ACCESS, killing React hydration app-wide in
9
+ * dev — while prod Rollup tree-shakes the unused module out, so CI stays green
10
+ * and the breakage is invisible to CI (the 2026-07-07 incident). Two shapes trip
11
+ * the eval-time access: a NAMED builtin import (`import { readFileSync } from
12
+ * "fs"`) binds to the throwing shim at link time, and a top-level builtin call
13
+ * (`readFileSync(...)` at module scope) calls it immediately. A bare NAMESPACE
14
+ * import (`import * as fs from "fs"`) used only inside functions does NOT trip it
15
+ * — the shim is never accessed at eval.
16
+ *
17
+ * deploy-core's OWN re-exported modules are kept fully Node-builtin-free: the
18
+ * fs-based helpers (`deriveResourcesFromManifestStacks` with its named `fs`
19
+ * import; the FjallState IO functions with named `fs`/`crypto`) — the two
20
+ * modules that tripped the 2026-07-07 incident — are NOT re-exported here. Their
21
+ * server-only consumers import them straight from the LEAF modules
22
+ * (`./detection/patternDetection.js`, `./config/FjallState.js`) and the ROOT
23
+ * barrel (`../index.js`) re-exports them — never from here.
24
+ *
25
+ * One TOLERATED cross-package builtin edge: `deployEvent.js` imports the static
26
+ * const `TRAIL_LIFECYCLE_STATES` from `@fjall/util/config`, which carries
27
+ * `import * as fs`/`import * as path` used ONLY inside functions. That is
28
+ * import-safe (verified: esbuild-bundle this barrel for the browser with a
29
+ * throw-on-access builtin stub → importing it does not throw). FRAGILE: if
30
+ * `config.js` ever adds a top-level fs/path call or a named builtin import, this
31
+ * barrel breaks — `TRAIL_LIFECYCLE_STATES` should then move to a genuinely
32
+ * builtin-free `@fjall/util` module. Before adding a re-export here, prefer a
33
+ * Node-builtin-free module; if it transitively pulls a builtin, that builtin
34
+ * MUST be a namespace import never accessed at eval (`import type` is always
35
+ * fine — it is erased).
36
+ */
1
37
  export { DeploymentEventSchema, DEPLOYMENT_EVENT_TYPES, DEPLOYMENT_EVENT_RESOURCE_CATEGORIES, DEPLOYMENT_EVENT_STATUS_REASON_MAX, DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX, DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX, CASCADE_PHASES, CASCADE_ACCOUNT_STATUSES, toCascadePhase } from "./deploymentEventSchema.js";
2
38
  export type { DeploymentEvent, DeploymentEventType, DeploymentEventResourceCategory, DeploymentEventCascadePhase, DeploymentEventCascadeAccountStatus } from "./deploymentEventSchema.js";
3
39
  export type { AwsCredentials, DeployIdentity, ScopedBuildSecretSessionMinter } from "./credentials.js";
4
- export type { DeployCallbacks, StepCompleteStatus, StackCleanupPhase, CascadeAccountPhase, LogLevel, StackCleanupQuarantineDetail, StackCleanupRetainedBucketsDetail } from "./callbacks.js";
40
+ export type { DeployCallbacks, StepCompleteStatus, StackCleanupPhase, CascadeAccountPhase, LogLevel, StackCleanupQuarantineDetail, StackCleanupRetainedBucketsDetail, StackTarget } from "./callbacks.js";
5
41
  export { isQuarantineDetail, isRetainedBucketsDetail } from "./callbacks.js";
6
42
  export { DeployEventSchema, StepProgressSchema, DeployResourceSchema, PlanChangeSchema, PlanPropertyChangeSchema, ChangeCountsSchema, DEPLOY_EVENT_CONTRACT, DEPLOY_EVENT_CONTRACT_MAJOR, DEPLOY_EVENT_CONTRACT_MINOR, SUPPORTED_CONTRACT_MARKERS, DEPLOY_EVENT_ID_MAX, DEPLOY_EVENT_NAME_MAX, DEPLOY_EVENT_MESSAGE_MAX, DEPLOY_EVENT_STATUS_REASON_MAX, DEPLOY_EVENT_ERROR_MESSAGE_MAX, DEPLOY_EVENT_TRAIL_DETAIL_MAX, DEPLOY_EVENT_OUTPUT_MAX, DEPLOY_EVENT_ARN_MAX, DEPLOY_EVENT_URL_MAX, STEP_COMPLETE_STATUSES, LOG_LEVELS, STACK_CLEANUP_PHASES, CASCADE_ACCOUNT_PHASES, DEPLOY_RESULTS, DETECTION_PHASES, PHASE_STATUSES, BUILDERS, CASCADE_OUTCOME_RESULTS, PLAN_ACTIONS, REPLACEMENT_MODES, APPROVAL_KINDS, APPROVAL_DECISIONS, ALL_PROGRESS_KINDS } from "./deployEvent.js";
7
43
  export type { DeployEvent, ProgressKind, StepProgress, DeployResource, PlanChange, PlanPropertyChange, ChangeCounts, PlanAction, ReplacementMode, ApprovalKind, ApprovalDecision, DeployRunResult } from "./deployEvent.js";
@@ -10,8 +46,14 @@ export { parseDeployEvent, parseDeployContractVersion, type ParsedDeployEvent }
10
46
  export type { ProgressEvent, ProgressEventType, ResourceEvent, AwsAuthResult, CascadeDeploymentResult, CascadePhase, BuildPushStartEvent, BuildPushProgressEvent, BuildPushCompleteEvent, TaskDefRegisteredEvent, ECSCompleteEvent, MigrationsStartEvent, MigrationsCompleteEvent, TrailMigrationPhase, TrailMigrationStatus, TrailMigrationPhaseEvent } from "./events.js";
11
47
  export { TRAIL_MIGRATION_PHASES, TRAIL_MIGRATION_STATUSES } from "./events.js";
12
48
  export type { ApiClientInterface, EntitlementsData } from "./apiClient.js";
13
- export type { DeployParams, DeployOptions, DatabaseEndpointRestartRequest, DeploymentType, DeployResult, DestroyParams, DestroyOptions, DestroyResult } from "./params.js";
49
+ export type { DeployParams, DeployOptions, DatabaseEndpointRestartRequest, InfrastructureSource, DeploymentType, DeployResult, DestroyParams, DestroyOptions, DestroyResult, StackLeaseVerdict } from "./params.js";
14
50
  export type { ApprovalGate, ApprovalGatePlanDetail, ApprovalRequest, GateResolution } from "./approval.js";
51
+ export { RemediationVerbSchema, REMEDIATION_VERB_GLOSS, DestructionFindingSchema, DestructionTicketResourceSchema, DestructionTicketSchema, DestructionConsentSchema, DestructionOutcomeSchema, DESTRUCTION_FINDINGS, CONSENT_VERDICTS, TICKET_VERDICT_SOURCES, TicketVerdictSourceSchema } from "./destruction.js";
52
+ export type { RemediationVerb, DestructionFinding, DestructionTicketResource, DestructionTicket, DestructionConsent, ConsentVerdict, ConsentVerdictRow, DestructionConsentReport, DestructionConsentRequest, DestructionConsentResolution, DestructionConsentGate, DestructionOutcome, TicketVerdictSource } from "./destruction.js";
53
+ export { DRIFT_VERDICTS, DriftVerdictSchema, DriftSuspectSchema, DriftFindingSchema, DriftJournalRecordSchema, verbsForDriftVerdict } from "./drift.js";
54
+ export type { DriftVerdict, DriftSuspect, DriftFinding, DriftJournalRecord } from "./drift.js";
55
+ export { REMEDIATION_PHASES, RemediationPhaseSchema, RemediationTargetSchema, RemediationFlipProofSchema, RemediationJournalRecordSchema, RemediationVerbWithSurgerySchema, remediationPhaseRank, remediationPlaceholderPhysicalId, isRemediationPlaceholderPhysicalId } from "./remediation.js";
56
+ export type { RemediationPhase, RemediationTarget, RemediationFlipProof, RemediationJournalRecord, RemediationVerbWithSurgery } from "./remediation.js";
15
57
  export type { OrgConfig, ProviderAccount, RootAccessManagementMode, SSOSession } from "./config/orgConfig.js";
16
58
  export type { Entitlements } from "./config/entitlements.js";
17
59
  export type { StackOutput, StackOutputsRecord, DeploymentContext, StepOutput, ApplicationDeploymentContext, CallerIdentity } from "./deployment/index.js";
@@ -26,11 +68,9 @@ export type { ParallelDeploymentResult, ParallelDeployGroup, ParallelOperation,
26
68
  export { PARALLEL_OPERATION_TYPES } from "./deployment/index.js";
27
69
  export type { OpenNextPattern, AppResourceFlags } from "./detection/patternTypes.js";
28
70
  export { isOpenNextPattern, OPENNEXT_PATTERNS } from "./detection/patternTypes.js";
29
- export { deriveResourcesFromManifestStacks } from "./detection/patternDetection.js";
30
71
  export { STACK_NOT_FOUND_PATTERN, STACK_FAILED_STATE_PATTERN, CDK_NO_STACKS_MATCH, INFRASTRUCTURE_FILENAME } from "./constants.js";
31
72
  export { ApplicationError, wrapApplicationError, type ApplicationErrorType, type StackDeploymentData, type StackDeploymentOptions, type ApplicationDeploymentData, type ApplicationDestructionData } from "./application/index.js";
32
73
  export type { FjallStateFile, TemplateHashEntry } from "./config/FjallState.js";
33
- export { FjallStateFileSchema, readStateFile, writeStateFile, createEmptyState, deleteStateFile, updateTemplateHash, getStateFilePath, regionSuffix } from "./config/FjallState.js";
34
74
  export type { FrameworkBuilder, FrameworkDetection, BuildPlan, BuildCommand, BuildCallbacks, DetectionContext, BuildOptions } from "./frameworkBuilder.js";
35
75
  export { STEP_IDS, STEP_NAMES, INFRASTRUCTURE_STEP_NAMES, INFRA_STEP_NAME } from "./stepDefinitions.js";
36
76
  export type { StepId, InfrastructureStepName, StepDefinition, StepDeploymentType, Operation, StepContext } from "./stepDefinitions.js";
@@ -1 +1 @@
1
- import{DeploymentEventSchema as e,DEPLOYMENT_EVENT_TYPES as A,DEPLOYMENT_EVENT_RESOURCE_CATEGORIES as S,DEPLOYMENT_EVENT_STATUS_REASON_MAX as T,DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX as t,DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX as O,CASCADE_PHASES as P,CASCADE_ACCOUNT_STATUSES as r,toCascadePhase as N}from"./deploymentEventSchema.js";import{isQuarantineDetail as a,isRetainedBucketsDetail as R}from"./callbacks.js";import{DeployEventSchema as p,StepProgressSchema as D,DeployResourceSchema as C,PlanChangeSchema as i,PlanPropertyChangeSchema as l,ChangeCountsSchema as I,DEPLOY_EVENT_CONTRACT as M,DEPLOY_EVENT_CONTRACT_MAJOR as n,DEPLOY_EVENT_CONTRACT_MINOR as m,SUPPORTED_CONTRACT_MARKERS as s,DEPLOY_EVENT_ID_MAX as c,DEPLOY_EVENT_NAME_MAX as Y,DEPLOY_EVENT_MESSAGE_MAX as U,DEPLOY_EVENT_STATUS_REASON_MAX as V,DEPLOY_EVENT_ERROR_MESSAGE_MAX as f,DEPLOY_EVENT_TRAIL_DETAIL_MAX as x,DEPLOY_EVENT_OUTPUT_MAX as g,DEPLOY_EVENT_ARN_MAX as X,DEPLOY_EVENT_URL_MAX as h,STEP_COMPLETE_STATUSES as G,LOG_LEVELS as y,STACK_CLEANUP_PHASES as F,CASCADE_ACCOUNT_PHASES as d,DEPLOY_RESULTS as u,DETECTION_PHASES as K,PHASE_STATUSES as H,BUILDERS as k,CASCADE_OUTCOME_RESULTS as v,PLAN_ACTIONS as w,REPLACEMENT_MODES as B,APPROVAL_KINDS as b,APPROVAL_DECISIONS as j,ALL_PROGRESS_KINDS as J}from"./deployEvent.js";import{createDeployEmitter as q}from"./deployEmitter.js";import{parseDeployEvent as W,parseDeployContractVersion as Z}from"./deployEventParse.js";import{TRAIL_MIGRATION_PHASES as EE,TRAIL_MIGRATION_STATUSES as _E}from"./events.js";import{stubCallerIdentity as AE}from"./deployment/index.js";import{ProgressReporter as TE}from"./ProgressEvent.js";import{APPLICATION_STACKS as OE,ORGANISATION_TYPES as PE,APPLICATION_DEPLOY_ORDER as rE,APPLICATION_DESTROY_ORDER as NE,OPENNEXT_DEPLOY_ORDER as oE,OPENNEXT_DESTROY_ORDER as aE,PARALLEL_DEPLOY_GROUPS as RE,PARALLEL_DESTROY_GROUPS as LE,OPENNEXT_PARALLEL_GROUPS as pE,isApplicationOperation as DE,isOrganisationOperation as CE,getParallelDeployGroups as iE,getParallelDestroyGroups as lE,getApplicationDeployOrder as IE,getApplicationDestroyOrder as ME,getApplicationStackName as nE,getOrganisationStackName as mE,isApplicationStack as sE,getApplicationStepName as cE,getApplicationStepId as YE,toPascalCase as UE}from"./operations.js";import{PARALLEL_OPERATION_TYPES as fE}from"./deployment/index.js";import{isOpenNextPattern as gE,OPENNEXT_PATTERNS as XE}from"./detection/patternTypes.js";import{deriveResourcesFromManifestStacks as GE}from"./detection/patternDetection.js";import{STACK_NOT_FOUND_PATTERN as FE,STACK_FAILED_STATE_PATTERN as dE,CDK_NO_STACKS_MATCH as uE,INFRASTRUCTURE_FILENAME as KE}from"./constants.js";import{ApplicationError as kE,wrapApplicationError as vE}from"./application/index.js";import{FjallStateFileSchema as BE,readStateFile as bE,writeStateFile as jE,createEmptyState as JE,deleteStateFile as QE,updateTemplateHash as qE,getStateFilePath as zE,regionSuffix as WE}from"./config/FjallState.js";import{STEP_IDS as $E,STEP_NAMES as E_,INFRASTRUCTURE_STEP_NAMES as __,INFRA_STEP_NAME as e_}from"./stepDefinitions.js";export{J as ALL_PROGRESS_KINDS,rE as APPLICATION_DEPLOY_ORDER,NE as APPLICATION_DESTROY_ORDER,OE as APPLICATION_STACKS,j as APPROVAL_DECISIONS,b as APPROVAL_KINDS,kE as ApplicationError,k as BUILDERS,d as CASCADE_ACCOUNT_PHASES,r as CASCADE_ACCOUNT_STATUSES,v as CASCADE_OUTCOME_RESULTS,P as CASCADE_PHASES,uE as CDK_NO_STACKS_MATCH,I as ChangeCountsSchema,t as DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX,S as DEPLOYMENT_EVENT_RESOURCE_CATEGORIES,T as DEPLOYMENT_EVENT_STATUS_REASON_MAX,O as DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX,A as DEPLOYMENT_EVENT_TYPES,X as DEPLOY_EVENT_ARN_MAX,M as DEPLOY_EVENT_CONTRACT,n as DEPLOY_EVENT_CONTRACT_MAJOR,m as DEPLOY_EVENT_CONTRACT_MINOR,f as DEPLOY_EVENT_ERROR_MESSAGE_MAX,c as DEPLOY_EVENT_ID_MAX,U as DEPLOY_EVENT_MESSAGE_MAX,Y as DEPLOY_EVENT_NAME_MAX,g as DEPLOY_EVENT_OUTPUT_MAX,V as DEPLOY_EVENT_STATUS_REASON_MAX,x as DEPLOY_EVENT_TRAIL_DETAIL_MAX,h as DEPLOY_EVENT_URL_MAX,u as DEPLOY_RESULTS,K as DETECTION_PHASES,p as DeployEventSchema,C as DeployResourceSchema,e as DeploymentEventSchema,BE as FjallStateFileSchema,KE as INFRASTRUCTURE_FILENAME,__ as INFRASTRUCTURE_STEP_NAMES,e_ as INFRA_STEP_NAME,y as LOG_LEVELS,oE as OPENNEXT_DEPLOY_ORDER,aE as OPENNEXT_DESTROY_ORDER,pE as OPENNEXT_PARALLEL_GROUPS,XE as OPENNEXT_PATTERNS,PE as ORGANISATION_TYPES,RE as PARALLEL_DEPLOY_GROUPS,LE as PARALLEL_DESTROY_GROUPS,fE as PARALLEL_OPERATION_TYPES,H as PHASE_STATUSES,w as PLAN_ACTIONS,i as PlanChangeSchema,l as PlanPropertyChangeSchema,TE as ProgressReporter,B as REPLACEMENT_MODES,F as STACK_CLEANUP_PHASES,dE as STACK_FAILED_STATE_PATTERN,FE as STACK_NOT_FOUND_PATTERN,G as STEP_COMPLETE_STATUSES,$E as STEP_IDS,E_ as STEP_NAMES,s as SUPPORTED_CONTRACT_MARKERS,D as StepProgressSchema,EE as TRAIL_MIGRATION_PHASES,_E as TRAIL_MIGRATION_STATUSES,q as createDeployEmitter,JE as createEmptyState,QE as deleteStateFile,GE as deriveResourcesFromManifestStacks,IE as getApplicationDeployOrder,ME as getApplicationDestroyOrder,nE as getApplicationStackName,YE as getApplicationStepId,cE as getApplicationStepName,mE as getOrganisationStackName,iE as getParallelDeployGroups,lE as getParallelDestroyGroups,zE as getStateFilePath,DE as isApplicationOperation,sE as isApplicationStack,gE as isOpenNextPattern,CE as isOrganisationOperation,a as isQuarantineDetail,R as isRetainedBucketsDetail,Z as parseDeployContractVersion,W as parseDeployEvent,bE as readStateFile,WE as regionSuffix,AE as stubCallerIdentity,N as toCascadePhase,UE as toPascalCase,qE as updateTemplateHash,vE as wrapApplicationError,jE as writeStateFile};
1
+ import{DeploymentEventSchema as S,DEPLOYMENT_EVENT_TYPES as _,DEPLOYMENT_EVENT_RESOURCE_CATEGORIES as T,DEPLOYMENT_EVENT_STATUS_REASON_MAX as A,DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX as t,DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX as r,CASCADE_PHASES as o,CASCADE_ACCOUNT_STATUSES as a,toCascadePhase as R}from"./deploymentEventSchema.js";import{isQuarantineDetail as P,isRetainedBucketsDetail as N}from"./callbacks.js";import{DeployEventSchema as D,StepProgressSchema as c,DeployResourceSchema as L,PlanChangeSchema as p,PlanPropertyChangeSchema as C,ChangeCountsSchema as n,DEPLOY_EVENT_CONTRACT as m,DEPLOY_EVENT_CONTRACT_MAJOR as I,DEPLOY_EVENT_CONTRACT_MINOR as s,SUPPORTED_CONTRACT_MARKERS as l,DEPLOY_EVENT_ID_MAX as M,DEPLOY_EVENT_NAME_MAX as h,DEPLOY_EVENT_MESSAGE_MAX as V,DEPLOY_EVENT_STATUS_REASON_MAX as U,DEPLOY_EVENT_ERROR_MESSAGE_MAX as Y,DEPLOY_EVENT_TRAIL_DETAIL_MAX as d,DEPLOY_EVENT_OUTPUT_MAX as f,DEPLOY_EVENT_ARN_MAX as g,DEPLOY_EVENT_URL_MAX as u,STEP_COMPLETE_STATUSES as x,LOG_LEVELS as G,STACK_CLEANUP_PHASES as X,CASCADE_ACCOUNT_PHASES as y,DEPLOY_RESULTS as F,DETECTION_PHASES as K,PHASE_STATUSES as k,BUILDERS as H,CASCADE_OUTCOME_RESULTS as b,PLAN_ACTIONS as v,REPLACEMENT_MODES as B,APPROVAL_KINDS as J,APPROVAL_DECISIONS as w,ALL_PROGRESS_KINDS as Q}from"./deployEvent.js";import{createDeployEmitter as j}from"./deployEmitter.js";import{parseDeployEvent as z,parseDeployContractVersion as Z}from"./deployEventParse.js";import{TRAIL_MIGRATION_PHASES as EE,TRAIL_MIGRATION_STATUSES as eE}from"./events.js";import{RemediationVerbSchema as _E,REMEDIATION_VERB_GLOSS as TE,DestructionFindingSchema as AE,DestructionTicketResourceSchema as tE,DestructionTicketSchema as rE,DestructionConsentSchema as oE,DestructionOutcomeSchema as aE,DESTRUCTION_FINDINGS as RE,CONSENT_VERDICTS as OE,TICKET_VERDICT_SOURCES as PE,TicketVerdictSourceSchema as NE}from"./destruction.js";import{DRIFT_VERDICTS as DE,DriftVerdictSchema as cE,DriftSuspectSchema as LE,DriftFindingSchema as pE,DriftJournalRecordSchema as CE,verbsForDriftVerdict as nE}from"./drift.js";import{REMEDIATION_PHASES as IE,RemediationPhaseSchema as sE,RemediationTargetSchema as lE,RemediationFlipProofSchema as ME,RemediationJournalRecordSchema as hE,RemediationVerbWithSurgerySchema as VE,remediationPhaseRank as UE,remediationPlaceholderPhysicalId as YE,isRemediationPlaceholderPhysicalId as dE}from"./remediation.js";import{stubCallerIdentity as gE}from"./deployment/index.js";import{ProgressReporter as xE}from"./ProgressEvent.js";import{APPLICATION_STACKS as XE,ORGANISATION_TYPES as yE,APPLICATION_DEPLOY_ORDER as FE,APPLICATION_DESTROY_ORDER as KE,OPENNEXT_DEPLOY_ORDER as kE,OPENNEXT_DESTROY_ORDER as HE,PARALLEL_DEPLOY_GROUPS as bE,PARALLEL_DESTROY_GROUPS as vE,OPENNEXT_PARALLEL_GROUPS as BE,isApplicationOperation as JE,isOrganisationOperation as wE,getParallelDeployGroups as QE,getParallelDestroyGroups as WE,getApplicationDeployOrder as jE,getApplicationDestroyOrder as qE,getApplicationStackName as zE,getOrganisationStackName as ZE,isApplicationStack as $E,getApplicationStepName as Ee,getApplicationStepId as ee,toPascalCase as Se}from"./operations.js";import{PARALLEL_OPERATION_TYPES as Te}from"./deployment/index.js";import{isOpenNextPattern as te,OPENNEXT_PATTERNS as re}from"./detection/patternTypes.js";import{STACK_NOT_FOUND_PATTERN as ae,STACK_FAILED_STATE_PATTERN as Re,CDK_NO_STACKS_MATCH as Oe,INFRASTRUCTURE_FILENAME as Pe}from"./constants.js";import{ApplicationError as ie,wrapApplicationError as De}from"./application/index.js";import{STEP_IDS as Le,STEP_NAMES as pe,INFRASTRUCTURE_STEP_NAMES as Ce,INFRA_STEP_NAME as ne}from"./stepDefinitions.js";export{Q as ALL_PROGRESS_KINDS,FE as APPLICATION_DEPLOY_ORDER,KE as APPLICATION_DESTROY_ORDER,XE as APPLICATION_STACKS,w as APPROVAL_DECISIONS,J as APPROVAL_KINDS,ie as ApplicationError,H as BUILDERS,y as CASCADE_ACCOUNT_PHASES,a as CASCADE_ACCOUNT_STATUSES,b as CASCADE_OUTCOME_RESULTS,o as CASCADE_PHASES,Oe as CDK_NO_STACKS_MATCH,OE as CONSENT_VERDICTS,n as ChangeCountsSchema,t as DEPLOYMENT_EVENT_ERROR_MESSAGE_MAX,T as DEPLOYMENT_EVENT_RESOURCE_CATEGORIES,A as DEPLOYMENT_EVENT_STATUS_REASON_MAX,r as DEPLOYMENT_EVENT_TRAIL_DETAIL_MAX,_ as DEPLOYMENT_EVENT_TYPES,g as DEPLOY_EVENT_ARN_MAX,m as DEPLOY_EVENT_CONTRACT,I as DEPLOY_EVENT_CONTRACT_MAJOR,s as DEPLOY_EVENT_CONTRACT_MINOR,Y as DEPLOY_EVENT_ERROR_MESSAGE_MAX,M as DEPLOY_EVENT_ID_MAX,V as DEPLOY_EVENT_MESSAGE_MAX,h as DEPLOY_EVENT_NAME_MAX,f as DEPLOY_EVENT_OUTPUT_MAX,U as DEPLOY_EVENT_STATUS_REASON_MAX,d as DEPLOY_EVENT_TRAIL_DETAIL_MAX,u as DEPLOY_EVENT_URL_MAX,F as DEPLOY_RESULTS,RE as DESTRUCTION_FINDINGS,K as DETECTION_PHASES,DE as DRIFT_VERDICTS,D as DeployEventSchema,L as DeployResourceSchema,S as DeploymentEventSchema,oE as DestructionConsentSchema,AE as DestructionFindingSchema,aE as DestructionOutcomeSchema,tE as DestructionTicketResourceSchema,rE as DestructionTicketSchema,pE as DriftFindingSchema,CE as DriftJournalRecordSchema,LE as DriftSuspectSchema,cE as DriftVerdictSchema,Pe as INFRASTRUCTURE_FILENAME,Ce as INFRASTRUCTURE_STEP_NAMES,ne as INFRA_STEP_NAME,G as LOG_LEVELS,kE as OPENNEXT_DEPLOY_ORDER,HE as OPENNEXT_DESTROY_ORDER,BE as OPENNEXT_PARALLEL_GROUPS,re as OPENNEXT_PATTERNS,yE as ORGANISATION_TYPES,bE as PARALLEL_DEPLOY_GROUPS,vE as PARALLEL_DESTROY_GROUPS,Te as PARALLEL_OPERATION_TYPES,k as PHASE_STATUSES,v as PLAN_ACTIONS,p as PlanChangeSchema,C as PlanPropertyChangeSchema,xE as ProgressReporter,IE as REMEDIATION_PHASES,TE as REMEDIATION_VERB_GLOSS,B as REPLACEMENT_MODES,ME as RemediationFlipProofSchema,hE as RemediationJournalRecordSchema,sE as RemediationPhaseSchema,lE as RemediationTargetSchema,_E as RemediationVerbSchema,VE as RemediationVerbWithSurgerySchema,X as STACK_CLEANUP_PHASES,Re as STACK_FAILED_STATE_PATTERN,ae as STACK_NOT_FOUND_PATTERN,x as STEP_COMPLETE_STATUSES,Le as STEP_IDS,pe as STEP_NAMES,l as SUPPORTED_CONTRACT_MARKERS,c as StepProgressSchema,PE as TICKET_VERDICT_SOURCES,EE as TRAIL_MIGRATION_PHASES,eE as TRAIL_MIGRATION_STATUSES,NE as TicketVerdictSourceSchema,j as createDeployEmitter,jE as getApplicationDeployOrder,qE as getApplicationDestroyOrder,zE as getApplicationStackName,ee as getApplicationStepId,Ee as getApplicationStepName,ZE as getOrganisationStackName,QE as getParallelDeployGroups,WE as getParallelDestroyGroups,JE as isApplicationOperation,$E as isApplicationStack,te as isOpenNextPattern,wE as isOrganisationOperation,P as isQuarantineDetail,dE as isRemediationPlaceholderPhysicalId,N as isRetainedBucketsDetail,Z as parseDeployContractVersion,z as parseDeployEvent,UE as remediationPhaseRank,YE as remediationPlaceholderPhysicalId,gE as stubCallerIdentity,R as toCascadePhase,Se as toPascalCase,nE as verbsForDriftVerdict,De as wrapApplicationError};
@@ -1,6 +1,7 @@
1
1
  import { type AppResourceFlags } from "./detection/patternTypes.js";
2
2
  import { type StepId } from "./stepDefinitions.js";
3
3
  import { toPascalCase } from "@fjall/util";
4
+ import type { PatternType } from "@fjall/generator";
4
5
  /**
5
6
  * Application infrastructure stacks
6
7
  */
@@ -157,7 +158,7 @@ export declare function getParallelDestroyGroups(): ReadonlyArray<(typeof PARALL
157
158
  * Options for determining deployment order
158
159
  */
159
160
  export interface DeployOrderOptions {
160
- pattern?: "payload" | "nextjs" | null;
161
+ pattern?: PatternType | null;
161
162
  resources?: AppResourceFlags;
162
163
  }
163
164
  /**