Comparing version 0.6.1 to 0.7.0
@@ -18,7 +18,12 @@ "use strict"; | ||
exportsComponent.children.forEach(exportNode => { | ||
const matches = exportNode.id.match(new RegExp('Output\{"Ref":"(.*)"\}')); | ||
if (matches) { | ||
const refTargetId = matches[1]; | ||
const refMatches = exportNode.id.match(new RegExp('Output{"Ref":"(.*)"}')); | ||
if (refMatches) { | ||
const refTargetId = refMatches[1]; | ||
container.exports.push(new StackExport(refTargetId, exportNode.id)); | ||
} | ||
const getAttMatches = exportNode.id.match(new RegExp('Output{"Fn::GetAtt":\\["(.*)",".*"\\]}')); | ||
if (getAttMatches) { | ||
const refTargetId = getAttMatches[1]; | ||
container.exports.push(new StackExport(refTargetId, exportNode.id)); | ||
} | ||
}); | ||
@@ -25,0 +30,0 @@ return container; |
@@ -16,4 +16,3 @@ import * as diagram from "../../diagram"; | ||
private renderToCytoscape; | ||
private copyFolder; | ||
} | ||
export {}; |
@@ -30,4 +30,3 @@ "use strict"; | ||
const cytoscape_generator_1 = require("./cytoscape-generator"); | ||
const ncp = require('ncp').ncp; | ||
ncp.limit = 8; | ||
const fs_extra = __importStar(require("fs-extra")); | ||
class CytoscapeJsOutput { | ||
@@ -58,4 +57,4 @@ constructor(staticFolderName, staticSiteFullPath) { | ||
async renderToCytoscape(dia, targetFolder, iconsPath) { | ||
await this.copyFolder(__dirname + '/base', targetFolder); | ||
await this.copyFolder(iconsPath + '/icons', targetFolder + '/icons'); | ||
fs_extra.copySync(__dirname + '/base', targetFolder); | ||
fs_extra.copySync(iconsPath + '/icons', targetFolder + '/icons'); | ||
const [cyElements, cyStyles] = cytoscape_generator_1.CytoscapeGenerator.generate(dia); | ||
@@ -65,14 +64,4 @@ fs.writeFileSync(`${targetFolder}/cy-elements.json`, JSON.stringify(cyElements)); | ||
} | ||
copyFolder(src, dst) { | ||
return new Promise((resolve, reject) => { | ||
ncp(src, dst, function (err) { | ||
if (err) { | ||
reject(err); | ||
} | ||
resolve(undefined); | ||
}); | ||
}); | ||
} | ||
} | ||
exports.Cytoscape = Cytoscape; | ||
//# sourceMappingURL=cytoscape.js.map |
@@ -46,3 +46,3 @@ "use strict"; | ||
expect(JSON.parse(stylesJson.body).length).toBeGreaterThanOrEqual(15); | ||
}, 120000); | ||
}); | ||
}); | ||
@@ -49,0 +49,0 @@ class File { |
{ | ||
"name": "cdk-dia", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "🎡 Automated diagrams of CDK provisioned infrastructure", | ||
@@ -14,5 +14,2 @@ "scripts": { | ||
}, | ||
"jest": { | ||
"testEnvironment": "node" | ||
}, | ||
"main": "dist/index.js", | ||
@@ -27,7 +24,8 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"lodash": "^4.17.20", | ||
"@aws-cdk/core": "^1.40.0", | ||
"chalk": "^4.1.0", | ||
"colors": "^1.4.0", | ||
"fs-extra": "^10.0.1", | ||
"hasbin": "^1.2.3", | ||
"ncp": "^2.0.0", | ||
"lodash": "^4.17.20", | ||
"sanitize-filename": "^1.6.3", | ||
@@ -38,4 +36,3 @@ "terminal-link": "^2.1.1", | ||
"word-wrap": "^1.2.3", | ||
"yargs": "^16.2.0", | ||
"@aws-cdk/core": "^1.40.0" | ||
"yargs": "^16.2.0" | ||
}, | ||
@@ -48,3 +45,3 @@ "devDependencies": { | ||
"@types/hasbin": "^1.2.0", | ||
"@types/jest": "^26.0.15", | ||
"@types/jest": "^27.4.0", | ||
"@types/jest-specific-snapshot": "^0.5.5", | ||
@@ -60,8 +57,8 @@ "@types/lodash": "^4.14.165", | ||
"glob": "^7.1.6", | ||
"jest": "^26.6.2", | ||
"jest": "^27.5.1", | ||
"jest-file-snapshot": "^0.5.0", | ||
"jest-junit": "^12.0.0", | ||
"jest-specific-snapshot": "^4.0.0", | ||
"jest-junit": "^13.0.0", | ||
"jest-specific-snapshot": "^5.0.0", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^26.4.3", | ||
"ts-jest": "^27.1.4", | ||
"ts-node": "^9.0.0", | ||
@@ -68,0 +65,0 @@ "typescript": "^4.1.3" |
@@ -8,3 +8,3 @@ [![Mentioned in Awesome CDK](https://awesome.re/mentioned-badge.svg)](https://github.com/kolomied/awesome-cdk) | ||
_Cdk-dia diagrams your CDK provisioned infrastructure using the Graphviz dot lanuguage._ | ||
_Cdk-dia diagrams your CDK provisioned infrastructure using the Graphviz dot language._ | ||
@@ -11,0 +11,0 @@ ## Example |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14179695
43807
7
+ Addedfs-extra@^10.0.1
+ Addedfs-extra@10.1.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addeduniversalify@2.0.1(transitive)
- Removedncp@^2.0.0
- Removedncp@2.0.0(transitive)