@intentius/chant-lexicon-aws 0.124.51 → 0.124.54
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/codegen/generate-lexicon.d.ts +2 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -1
- package/dist/codegen/generate-lexicon.js +1 -0
- package/dist/components/__tests__/mock-cloud-executor.d.ts +4 -0
- package/dist/components/__tests__/mock-cloud-executor.d.ts.map +1 -1
- package/dist/components/__tests__/mock-cloud-executor.js +18 -1
- package/dist/components/apply.d.ts +76 -3
- package/dist/components/apply.d.ts.map +1 -1
- package/dist/components/apply.js +488 -32
- package/dist/components/cfn-adopt.d.ts +99 -0
- package/dist/components/cfn-adopt.d.ts.map +1 -0
- package/dist/components/cfn-adopt.js +278 -0
- package/dist/components/cfn-imports.d.ts +84 -0
- package/dist/components/cfn-imports.d.ts.map +1 -0
- package/dist/components/cfn-imports.js +239 -0
- package/dist/components/cloud-executor.d.ts +44 -2
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/components/cloud-executor.js +73 -2
- package/dist/importable.d.ts +30 -0
- package/dist/importable.d.ts.map +1 -0
- package/dist/importable.js +72 -0
- package/dist/index-identity.d.ts +19 -0
- package/dist/index-identity.d.ts.map +1 -0
- package/dist/index-identity.js +79 -0
- package/dist/index-import.d.ts +17 -0
- package/dist/index-import.d.ts.map +1 -0
- package/dist/index-import.js +115 -0
- package/dist/integrity.json +3 -3
- package/dist/listed-types.d.ts +11 -0
- package/dist/listed-types.d.ts.map +1 -0
- package/dist/listed-types.js +52 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +13206 -1237
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +9 -0
- package/dist/reference-catalog.d.ts.map +1 -1
- package/dist/reference-catalog.js +62 -20
- package/dist/spec/fetch.d.ts +5 -0
- package/dist/spec/fetch.d.ts.map +1 -1
- package/dist/spec/parse.d.ts +8 -0
- package/dist/spec/parse.d.ts.map +1 -1
- package/dist/spec/parse.js +3 -0
- package/package.json +2 -2
- package/src/codegen/generate-lexicon.ts +3 -0
- package/src/components/__tests__/mock-cloud-executor.ts +20 -1
- package/src/components/apply.ts +546 -33
- package/src/components/cfn-adopt.test.ts +284 -0
- package/src/components/cfn-adopt.ts +340 -0
- package/src/components/cfn-exports-in-use.test.ts +146 -0
- package/src/components/cfn-imports-preview.test.ts +178 -0
- package/src/components/cfn-imports-three-stacks.test.ts +107 -0
- package/src/components/cfn-imports.test.ts +213 -0
- package/src/components/cfn-imports.ts +246 -0
- package/src/components/cfn-plan-floci.e2e.test.ts +53 -0
- package/src/components/cfn-plan-shape-conformance.test.ts +83 -0
- package/src/components/cfn-plan.test.ts +328 -9
- package/src/components/cloud-executor.ts +119 -6
- package/src/components/demo-composed-stacks-floci.e2e.test.ts +235 -0
- package/src/derived-edges.test.ts +142 -0
- package/src/generated/lexicon-aws.json +13206 -1237
- package/src/importable.test.ts +86 -0
- package/src/importable.ts +83 -0
- package/src/index-identity.test.ts +134 -0
- package/src/index-identity.ts +98 -0
- package/src/index-import.test.ts +242 -0
- package/src/index-import.ts +140 -0
- package/src/index-search.test.ts +87 -0
- package/src/listed-types.test.ts +97 -0
- package/src/listed-types.ts +56 -0
- package/src/plugin.ts +10 -0
- package/src/reference-catalog.ts +63 -20
- package/src/spec/fetch.ts +5 -0
- package/src/spec/parse.test.ts +15 -0
- package/src/spec/parse.ts +12 -0
- package/src/testdata/indexed/identity.listing.json +65 -0
- package/src/testdata/indexed/import.listing.json +126 -0
- package/src/testdata/indexed/listing.json +69 -0
- package/src/testdata/indexed/topology.listing.json +350 -0
- package/src/testdata/three-cloud/dns.graph.json +336 -0
- package/src/three-cloud-parity.test.ts +49 -0
|
@@ -26,6 +26,8 @@ export interface LexiconEntry {
|
|
|
26
26
|
conditionalCreateOnly?: string[];
|
|
27
27
|
replacementStrategy?: "delete_then_create" | "create_then_delete";
|
|
28
28
|
tagging?: ResourceTagging;
|
|
29
|
+
/** The registry schema's handler operations, sorted (#4536). Absent for a legacy type. */
|
|
30
|
+
handlers?: string[];
|
|
29
31
|
runtimeDeprecations?: Record<string, string>;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-lexicon.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-lexicon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAOhF,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC1D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,mBAAmB,CAAC,EAAE,oBAAoB,GAAG,oBAAoB,CAAC;IAClE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE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oB,GAAG,oBAAoB,CAAC;IAClE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,iBAAiB,EAAE,EAC5B,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,EAC/C,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GACjD,MAAM,CAgDR;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYlE"}
|
|
@@ -41,6 +41,7 @@ export function generateLexiconJSON(results, naming, constraints, runtimeDepreca
|
|
|
41
41
|
...(r.resource.conditionalCreateOnly?.length && { conditionalCreateOnly: r.resource.conditionalCreateOnly }),
|
|
42
42
|
...(r.resource.replacementStrategy && { replacementStrategy: r.resource.replacementStrategy }),
|
|
43
43
|
...(r.resource.tagging && { tagging: r.resource.tagging }),
|
|
44
|
+
...(r.resource.handlers?.length && { handlers: r.resource.handlers }),
|
|
44
45
|
...(runtimeDepr && { runtimeDeprecations: runtimeDepr }),
|
|
45
46
|
};
|
|
46
47
|
},
|
|
@@ -47,6 +47,10 @@ export interface FakeStackConfig {
|
|
|
47
47
|
missing?: boolean;
|
|
48
48
|
/** Set by the mock: the empty `REVIEW_IN_PROGRESS` stack a CREATE change set made for a missing stack. */
|
|
49
49
|
shell?: boolean;
|
|
50
|
+
/** The stack's exports (#4466c), export name to the output it is; the value is the output's. */
|
|
51
|
+
exports?: Record<string, string>;
|
|
52
|
+
/** The stacks that import each of this stack's exports now, by export name (#4466c). */
|
|
53
|
+
importedBy?: Record<string, string[]>;
|
|
50
54
|
}
|
|
51
55
|
export interface FakeDeploymentConfig {
|
|
52
56
|
/** Terminal status CodeDeploy reports for this deployment. Default: "Succeeded". */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-cloud-executor.d.ts","sourceRoot":"","sources":["../../../src/components/__tests__/mock-cloud-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,SAAS,EAIT,aAAa,EAKb,eAAe,EAWhB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAMV,kBAAkB,EAEnB,MAAM,kDAAkD,CAAC;AAE1D,2LAA2L;AAC3L,KAAK,YAAY,GAAG,aAAa,GAAG;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAED,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,kIAAkI;IAClI,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,kIAAkI;IAClI,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;yBAGqB;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"mock-cloud-executor.d.ts","sourceRoot":"","sources":["../../../src/components/__tests__/mock-cloud-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,SAAS,EAIT,aAAa,EAKb,eAAe,EAWhB,MAAM,mBAAmB,CAAC;AAK3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C/H,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,sHAAsH;IACtH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACtD,gEAAgE;IAChE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC9D,4GAA4G;IAC5G,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9D,2HAA2H;IAC3H,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC1D;AAED,sHAAsH;AACtH,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,wBAA6B,GAAG,iBAAiB,CAoUjG"}
|
|
@@ -32,7 +32,10 @@ export function createMockCloudExecutor(options = {}) {
|
|
|
32
32
|
let stepCounter = 0;
|
|
33
33
|
function stackStatus(name) {
|
|
34
34
|
const config = stacks.get(name);
|
|
35
|
-
|
|
35
|
+
const exports = config?.exports
|
|
36
|
+
? Object.fromEntries(Object.entries(config.exports).map(([exportName, output]) => [exportName, { output, value: config.outputs?.[output] ?? "" }]))
|
|
37
|
+
: undefined;
|
|
38
|
+
return { stackStatus: config?.terminalStatus ?? "UPDATE_COMPLETE", outputs: config?.outputs ?? {}, ...(exports ? { exports } : {}) };
|
|
36
39
|
}
|
|
37
40
|
const docker = {
|
|
38
41
|
async build(args) {
|
|
@@ -124,6 +127,20 @@ export function createMockCloudExecutor(options = {}) {
|
|
|
124
127
|
stacks.set(stackName, { ...config, shell: false, missing: true });
|
|
125
128
|
return true;
|
|
126
129
|
},
|
|
130
|
+
// Only a mock some stack's `importedBy` was given has ListImports, so the
|
|
131
|
+
// plans of every other test make the calls they always made (#4466c).
|
|
132
|
+
...(Object.values(options.stacks ?? {}).some((c) => c.importedBy !== undefined)
|
|
133
|
+
? {
|
|
134
|
+
async listImports(exportName) {
|
|
135
|
+
record("cloudformation", "listImports", exportName);
|
|
136
|
+
const out = new Set();
|
|
137
|
+
for (const config of stacks.values())
|
|
138
|
+
for (const s of config.importedBy?.[exportName] ?? [])
|
|
139
|
+
out.add(s);
|
|
140
|
+
return [...out].sort();
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
: {}),
|
|
127
144
|
async waitForStack(stackName) {
|
|
128
145
|
record("cloudformation", "waitForStack", stackName);
|
|
129
146
|
return stackStatus(stackName);
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
* `run-migration` dispatches on its target transport (ECS one-off task, Lambda
|
|
19
19
|
* invoke, or SSM host command).
|
|
20
20
|
*/
|
|
21
|
-
import type { Capability, PlannedOutputs } from "@intentius/chant/components/capability";
|
|
21
|
+
import type { Capability, DeclaredRead, PlannedOutputs } from "@intentius/chant/components/capability";
|
|
22
22
|
import type { ChangeSetEntry } from "@intentius/chant/change-set";
|
|
23
|
+
import { type PlanShape, type PlanShapeArtifact } from "@intentius/chant/components/covered-round";
|
|
23
24
|
import { type CfnChange, type CfnChangeSet, type CloudExecutor } from "./cloud-executor.js";
|
|
24
25
|
/**
|
|
25
26
|
* True when CloudFormation reports the change set has nothing to apply. AWS
|
|
@@ -43,7 +44,7 @@ export declare function cfnChangeReplaces(change: CfnChange): boolean;
|
|
|
43
44
|
* replace, `Remove` a delete, `Import` an import that changes nothing else,
|
|
44
45
|
* and `Dynamic` an update CloudFormation could not describe further.
|
|
45
46
|
*/
|
|
46
|
-
export declare function cfnChangeEntry(member: string, change: CfnChange): ChangeSetEntry;
|
|
47
|
+
export declare function cfnChangeEntry(member: string, change: CfnChange, unknown?: readonly string[]): ChangeSetEntry;
|
|
47
48
|
/**
|
|
48
49
|
* What a `cfn-deploy` plan hands `run` through `DeployContext.plans[stack]`
|
|
49
50
|
* (#3997): the stack and a digest over the changes the plan's change set
|
|
@@ -76,6 +77,29 @@ export declare class CfnPlanMovedError extends Error {
|
|
|
76
77
|
readonly planMoved = true;
|
|
77
78
|
constructor(stack: string, planned: string, now: string);
|
|
78
79
|
}
|
|
80
|
+
/** What a previewed member hands `run`: the shape its change set had against stand-in values. */
|
|
81
|
+
export interface CfnShapeArtifact extends PlanShapeArtifact {
|
|
82
|
+
kind: "cfn-deploy-shape";
|
|
83
|
+
}
|
|
84
|
+
/** The marker every stand-in carries, so a reader of a change set can tell it from a real value. */
|
|
85
|
+
export declare const CFN_UNKNOWN_MARK = "known-after-apply";
|
|
86
|
+
/**
|
|
87
|
+
* A stand-in for a parameter whose value is not known yet: valid for the
|
|
88
|
+
* parameter's type and recognisable. An EC2 id type gets the id's prefix
|
|
89
|
+
* (`subnet-00000000known-after-apply`), a number gets 0, anything else gets
|
|
90
|
+
* `known-after-apply`. Real CloudFormation checks the AWS-specific types
|
|
91
|
+
* against the account and refuses an id that does not exist; the preview
|
|
92
|
+
* then falls back to a hole. Floci does not check.
|
|
93
|
+
*/
|
|
94
|
+
export declare function cfnPlaceholder(type: string | undefined): string;
|
|
95
|
+
/**
|
|
96
|
+
* A change set's shape: each change's resource, action, replacement and
|
|
97
|
+
* properties, with the ones the `unknown` parameters drive marked. `unknown`
|
|
98
|
+
* is empty for the change set made against real values. `refs` are the
|
|
99
|
+
* inputs the shape names as unknown (`<component>.<output>`), the parameters
|
|
100
|
+
* themselves when nothing says better.
|
|
101
|
+
*/
|
|
102
|
+
export declare function cfnPlanShape(stack: string, changeSet: CfnChangeSet, unknown: string[], templatePath?: string, refs?: string[]): PlanShape;
|
|
79
103
|
/**
|
|
80
104
|
* The outputs a stack will have once `changes` apply (#3999), from its
|
|
81
105
|
* template and the outputs it has now. An output is known, at the value it
|
|
@@ -84,9 +108,32 @@ export declare class CfnPlanMovedError extends Error {
|
|
|
84
108
|
* `Dynamic`, no replacement, no change in a nested stack under it). One
|
|
85
109
|
* that reads a parameter, an import or a condition, one the stack does not
|
|
86
110
|
* have yet, and every output of a template this cannot read, is unknown.
|
|
111
|
+
*
|
|
112
|
+
* Two kinds of output need no standing value. An output whose `Value` is a
|
|
113
|
+
* plain string is known at that string, changed or new: the template says it.
|
|
114
|
+
* An output that is a `Ref` to a parameter the plan was given a value for is
|
|
115
|
+
* known at that value (`given`, the inputs of this plan). Both are what
|
|
116
|
+
* the stack's outputs will be, whatever they are now.
|
|
117
|
+
*
|
|
118
|
+
* An output that passes an import through (`Fn::ImportValue` of a name
|
|
119
|
+
* `imports` holds, #4466) is known at the value the exporting stack's plan
|
|
120
|
+
* gave it, which is the value core read for the import.
|
|
121
|
+
*
|
|
87
122
|
* `undefined` when there is no template or no standing stack to read from.
|
|
88
123
|
*/
|
|
89
|
-
export declare function cfnPlannedOutputs(template: unknown, changes: readonly CfnChange[], standing: Record<string, string> | undefined): PlannedOutputs | undefined;
|
|
124
|
+
export declare function cfnPlannedOutputs(template: unknown, changes: readonly CfnChange[], standing: Record<string, string> | undefined, given?: Record<string, string>, imports?: Record<string, string>): PlannedOutputs | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* `cfn-deploy`'s `declaredReads` (#4466): each `Fn::ImportValue` of a name
|
|
127
|
+
* exactly one other `cfn-deploy` step's template exports is a read of that
|
|
128
|
+
* component's output, placed under the step's `imports`. A name two steps
|
|
129
|
+
* export is left alone (CloudFormation refuses the second export), and so
|
|
130
|
+
* is a name no step in the project exports: it reads a stack outside it.
|
|
131
|
+
*/
|
|
132
|
+
export declare function cfnDeclaredReads(root: string, members: readonly {
|
|
133
|
+
component: string;
|
|
134
|
+
index: number;
|
|
135
|
+
step: Record<string, unknown>;
|
|
136
|
+
}[]): DeclaredRead[];
|
|
90
137
|
/**
|
|
91
138
|
* How `cfn-deploy` handles a changeset that requires resource replacement.
|
|
92
139
|
* - `block`: refuse to apply; surface the changeset for human review.
|
|
@@ -115,6 +162,14 @@ export interface CfnDeployInput {
|
|
|
115
162
|
onReplace?: CfnReplacePolicy;
|
|
116
163
|
/** Stage DynamoDB GSI changes (add-then-backfill-then-remove) instead of an in-place replace. Default: false. */
|
|
117
164
|
stageGsi?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* The exports the template imports (`Fn::ImportValue`) from another
|
|
167
|
+
* `cfn-deploy` step of the project, by export name (#4466). Core fills it
|
|
168
|
+
* from `declaredReads` with a `stackOutput()` of the exporting component's
|
|
169
|
+
* output, so a value is `undefined` while that stack's plan cannot say it.
|
|
170
|
+
* Never passed to CloudFormation: the template imports the export itself.
|
|
171
|
+
*/
|
|
172
|
+
imports?: Record<string, string | undefined>;
|
|
118
173
|
}
|
|
119
174
|
export interface CfnDeployOutput {
|
|
120
175
|
/** Final stack status (`CREATE_COMPLETE`, `UPDATE_COMPLETE`, ...). */
|
|
@@ -124,6 +179,24 @@ export interface CfnDeployOutput {
|
|
|
124
179
|
/** Snapshot id captured before an `onReplace: "snapshot-first"` replacement, if one was taken. */
|
|
125
180
|
snapshotId?: string;
|
|
126
181
|
}
|
|
182
|
+
/** One export a plan changes or removes while other stacks import it (#4466c). */
|
|
183
|
+
export interface CfnExportInUse {
|
|
184
|
+
exportName: string;
|
|
185
|
+
/** What the plan does to it, as the refusal says it: "removes", or "changes ... from A to B". */
|
|
186
|
+
change: string;
|
|
187
|
+
/** The stacks that import it now, sorted. */
|
|
188
|
+
importers: string[];
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Thrown at plan time when a change set would change or remove an export
|
|
192
|
+
* that another stack still imports (#4466c). CloudFormation refuses that
|
|
193
|
+
* update at apply; the plan refuses it first, naming both stacks.
|
|
194
|
+
*/
|
|
195
|
+
export declare class CfnExportInUseError extends Error {
|
|
196
|
+
readonly stack: string;
|
|
197
|
+
readonly uses: CfnExportInUse[];
|
|
198
|
+
constructor(stack: string, uses: CfnExportInUse[]);
|
|
199
|
+
}
|
|
127
200
|
/**
|
|
128
201
|
* Thrown when a changeset proposes a resource replacement and `onReplace` is
|
|
129
202
|
* `"block"` (the default) — refusing to apply rather than silently destroying
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/components/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/components/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAkB,YAAY,EAAiB,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACtI,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,6BAA6B,CAAC;AAEhG,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,iBAAiB,EAGvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,YAAY,EAAuB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASpI;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,YAAY,GAAG,OAAO,CAKhE;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAE5D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,SAAS,MAAM,EAAO,GAAG,cAAc,CAgCjH;AAWD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;CACvB;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,MAAM,CAI/E;AAED;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;aAGxB,KAAK,EAAE,MAAM;aACb,OAAO,EAAE,MAAM;aACf,GAAG,EAAE,M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