-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add template graph preview #106
Add template graph preview #106
Conversation
Launch extension seems to work for me: git clone https://github.com/aws-cloudformation/aws-cfn-lint-visual-studio-code
gh pr checkout 106
cd aws-cfn-lint-visual-studio-code/
npm install
npm run compile
code . also works when building and installing npm install -g node@latest
npm install -g npm@latest
npm install -g vscode@latest
npm install -g vsce@latest
npm install
npm run compile
vsce package |
@miparnisari not sure how this is working currently, but it'd be nice to eventually allow the resource dependency graph preview to occupy the entire side panel. It seems to currently be limited height-wise at least: |
…d remove the file after the Preview is closed.
client/src/extension.ts
Outdated
<script src="https://unpkg.com/d3@5.16.0/dist/d3.min.js"></script> | ||
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script> | ||
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.min.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the move off of cdnjs since it's curated and missing libraries
We should add Subresource Integrity:
<script src="https://unpkg.com/d3@5.16.0/dist/d3.min.js"></script> | |
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script> | |
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/d3@5.16.0/dist/d3.min.js" integrity="sha256-Xb6SSzhH3wEPC4Vy3W70Lqh9Y3Du/3KxPqI2JHQSpTw=" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@hpcc-js/wasm@0.3.11/dist/index.min.js" integrity="sha256-ed1KzxE+MS5A4K5j2j73fLv/1MNRWJ73e8N0V/mU/hU=" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/d3-graphviz@3.0.5/build/d3-graphviz.min.js" integrity="sha256-dZ4Que6P88a308S9XMJrqbcD7iEjcaejEPLGkEJrEZQ=" crossorigin="anonymous"></script> |
https://www.jsdelivr.com/package/npm/d3?version=5.16.0
https://www.jsdelivr.com/package/npm/@hpcc-js/wasm?version=0.3.11
https://www.jsdelivr.com/package/npm/d3-graphviz?version=3.0.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. We're also supposed to add a content security policy, but I couldn't get this to work
Try again :) |
This comment has been minimized.
This comment has been minimized.
to support upcoming CloudFormation template resource dependency graph preview: aws-cloudformation/cfn-lint-visual-studio-code#106
working incredibly well in dark mode, light mode and online 🎉 sometimes the preview button disappears when switching back to a CloudFormation template from editing a non-CloudFormation JSON/YAML file until the CloudFormation template is re-edited, re-saved, or re-opened again, but just something to keep in mind really excited for this to launch 🥳 |
awesome new feature! |
aws-cloudformation/cfn-lint#1411
Description of changes:
Try it out by pulling this PR, running
npm install && npm run compile
, open this PR in VS Code and then launching the extension. (Ensure you have runpip3 install cfn-lint pydot --upgrade
too)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.