Closed JoeMcB closed 3 years ago
@JoeMcB Thank you for your contribution.
Looks like I missed one of the recommendations for that ticket ( "Switch to use the Webview.cspSource property in content security policies.") just FYI.
Just tried the updated dist. Looks like something's up between developer mode src location and what's getting packaged.
This path is 404ing: vscode-webview-resource://c220cb0b-3345-40a5-a328-c3af433e8d6e/file///c%3A/Users/josep/.vscode/extensions/aleksandardev.vscode-sequence-diagrams-0.4.1/src/deps/js-sequence-diagrams/sequence-diagram-snap-min.js
The file is actually located at vscode-webview-resource://c220cb0b-3345-40a5-a328-c3af433e8d6e/file///c%3A/Users/josep/.vscode/extensions/aleksandardev.vscode-sequence-diagrams-0.4.1/dist/src/deps/js-sequence-diagrams/sequence-diagram-snap-min.js
Difference is dist
folder in production.
I'll dig back in when I can; new to extension work so apologies for the half-fix.
EDIT: Appears to an artifact of a build step? https://github.com/microsoft/vscode/issues/105514
EDIT 2: Upon further investigation, I think there's a disconnect between the build task (compiling typescript to out
) and the publish script (which compiles to dist
). These need to be in sync for whatever path the assetPath
function compiles if the extension works in dev mode and release. Should be easy to fix but I don't want to mess with your build setup @AleksandarDev
@JoeMcB looks like I might have a relative problem (details are here https://github.com/AleksandarDev/vscode-sequence-diagrams/issues/23#issuecomment-723585185 ). Kindly advise what should I dig for?
Resolves #23
Issue Extension appeared to be using legacy webview resource access with missing security permissions:
Solution Rebuilt using local content access defined in docs.