@fjall/deploy-core 5.0.0 → 7.0.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/dist/.build-source-hash +40 -27
- package/dist/.minified +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +1 -1
- package/dist/src/orchestration/application/applicationDeploy.js +1 -1
- package/dist/src/orchestration/application/destructionGate.d.ts +8 -2
- package/dist/src/orchestration/application/destructionGate.js +5 -5
- package/dist/src/orchestration/application/detectionPipeline.js +1 -1
- package/dist/src/orchestration/application/engineCompat.d.ts +53 -1
- package/dist/src/orchestration/application/engineCompat.js +1 -1
- package/dist/src/orchestration/application/plan/computeDeployPlan.d.ts +16 -1
- package/dist/src/orchestration/application/plan/computeDeployPlan.js +1 -1
- package/dist/src/orchestration/application/plan/loadDeployPlan.js +1 -1
- package/dist/src/orchestration/application/plan/renameDetection.d.ts +161 -0
- package/dist/src/orchestration/application/plan/renameDetection.js +3 -0
- package/dist/src/orchestration/application/plan/renderDeployPlan.js +1 -1
- package/dist/src/orchestration/application/plan/types.d.ts +38 -0
- package/dist/src/orchestration/contextHelpers.d.ts +29 -0
- package/dist/src/orchestration/contextHelpers.js +1 -1
- package/dist/src/orchestration/index.d.ts +2 -0
- package/dist/src/orchestration/index.js +1 -1
- package/dist/src/orchestration/organisation/cascadeDestroyHelpers.js +1 -1
- package/dist/src/orchestration/organisation/cascadeHelpers.js +1 -1
- package/dist/src/orchestration/remediation/migrateIdentity.d.ts +150 -0
- package/dist/src/orchestration/remediation/migrateIdentity.js +5 -0
- package/dist/src/orchestration/remediation/pinIdentity.d.ts +120 -0
- package/dist/src/orchestration/remediation/pinIdentity.js +1 -0
- package/dist/src/services/infrastructure/CdkArgumentBuilder.js +1 -1
- package/dist/src/services/infrastructure/CdkServiceTypes.d.ts +11 -0
- package/dist/src/services/infrastructure/CloudFormationService.d.ts +19 -0
- package/dist/src/services/infrastructure/CloudFormationService.js +1 -1
- package/dist/src/services/infrastructure/cdkServiceHelpers.js +1 -1
- package/dist/src/services/supporting/CdkContextBuilder.d.ts +1 -0
- package/dist/src/services/supporting/CdkContextBuilder.js +1 -1
- package/dist/src/types/deployment/DeploymentTypes.d.ts +1 -0
- package/dist/src/types/destruction.d.ts +39 -1
- package/dist/src/types/destruction.js +1 -1
- package/dist/src/types/drift.d.ts +1 -0
- package/dist/src/types/index.d.ts +3 -3
- package/dist/src/types/index.js +1 -1
- package/dist/src/types/params.d.ts +43 -1
- package/dist/src/types/remediation.d.ts +29 -0
- package/dist/src/types/remediation.js +1 -1
- package/package.json +10 -6
|
@@ -15,6 +15,7 @@ export declare const RemediationVerbSchema: z.ZodEnum<{
|
|
|
15
15
|
recreate: "recreate";
|
|
16
16
|
pin: "pin";
|
|
17
17
|
repair: "repair";
|
|
18
|
+
refactor: "refactor";
|
|
18
19
|
}>;
|
|
19
20
|
export type RemediationVerb = z.infer<typeof RemediationVerbSchema>;
|
|
20
21
|
/**
|
|
@@ -26,13 +27,23 @@ export type RemediationVerb = z.infer<typeof RemediationVerbSchema>;
|
|
|
26
27
|
* as a menu consequence and as a `verb (gloss)` parenthetical.
|
|
27
28
|
*/
|
|
28
29
|
export declare const REMEDIATION_VERB_GLOSS: Readonly<Record<RemediationVerb, string>>;
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Slot-swap disambiguation for the identity-pin offer (coupled values, one
|
|
32
|
+
* home): a deliberate delete-slot-A/create-slot-B swap is structurally
|
|
33
|
+
* identical to a rename (one deleted + one created subtree), so every surface
|
|
34
|
+
* offering `pin` on a rename-detected row must state the weld consequence.
|
|
35
|
+
* Intent lives with the operator; the gate stays fail-closed either way.
|
|
36
|
+
*/
|
|
37
|
+
export declare const IDENTITY_PIN_SLOT_SWAP_GLOSS = "pin freezes the deployed capacity identity (and its data volume) onto the new slot; if you meant to replace the capacity with a fresh slot, abort \u2014 recreate ships in a later release";
|
|
38
|
+
export declare const DESTRUCTION_FINDINGS: readonly ["replacement-required", "pinned-name-replacement", "resource-deleted", "stack-deleted", "data-loss-delete", "rename-detected", "rename-ambiguous"];
|
|
30
39
|
export declare const DestructionFindingSchema: z.ZodEnum<{
|
|
31
40
|
"replacement-required": "replacement-required";
|
|
32
41
|
"pinned-name-replacement": "pinned-name-replacement";
|
|
33
42
|
"resource-deleted": "resource-deleted";
|
|
34
43
|
"stack-deleted": "stack-deleted";
|
|
35
44
|
"data-loss-delete": "data-loss-delete";
|
|
45
|
+
"rename-detected": "rename-detected";
|
|
46
|
+
"rename-ambiguous": "rename-ambiguous";
|
|
36
47
|
}>;
|
|
37
48
|
export type DestructionFinding = z.infer<typeof DestructionFindingSchema>;
|
|
38
49
|
/**
|
|
@@ -50,6 +61,18 @@ export declare const TicketVerdictSourceSchema: z.ZodEnum<{
|
|
|
50
61
|
"drift-probe": "drift-probe";
|
|
51
62
|
}>;
|
|
52
63
|
export type TicketVerdictSource = z.infer<typeof TicketVerdictSourceSchema>;
|
|
64
|
+
/**
|
|
65
|
+
* The {appName, slot} a confirming capacity-identity alias names. Declared
|
|
66
|
+
* once here — the plan overlay (`plan/types.ts`) re-exports the type, never
|
|
67
|
+
* redeclares it (coupled discriminated unions share a source at 2
|
|
68
|
+
* occurrences). Compliant producers copy from manifest aliases whose fields
|
|
69
|
+
* are `min(1)`, so empty strings are rejected at this boundary too.
|
|
70
|
+
*/
|
|
71
|
+
export declare const RenameSlotHintSchema: z.ZodObject<{
|
|
72
|
+
appName: z.ZodString;
|
|
73
|
+
slot: z.ZodString;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
export type RenameSlotHint = z.infer<typeof RenameSlotHintSchema>;
|
|
53
76
|
export declare const DestructionTicketResourceSchema: z.ZodObject<{
|
|
54
77
|
stack: z.ZodString;
|
|
55
78
|
logicalId: z.ZodString;
|
|
@@ -61,6 +84,8 @@ export declare const DestructionTicketResourceSchema: z.ZodObject<{
|
|
|
61
84
|
"resource-deleted": "resource-deleted";
|
|
62
85
|
"stack-deleted": "stack-deleted";
|
|
63
86
|
"data-loss-delete": "data-loss-delete";
|
|
87
|
+
"rename-detected": "rename-detected";
|
|
88
|
+
"rename-ambiguous": "rename-ambiguous";
|
|
64
89
|
}>;
|
|
65
90
|
cause: z.ZodString;
|
|
66
91
|
offendingProperties: z.ZodArray<z.ZodString>;
|
|
@@ -78,7 +103,12 @@ export declare const DestructionTicketResourceSchema: z.ZodObject<{
|
|
|
78
103
|
recreate: "recreate";
|
|
79
104
|
pin: "pin";
|
|
80
105
|
repair: "repair";
|
|
106
|
+
refactor: "refactor";
|
|
81
107
|
}>>;
|
|
108
|
+
pinSlotHint: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
appName: z.ZodString;
|
|
110
|
+
slot: z.ZodString;
|
|
111
|
+
}, z.core.$strict>>;
|
|
82
112
|
}, z.core.$strict>;
|
|
83
113
|
export type DestructionTicketResource = z.infer<typeof DestructionTicketResourceSchema>;
|
|
84
114
|
export declare const DestructionTicketSchema: z.ZodObject<{
|
|
@@ -94,6 +124,8 @@ export declare const DestructionTicketSchema: z.ZodObject<{
|
|
|
94
124
|
"resource-deleted": "resource-deleted";
|
|
95
125
|
"stack-deleted": "stack-deleted";
|
|
96
126
|
"data-loss-delete": "data-loss-delete";
|
|
127
|
+
"rename-detected": "rename-detected";
|
|
128
|
+
"rename-ambiguous": "rename-ambiguous";
|
|
97
129
|
}>;
|
|
98
130
|
cause: z.ZodString;
|
|
99
131
|
offendingProperties: z.ZodArray<z.ZodString>;
|
|
@@ -111,7 +143,12 @@ export declare const DestructionTicketSchema: z.ZodObject<{
|
|
|
111
143
|
recreate: "recreate";
|
|
112
144
|
pin: "pin";
|
|
113
145
|
repair: "repair";
|
|
146
|
+
refactor: "refactor";
|
|
114
147
|
}>>;
|
|
148
|
+
pinSlotHint: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
appName: z.ZodString;
|
|
150
|
+
slot: z.ZodString;
|
|
151
|
+
}, z.core.$strict>>;
|
|
115
152
|
}, z.core.$strict>>;
|
|
116
153
|
}, z.core.$strict>;
|
|
117
154
|
export type DestructionTicket = z.infer<typeof DestructionTicketSchema>;
|
|
@@ -124,6 +161,7 @@ export declare const DestructionConsentSchema: z.ZodObject<{
|
|
|
124
161
|
recreate: "recreate";
|
|
125
162
|
pin: "pin";
|
|
126
163
|
repair: "repair";
|
|
164
|
+
refactor: "refactor";
|
|
127
165
|
}>;
|
|
128
166
|
}, z.core.$strict>;
|
|
129
167
|
export type DestructionConsent = z.infer<typeof DestructionConsentSchema>;
|
|
@@ -1 +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"]),
|
|
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","refactor"]),d={abort:"stop here \u2014 nothing is changed",pin:"record the live value or deployed identity in 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",refactor:"move the resource to its new logical ID via CloudFormation stack refactoring \u2014 the physical resource is never replaced"},m="pin freezes the deployed capacity identity (and its data volume) onto the new slot; if you meant to replace the capacity with a fresh slot, abort \u2014 recreate ships in a later release",o=["replacement-required","pinned-name-replacement","resource-deleted","stack-deleted","data-loss-delete","rename-detected","rename-ambiguous"],n=e.enum(o),a=[...r,"drift-probe"],i=e.enum(a),c=e.object({appName:e.string().min(1,"pinSlotHint appName cannot be empty"),slot:e.string().min(1,"pinSlotHint slot cannot be empty")}).strict(),s=e.object({stack:e.string(),logicalId:e.string(),resourceType:e.string(),physicalName:e.string(),finding:n,cause:e.string(),offendingProperties:e.array(e.string()),verdictSource:i,dataLossRisk:e.boolean(),verbs:e.array(t),pinSlotHint:c.optional()}).strict(),u=e.object({ticketDigest:e.string(),resources:e.array(s)}).strict(),h=e.object({physicalName:e.string().min(1,"Consent physical name cannot be empty"),verb:t}).strict(),g=["matched","unmatched","wrong-verb"],S=e.enum(["awaiting-consent","declined","consents-invalid","consent-not-executable"]);export{g as CONSENT_VERDICTS,o as DESTRUCTION_FINDINGS,h as DestructionConsentSchema,n as DestructionFindingSchema,S as DestructionOutcomeSchema,s as DestructionTicketResourceSchema,u as DestructionTicketSchema,m as IDENTITY_PIN_SLOT_SWAP_GLOSS,d as REMEDIATION_VERB_GLOSS,t as RemediationVerbSchema,c as RenameSlotHintSchema,a as TICKET_VERDICT_SOURCES,i as TicketVerdictSourceSchema};
|
|
@@ -48,12 +48,12 @@ export { TRAIL_MIGRATION_PHASES, TRAIL_MIGRATION_STATUSES } from "./events.js";
|
|
|
48
48
|
export type { ApiClientInterface, EntitlementsData } from "./apiClient.js";
|
|
49
49
|
export type { DeployParams, DeployOptions, DatabaseEndpointRestartRequest, InfrastructureSource, DeploymentType, DeployResult, DestroyParams, DestroyOptions, DestroyResult, StackLeaseVerdict } from "./params.js";
|
|
50
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";
|
|
51
|
+
export { RemediationVerbSchema, REMEDIATION_VERB_GLOSS, IDENTITY_PIN_SLOT_SWAP_GLOSS, DestructionFindingSchema, DestructionTicketResourceSchema, DestructionTicketSchema, DestructionConsentSchema, DestructionOutcomeSchema, DESTRUCTION_FINDINGS, CONSENT_VERDICTS, TICKET_VERDICT_SOURCES, TicketVerdictSourceSchema } from "./destruction.js";
|
|
52
52
|
export type { RemediationVerb, DestructionFinding, DestructionTicketResource, DestructionTicket, DestructionConsent, ConsentVerdict, ConsentVerdictRow, DestructionConsentReport, DestructionConsentRequest, DestructionConsentResolution, DestructionConsentGate, DestructionOutcome, TicketVerdictSource } from "./destruction.js";
|
|
53
53
|
export { DRIFT_VERDICTS, DriftVerdictSchema, DriftSuspectSchema, DriftFindingSchema, DriftJournalRecordSchema, verbsForDriftVerdict } from "./drift.js";
|
|
54
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";
|
|
55
|
+
export { REMEDIATION_PHASES, RemediationPhaseSchema, RemediationTargetSchema, RemediationFlipProofSchema, RemediationJournalRecordSchema, RemediationJournalVerbSchema, RemediationVerbWithSurgerySchema, PinnedSlotRecordSchema, remediationPhaseRank, remediationPlaceholderPhysicalId, isRemediationPlaceholderPhysicalId } from "./remediation.js";
|
|
56
|
+
export type { RemediationPhase, RemediationTarget, RemediationFlipProof, RemediationJournalRecord, RemediationJournalVerb, RemediationVerbWithSurgery, PinnedSlotRecord } from "./remediation.js";
|
|
57
57
|
export type { OrgConfig, ProviderAccount, RootAccessManagementMode, SSOSession } from "./config/orgConfig.js";
|
|
58
58
|
export type { Entitlements } from "./config/entitlements.js";
|
|
59
59
|
export type { StackOutput, StackOutputsRecord, DeploymentContext, StepOutput, ApplicationDeploymentContext, CallerIdentity } from "./deployment/index.js";
|
package/dist/src/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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,DEPLOYMENT_ERROR_MESSAGE_MAX as o,CASCADE_PHASES as a,CASCADE_ACCOUNT_STATUSES as R,toCascadePhase as O,clampDeploymentEventStrings as P,truncateUtf16Safe as
|
|
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,DEPLOYMENT_ERROR_MESSAGE_MAX as o,CASCADE_PHASES as a,CASCADE_ACCOUNT_STATUSES as R,toCascadePhase as O,clampDeploymentEventStrings as P,truncateUtf16Safe as i}from"./deploymentEventSchema.js";import{isQuarantineDetail as D,isRetainedBucketsDetail as c}from"./callbacks.js";import{DeployEventSchema as L,StepProgressSchema as m,DeployResourceSchema as p,PlanChangeSchema as C,PlanPropertyChangeSchema as I,ChangeCountsSchema as l,DEPLOY_EVENT_CONTRACT as s,DEPLOY_EVENT_CONTRACT_MAJOR as M,DEPLOY_EVENT_CONTRACT_MINOR as h,SUPPORTED_CONTRACT_MARKERS as V,DEPLOY_EVENT_ID_MAX as d,DEPLOY_EVENT_NAME_MAX as U,DEPLOY_EVENT_MESSAGE_MAX as Y,DEPLOY_EVENT_STATUS_REASON_MAX as f,DEPLOY_EVENT_ERROR_MESSAGE_MAX as u,DEPLOY_EVENT_TRAIL_DETAIL_MAX as g,DEPLOY_EVENT_OUTPUT_MAX as x,DEPLOY_EVENT_ARN_MAX as G,DEPLOY_EVENT_URL_MAX as X,STEP_COMPLETE_STATUSES as y,LOG_LEVELS as F,STACK_CLEANUP_PHASES as K,CASCADE_ACCOUNT_PHASES as k,DEPLOY_RESULTS as H,DETECTION_PHASES as b,PHASE_STATUSES as v,BUILDERS as J,CASCADE_OUTCOME_RESULTS as B,PLAN_ACTIONS as W,REPLACEMENT_MODES as w,APPROVAL_KINDS as Q,APPROVAL_DECISIONS as j,ALL_PROGRESS_KINDS as q}from"./deployEvent.js";import{createDeployEmitter as Z}from"./deployEmitter.js";import{parseDeployEvent as EE,parseDeployContractVersion as eE}from"./deployEventParse.js";import{TRAIL_MIGRATION_PHASES as _E,TRAIL_MIGRATION_STATUSES as TE}from"./events.js";import{RemediationVerbSchema as tE,REMEDIATION_VERB_GLOSS as rE,IDENTITY_PIN_SLOT_SWAP_GLOSS as oE,DestructionFindingSchema as aE,DestructionTicketResourceSchema as RE,DestructionTicketSchema as OE,DestructionConsentSchema as PE,DestructionOutcomeSchema as iE,DESTRUCTION_FINDINGS as NE,CONSENT_VERDICTS as DE,TICKET_VERDICT_SOURCES as cE,TicketVerdictSourceSchema as nE}from"./destruction.js";import{DRIFT_VERDICTS as mE,DriftVerdictSchema as pE,DriftSuspectSchema as CE,DriftFindingSchema as IE,DriftJournalRecordSchema as lE,verbsForDriftVerdict as sE}from"./drift.js";import{REMEDIATION_PHASES as hE,RemediationPhaseSchema as VE,RemediationTargetSchema as dE,RemediationFlipProofSchema as UE,RemediationJournalRecordSchema as YE,RemediationJournalVerbSchema as fE,RemediationVerbWithSurgerySchema as uE,PinnedSlotRecordSchema as gE,remediationPhaseRank as xE,remediationPlaceholderPhysicalId as GE,isRemediationPlaceholderPhysicalId as XE}from"./remediation.js";import{stubCallerIdentity as FE}from"./deployment/index.js";import{ProgressReporter as kE}from"./ProgressEvent.js";import{APPLICATION_STACKS as bE,ORGANISATION_TYPES as vE,APPLICATION_DEPLOY_ORDER as JE,APPLICATION_DESTROY_ORDER as BE,OPENNEXT_DEPLOY_ORDER as WE,OPENNEXT_DESTROY_ORDER as wE,PARALLEL_DEPLOY_GROUPS as QE,PARALLEL_DESTROY_GROUPS as jE,OPENNEXT_PARALLEL_GROUPS as qE,isApplicationOperation as zE,isOrganisationOperation as ZE,getParallelDeployGroups as $E,getParallelDestroyGroups as Ee,getApplicationDeployOrder as ee,getApplicationDestroyOrder as Se,getApplicationStackName as _e,getOrganisationStackName as Te,isApplicationStack as Ae,getApplicationStepName as te,getApplicationStepId as re,toPascalCase as oe}from"./operations.js";import{PARALLEL_OPERATION_TYPES as Re}from"./deployment/index.js";import{isOpenNextPattern as Pe,OPENNEXT_PATTERNS as ie}from"./detection/patternTypes.js";import{STACK_NOT_FOUND_PATTERN as De,STACK_FAILED_STATE_PATTERN as ce,CDK_NO_STACKS_MATCH as ne,INFRASTRUCTURE_FILENAME as Le}from"./constants.js";import{ApplicationError as pe,wrapApplicationError as Ce}from"./application/index.js";import{STEP_IDS as le,STEP_NAMES as se,INFRASTRUCTURE_STEP_NAMES as Me,INFRA_STEP_NAME as he}from"./stepDefinitions.js";export{q as ALL_PROGRESS_KINDS,JE as APPLICATION_DEPLOY_ORDER,BE as APPLICATION_DESTROY_ORDER,bE as APPLICATION_STACKS,j as APPROVAL_DECISIONS,Q as APPROVAL_KINDS,pe as ApplicationError,J as BUILDERS,k as CASCADE_ACCOUNT_PHASES,R as CASCADE_ACCOUNT_STATUSES,B as CASCADE_OUTCOME_RESULTS,a as CASCADE_PHASES,ne as CDK_NO_STACKS_MATCH,DE as CONSENT_VERDICTS,l as ChangeCountsSchema,o as DEPLOYMENT_ERROR_MESSAGE_MAX,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,s as DEPLOY_EVENT_CONTRACT,M as DEPLOY_EVENT_CONTRACT_MAJOR,h as DEPLOY_EVENT_CONTRACT_MINOR,u as DEPLOY_EVENT_ERROR_MESSAGE_MAX,d as DEPLOY_EVENT_ID_MAX,Y as DEPLOY_EVENT_MESSAGE_MAX,U as DEPLOY_EVENT_NAME_MAX,x as DEPLOY_EVENT_OUTPUT_MAX,f as DEPLOY_EVENT_STATUS_REASON_MAX,g as DEPLOY_EVENT_TRAIL_DETAIL_MAX,X as DEPLOY_EVENT_URL_MAX,H as DEPLOY_RESULTS,NE as DESTRUCTION_FINDINGS,b as DETECTION_PHASES,mE as DRIFT_VERDICTS,L as DeployEventSchema,p as DeployResourceSchema,S as DeploymentEventSchema,PE as DestructionConsentSchema,aE as DestructionFindingSchema,iE as DestructionOutcomeSchema,RE as DestructionTicketResourceSchema,OE as DestructionTicketSchema,IE as DriftFindingSchema,lE as DriftJournalRecordSchema,CE as DriftSuspectSchema,pE as DriftVerdictSchema,oE as IDENTITY_PIN_SLOT_SWAP_GLOSS,Le as INFRASTRUCTURE_FILENAME,Me as INFRASTRUCTURE_STEP_NAMES,he as INFRA_STEP_NAME,F as LOG_LEVELS,WE as OPENNEXT_DEPLOY_ORDER,wE as OPENNEXT_DESTROY_ORDER,qE as OPENNEXT_PARALLEL_GROUPS,ie as OPENNEXT_PATTERNS,vE as ORGANISATION_TYPES,QE as PARALLEL_DEPLOY_GROUPS,jE as PARALLEL_DESTROY_GROUPS,Re as PARALLEL_OPERATION_TYPES,v as PHASE_STATUSES,W as PLAN_ACTIONS,gE as PinnedSlotRecordSchema,C as PlanChangeSchema,I as PlanPropertyChangeSchema,kE as ProgressReporter,hE as REMEDIATION_PHASES,rE as REMEDIATION_VERB_GLOSS,w as REPLACEMENT_MODES,UE as RemediationFlipProofSchema,YE as RemediationJournalRecordSchema,fE as RemediationJournalVerbSchema,VE as RemediationPhaseSchema,dE as RemediationTargetSchema,tE as RemediationVerbSchema,uE as RemediationVerbWithSurgerySchema,K as STACK_CLEANUP_PHASES,ce as STACK_FAILED_STATE_PATTERN,De as STACK_NOT_FOUND_PATTERN,y as STEP_COMPLETE_STATUSES,le as STEP_IDS,se as STEP_NAMES,V as SUPPORTED_CONTRACT_MARKERS,m as StepProgressSchema,cE as TICKET_VERDICT_SOURCES,_E as TRAIL_MIGRATION_PHASES,TE as TRAIL_MIGRATION_STATUSES,nE as TicketVerdictSourceSchema,P as clampDeploymentEventStrings,Z as createDeployEmitter,ee as getApplicationDeployOrder,Se as getApplicationDestroyOrder,_e as getApplicationStackName,re as getApplicationStepId,te as getApplicationStepName,Te as getOrganisationStackName,$E as getParallelDeployGroups,Ee as getParallelDestroyGroups,zE as isApplicationOperation,Ae as isApplicationStack,Pe as isOpenNextPattern,ZE as isOrganisationOperation,D as isQuarantineDetail,XE as isRemediationPlaceholderPhysicalId,c as isRetainedBucketsDetail,eE as parseDeployContractVersion,EE as parseDeployEvent,xE as remediationPhaseRank,GE as remediationPlaceholderPhysicalId,FE as stubCallerIdentity,O as toCascadePhase,oe as toPascalCase,i as truncateUtf16Safe,sE as verbsForDriftVerdict,Ce as wrapApplicationError};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Result } from "@fjall/generator";
|
|
2
|
-
import type { DeployMode, ServiceArtefact } from "@fjall/util";
|
|
2
|
+
import type { CapacityIdentityConfig, DeployMode, ServiceArtefact } from "@fjall/util";
|
|
3
3
|
import type { AwsCredentials, DeployIdentity, ScopedBuildSecretSessionMinter } from "./credentials.js";
|
|
4
4
|
import type { DeployCallbacks } from "./callbacks.js";
|
|
5
5
|
import type { ApiClientInterface } from "./apiClient.js";
|
|
@@ -7,6 +7,8 @@ import type { OrgConfig } from "./config/orgConfig.js";
|
|
|
7
7
|
import type { DockerProvider } from "../orchestration/dockerInterface.js";
|
|
8
8
|
import type { DomainDeployProvider } from "../orchestration/domainInterface.js";
|
|
9
9
|
import type { PinRemediationReport } from "../orchestration/remediation/pinRemediation.js";
|
|
10
|
+
import type { IdentityPinReport } from "../orchestration/remediation/migrateIdentity.js";
|
|
11
|
+
import type { DestructionTicketResource } from "./destruction.js";
|
|
10
12
|
import type { ApprovalGate, ApprovalGatePlanDetail } from "./approval.js";
|
|
11
13
|
import type { DestructionConsent, DestructionConsentGate, DestructionOutcome, DestructionTicket } from "./destruction.js";
|
|
12
14
|
import type { FailureAnalysis } from "@fjall/util/aws";
|
|
@@ -89,6 +91,19 @@ export interface DeployParams {
|
|
|
89
91
|
* flag can disengage the gate; this only changes HOW consent is obtained.
|
|
90
92
|
*/
|
|
91
93
|
destructionConsentGate?: DestructionConsentGate;
|
|
94
|
+
/**
|
|
95
|
+
* Identity-pin arm runner (D9 Phase 3) — consulted when consented `pin`
|
|
96
|
+
* verb(s) land on `rename-detected` rows carrying `pinSlotHint`. The
|
|
97
|
+
* surface owns synth + config machinery, so it injects a closure that
|
|
98
|
+
* drives `runIdentityPinMigration` (collect → decode → capture → pinned
|
|
99
|
+
* re-synth → I2 gate → config write) and returns the report. Absent, the
|
|
100
|
+
* arm degrades to report-only: the deploy still stops, the report names
|
|
101
|
+
* `fjall migrate identity` as the executing command, nothing is written.
|
|
102
|
+
* The engine threads `DeployParams.abortSignal` through the second
|
|
103
|
+
* argument so implementers' CFN probes and re-synth can be interrupted
|
|
104
|
+
* (optional-capability seam methods carry `abortSignal?` from birth).
|
|
105
|
+
*/
|
|
106
|
+
identityPinRunner?: (rows: readonly DestructionTicketResource[], abortSignal?: AbortSignal) => Promise<IdentityPinReport>;
|
|
92
107
|
/**
|
|
93
108
|
* The user's fjall infrastructure config source, consumed by the pin arm
|
|
94
109
|
* when a destructive change is consented with `pin`: the engine composes an
|
|
@@ -111,6 +126,24 @@ export interface DeployParams {
|
|
|
111
126
|
* neither omit the field and constructs fall back to explicit props.
|
|
112
127
|
*/
|
|
113
128
|
managedDomainBindings?: Record<string, string>;
|
|
129
|
+
/**
|
|
130
|
+
* The resolved deploy target name (e.g. "production-use2") this deploy
|
|
131
|
+
* runs against — the key `capacityIdentity` pins are recorded under in
|
|
132
|
+
* fjall-config.json. Surfaces that resolve a target MUST populate it;
|
|
133
|
+
* when absent, no capacity-identity pins ride into synth and a pre-7.0
|
|
134
|
+
* stack synths unpinned (the deploy-time rename gate then blocks the
|
|
135
|
+
* resulting identity replacement rather than letting it through).
|
|
136
|
+
*/
|
|
137
|
+
deployTargetName?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The `capacityIdentity` map from fjall-config.json
|
|
140
|
+
* (`{app: {target: {slot: pin}}}`), verbatim. The engine projects it to
|
|
141
|
+
* `deployTargetName` via `projectCapacityIdentityToTarget` (@fjall/util)
|
|
142
|
+
* and threads the result into every synth this deploy runs as
|
|
143
|
+
* `-c fjall:capacityIdentity=<json>`. Surfaces without a config file
|
|
144
|
+
* (worker until the Phase 4 webapp bump) omit it.
|
|
145
|
+
*/
|
|
146
|
+
capacityIdentity?: CapacityIdentityConfig;
|
|
114
147
|
/**
|
|
115
148
|
* Asked before the post-deploy database-endpoint reconcile restarts the
|
|
116
149
|
* application's ECS services (fires only when a deploy replaced the
|
|
@@ -419,6 +452,15 @@ export interface DeployResult {
|
|
|
419
452
|
* --remediate needed" on the re-run when this is non-zero.
|
|
420
453
|
*/
|
|
421
454
|
pinDeferredConsents?: number;
|
|
455
|
+
/**
|
|
456
|
+
* Identity-pin arm: per-slot outcomes of the pin migration for consented
|
|
457
|
+
* `rename-detected` rows (D9 Phase 3). Present with `pinPending` when the
|
|
458
|
+
* ceremony consented identity pins; `pinReport` stays the drift-value
|
|
459
|
+
* arm's report and both may be present on a mixed consent set. When the
|
|
460
|
+
* surface injected no `identityPinRunner`, outcomes are report-only and
|
|
461
|
+
* name `fjall migrate identity`.
|
|
462
|
+
*/
|
|
463
|
+
identityPinReport?: IdentityPinReport;
|
|
422
464
|
}
|
|
423
465
|
/**
|
|
424
466
|
* Parameters for the destroy entry point.
|
|
@@ -77,12 +77,35 @@ export declare const RemediationVerbWithSurgerySchema: z.ZodEnum<{
|
|
|
77
77
|
recreate: "recreate";
|
|
78
78
|
}>;
|
|
79
79
|
export type RemediationVerbWithSurgery = z.infer<typeof RemediationVerbWithSurgerySchema>;
|
|
80
|
+
/**
|
|
81
|
+
* The verbs that journal: the two surgery verbs plus `pin` (identity-pin
|
|
82
|
+
* remediation, D9 Phase 3). Pin journals are TERMINAL audit records — the
|
|
83
|
+
* operation mutates only fjall-config.json, so they are written once at
|
|
84
|
+
* phase `done` (success or refusal) and never carry resume state; the
|
|
85
|
+
* surgery orchestrators' cross-verb guards ignore done records, so a pin
|
|
86
|
+
* journal can never wedge a later forget/recreate on the same resources.
|
|
87
|
+
*/
|
|
88
|
+
export declare const RemediationJournalVerbSchema: z.ZodEnum<{
|
|
89
|
+
forget: "forget";
|
|
90
|
+
recreate: "recreate";
|
|
91
|
+
pin: "pin";
|
|
92
|
+
}>;
|
|
93
|
+
export type RemediationJournalVerb = z.infer<typeof RemediationJournalVerbSchema>;
|
|
94
|
+
/** One slot the identity-pin operation acted on (pin journal audit trail). */
|
|
95
|
+
export declare const PinnedSlotRecordSchema: z.ZodObject<{
|
|
96
|
+
appName: z.ZodString;
|
|
97
|
+
slot: z.ZodString;
|
|
98
|
+
legacyAnchor: z.ZodString;
|
|
99
|
+
failureDetail: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export type PinnedSlotRecord = z.infer<typeof PinnedSlotRecordSchema>;
|
|
80
102
|
export declare const RemediationJournalRecordSchema: z.ZodObject<{
|
|
81
103
|
version: z.ZodLiteral<1>;
|
|
82
104
|
opId: z.ZodString;
|
|
83
105
|
verb: z.ZodEnum<{
|
|
84
106
|
forget: "forget";
|
|
85
107
|
recreate: "recreate";
|
|
108
|
+
pin: "pin";
|
|
86
109
|
}>;
|
|
87
110
|
accountId: z.ZodString;
|
|
88
111
|
region: z.ZodString;
|
|
@@ -122,6 +145,12 @@ export declare const RemediationJournalRecordSchema: z.ZodObject<{
|
|
|
122
145
|
coRemovedLogicalIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
123
146
|
orphanedResources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
147
|
unverifiedRemovals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
+
pinnedSlots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
appName: z.ZodString;
|
|
150
|
+
slot: z.ZodString;
|
|
151
|
+
legacyAnchor: z.ZodString;
|
|
152
|
+
failureDetail: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strict>>>;
|
|
125
154
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
126
155
|
}, z.core.$strict>;
|
|
127
156
|
export type RemediationJournalRecord = z.infer<typeof RemediationJournalRecordSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var r=Object.defineProperty;var t=(
|
|
1
|
+
var r=Object.defineProperty;var t=(e,n)=>r(e,"name",{value:n,configurable:!0});import{z as i}from"zod";const o=["captured","flip-verified","flip-applied","removal-applied","done"],a=i.enum(o);function u(e){return o.indexOf(e)}t(u,"remediationPhaseRank");const s=i.object({logicalId:i.string().min(1),resourceType:i.string().min(1),physicalId:i.string().min(1)}).strict();function l(e,n){return`${e}/${n}`}t(l,"remediationPlaceholderPhysicalId");function y(e,n){return e.physicalId===l(n,e.logicalId)}t(y,"isRemediationPlaceholderPhysicalId");const c=i.object({diffGuardPassed:i.boolean(),changeSetMetadataOnly:i.boolean(),noChanges:i.boolean(),provenAt:i.string().min(1)}).strict(),m=i.enum(["forget","recreate"]),p=i.enum([...m.options,"pin"]),d=i.object({appName:i.string().min(1),slot:i.string().min(1),legacyAnchor:i.string().min(1),failureDetail:i.string().min(1).optional()}).strict(),f=i.object({version:i.literal(1),opId:i.string().min(1),verb:p,accountId:i.string().min(1),region:i.string().min(1),stackName:i.string().min(1),appName:i.string().min(1).optional(),targets:i.array(s).min(1),phase:a,createdAt:i.string().min(1),updatedAt:i.string().min(1),liveTemplateDigest:i.string().min(1).optional(),forensicsPath:i.string().min(1).optional(),proof:c.optional(),consentedPhysicalNames:i.array(i.string()).optional(),retainedByRedeclaration:i.array(i.string().min(1)).optional(),fliplessTargets:i.array(i.string().min(1)).optional(),fliplessByNecessity:i.array(i.string().min(1)).optional(),recreatedResources:i.array(i.string().min(1)).optional(),snapshotPolicies:i.record(i.string().min(1),i.enum(["Snapshot","Delete"])).optional(),coRemovedLogicalIds:i.array(i.string().min(1)).optional(),orphanedResources:i.array(i.string().min(1)).optional(),unverifiedRemovals:i.array(i.string().min(1)).optional(),pinnedSlots:i.array(d).min(1).optional(),completedAt:i.string().min(1).optional()}).strict();export{d as PinnedSlotRecordSchema,o as REMEDIATION_PHASES,c as RemediationFlipProofSchema,f as RemediationJournalRecordSchema,p as RemediationJournalVerbSchema,a as RemediationPhaseSchema,s as RemediationTargetSchema,m as RemediationVerbWithSurgerySchema,y as isRemediationPlaceholderPhysicalId,u as remediationPhaseRank,l as remediationPlaceholderPhysicalId};
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/deploy-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
7
|
+
"directory": "deploy-core"
|
|
8
|
+
},
|
|
4
9
|
"description": "Shared deployment engine for Fjall — used by CLI and webapp worker",
|
|
5
10
|
"type": "module",
|
|
6
11
|
"main": "dist/src/index.js",
|
|
@@ -90,15 +95,15 @@
|
|
|
90
95
|
"@aws-sdk/client-ssm": "^3.1098.0",
|
|
91
96
|
"@aws-sdk/client-sso-admin": "^3.1098.0",
|
|
92
97
|
"@aws-sdk/client-sts": "^3.1098.0",
|
|
93
|
-
"@fjall/generator": "^
|
|
94
|
-
"@fjall/util": "^
|
|
98
|
+
"@fjall/generator": "^7.0.0",
|
|
99
|
+
"@fjall/util": "^7.0.0",
|
|
95
100
|
"@smithy/node-http-handler": "^4.9.13",
|
|
96
101
|
"aws-cdk": "^2.1134.0",
|
|
97
102
|
"tsx": "^4.23.1",
|
|
98
103
|
"zod": "^4.4.3"
|
|
99
104
|
},
|
|
100
105
|
"peerDependencies": {
|
|
101
|
-
"@fjall/components-infrastructure": ">=
|
|
106
|
+
"@fjall/components-infrastructure": ">=7.0.0 <8.0.0"
|
|
102
107
|
},
|
|
103
108
|
"peerDependenciesMeta": {
|
|
104
109
|
"@fjall/components-infrastructure": {
|
|
@@ -109,6 +114,5 @@
|
|
|
109
114
|
"@types/node": "^26.1.2",
|
|
110
115
|
"typescript": "^6.0.3",
|
|
111
116
|
"vitest": "^4.1.10"
|
|
112
|
-
}
|
|
113
|
-
"gitHead": "78dded6f582368076e8b5f351399219e5a954659"
|
|
117
|
+
}
|
|
114
118
|
}
|