@kensio/yulin 0.28.0 → 0.29.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/docs/tsconfig.tsbuildinfo +1 -1
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-finder.d.ts +69 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-finder.d.ts.map +1 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-finder.js +106 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-finder.js.map +1 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.d.ts +35 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.d.ts.map +1 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.js +126 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.js.map +1 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-validator.d.ts +5 -0
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-validator.d.ts.map +1 -1
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-validator.js +8 -52
- package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-validator.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cff-cfn.factory.d.ts +14 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cff-cfn.factory.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cff-cfn.factory.js +23 -0
- package/dist/service/cloudformation/resource/cfn/cloudfront/sim-cff-cfn.factory.js.map +1 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts +1 -2
- package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource.factory.d.ts +7 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource.factory.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource.factory.js +12 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource.factory.js.map +1 -0
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-create-input-builder.d.ts +1 -10
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-create-input-builder.d.ts.map +1 -1
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-create-input-builder.js +8 -24
- package/dist/service/cloudfront/cfn/cff/sim-cfn-cff-create-input-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -11
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { assertDefined, assertNotNull, } from "../../../../util/type-guard/defined.js";
|
|
2
2
|
import { makeCffFunctionCodeInput } from "../../cff/function-code-input/cff-function-code-input.js";
|
|
3
3
|
import { simCfnCffFunctionConfig, } from "./sim-cfn-cff-function-config.js";
|
|
4
|
+
import { SimCfnCffBindingFinder } from "../../../cloudformation/bind/validate/sim-cfn-exec-binding-finder.js";
|
|
4
5
|
/**
|
|
5
6
|
* Translates an AWS::CloudFront::Function Resource into the input expected by
|
|
6
7
|
* the simulated CloudFront CreateFunction command.
|
|
@@ -37,10 +38,13 @@ export class SimCfnCffCreateInputBuilder {
|
|
|
37
38
|
*/
|
|
38
39
|
build() {
|
|
39
40
|
const functionCodeValue = this.functionCode();
|
|
40
|
-
const
|
|
41
|
-
const binding =
|
|
41
|
+
const cffName = this.cffName();
|
|
42
|
+
const binding = new SimCfnCffBindingFinder({
|
|
43
|
+
resource: this.resource,
|
|
44
|
+
bindings: this.bindings,
|
|
45
|
+
}).findBinding(cffName);
|
|
42
46
|
return {
|
|
43
|
-
Name:
|
|
47
|
+
Name: cffName,
|
|
44
48
|
FunctionCode: binding === undefined
|
|
45
49
|
? Buffer.from(functionCodeValue)
|
|
46
50
|
: makeCffFunctionCodeInput(binding.handler),
|
|
@@ -70,31 +74,11 @@ export class SimCfnCffCreateInputBuilder {
|
|
|
70
74
|
* not provided, the simulator uses the Resource logical ID as a predictable
|
|
71
75
|
* local fallback.
|
|
72
76
|
*/
|
|
73
|
-
|
|
77
|
+
cffName() {
|
|
74
78
|
const nameValue = this.properties["Name"];
|
|
75
79
|
return typeof nameValue === "string" && nameValue.length > 0
|
|
76
80
|
? nameValue
|
|
77
81
|
: this.resource.logicalId;
|
|
78
82
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Find an executable binding for this Function Resource.
|
|
81
|
-
*
|
|
82
|
-
* Bindings may target either the CloudFormation logical ID or the resolved
|
|
83
|
-
* CloudFront Function name. Logical ID matching is checked first because it
|
|
84
|
-
* is stable even when the template omits the Name property and the name is
|
|
85
|
-
* derived by this builder.
|
|
86
|
-
*/
|
|
87
|
-
findBinding(functionName) {
|
|
88
|
-
return this.bindings?.find((binding) => {
|
|
89
|
-
if ("logicalId" in binding) {
|
|
90
|
-
return binding.logicalId === this.resource.logicalId;
|
|
91
|
-
}
|
|
92
|
-
if ("functionName" in binding) {
|
|
93
|
-
return binding.functionName === functionName;
|
|
94
|
-
}
|
|
95
|
-
/* v8 ignore next */
|
|
96
|
-
return false;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
83
|
}
|
|
100
84
|
//# sourceMappingURL=sim-cfn-cff-create-input-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cfn-cff-create-input-builder.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/cff/sim-cfn-cff-create-input-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,GACd,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-cfn-cff-create-input-builder.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cfn/cff/sim-cfn-cff-create-input-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,GACd,MAAM,wCAAwC,CAAC;AAIhD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0D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