aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.29 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnUtils=exports.CfnUtilsProvider=void 0;var path=()=>{var tmp=require("path");return path=()=>tmp,tmp},constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},consts_1=()=>{var tmp=require("./cfn-utils-provider/consts");return consts_1=()=>tmp,tmp},custom_resource_1=()=>{var tmp=require("../custom-resource");return custom_resource_1=()=>tmp,tmp},custom_resource_provider_1=()=>{var tmp=require("../custom-resource-provider");return custom_resource_provider_1=()=>tmp,tmp};class CfnUtilsProvider extends constructs_1().Construct{static getOrCreate(scope){return custom_resource_provider_1().CustomResourceProvider.getOrCreate(scope,"AWSCDKCfnUtilsProvider",{runtime:custom_resource_provider_1().CustomResourceProviderRuntime.NODEJS_18_X,codeDirectory:path().join(__dirname,"..","..","..","custom-resource-handlers","dist","core","cfn-utils-provider")})}}exports.CfnUtilsProvider=CfnUtilsProvider;class CfnUtils{static stringify(scope,id,value){return new(custom_resource_1()).CustomResource(scope,id,{serviceToken:CfnUtilsProvider.getOrCreate(scope),resourceType:consts_1().CfnUtilsResourceType.CFN_JSON_STRINGIFY,properties:{Value:value}}).getAttString("Value")}}exports.CfnUtils=CfnUtils;