Remove s3

but also upgrade the cad lamdbas to use built javascript files,
allowing us to use typescript, and patching redwood
This commit is contained in:
Kurt Hutten
2021-09-04 06:27:25 +10:00
parent 1c13a38ccb
commit 4a3144d360
28 changed files with 457 additions and 4660 deletions

View File

@@ -41,20 +41,16 @@ export const render: DefaultKernelExport['render'] = async ({
if (response.status === 502) {
return createUnhealthyResponse(new Date(), timeoutErrorMessage)
}
const data = await response.json()
const newData = await fetch(data.url).then(async (a) => {
const blob = await a.blob()
const text = await new Response(blob).text()
const { consoleMessage } = splitGziped(text)
return {
data: await stlToGeometry(window.URL.createObjectURL(blob)),
consoleMessage,
}
})
const blob = await response.blob()
const text = await new Response(blob).text()
const { consoleMessage, customizerParams, type } = splitGziped(text)
return createHealthyResponse({
type: 'geometry',
data: newData.data,
consoleMessage: newData.consoleMessage,
type: type !== 'stl' ? 'png' : 'geometry',
data:
type !== 'stl'
? blob
: await stlToGeometry(window.URL.createObjectURL(blob)),
consoleMessage,
date: new Date(),
})
} catch (e) {