@fjall/deploy-core 6.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 +28 -25
- 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 +1 -1
- 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 +46 -0
- 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 +14 -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/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 +28 -0
- package/dist/src/types/destruction.js +1 -1
- 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 +5 -6
|
@@ -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,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/deploy-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -95,15 +95,15 @@
|
|
|
95
95
|
"@aws-sdk/client-ssm": "^3.1098.0",
|
|
96
96
|
"@aws-sdk/client-sso-admin": "^3.1098.0",
|
|
97
97
|
"@aws-sdk/client-sts": "^3.1098.0",
|
|
98
|
-
"@fjall/generator": "^
|
|
99
|
-
"@fjall/util": "^
|
|
98
|
+
"@fjall/generator": "^7.0.0",
|
|
99
|
+
"@fjall/util": "^7.0.0",
|
|
100
100
|
"@smithy/node-http-handler": "^4.9.13",
|
|
101
101
|
"aws-cdk": "^2.1134.0",
|
|
102
102
|
"tsx": "^4.23.1",
|
|
103
103
|
"zod": "^4.4.3"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@fjall/components-infrastructure": ">=
|
|
106
|
+
"@fjall/components-infrastructure": ">=7.0.0 <8.0.0"
|
|
107
107
|
},
|
|
108
108
|
"peerDependenciesMeta": {
|
|
109
109
|
"@fjall/components-infrastructure": {
|
|
@@ -114,6 +114,5 @@
|
|
|
114
114
|
"@types/node": "^26.1.2",
|
|
115
115
|
"typescript": "^6.0.3",
|
|
116
116
|
"vitest": "^4.1.10"
|
|
117
|
-
}
|
|
118
|
-
"gitHead": "7620fc7c93bbef1046580d6568546afe3cd450a7"
|
|
117
|
+
}
|
|
119
118
|
}
|