script-lab-2017
script-lab-2017 copied to clipboard
Fix error-handling logic in server.ts (bubble up failures on /open/ route)
https://github.com/OfficeDev/script-lab/blob/master/src/server/server.ts
Right now, the "zip.on" and other functionality is not exposed as a promise (breaks promise chain), and also does a throw instead of a reject (breaks promise chain)
While we're at it, also add validation for id and type to be alphanumeric+hypthen. Could also sanitize resulting filename to similar as we do with snippet ids.
Also while we're at it, use true guid instead of timestamp for temp file.