Skip to content

Commit 31e4078

Browse files
committed
feat: added func for blob
1 parent b6b1fdb commit 31e4078

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/handlers/server.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
/* eslint-disable n/prefer-global/buffer */
2+
/* eslint-disable max-statements */
13
import { toComputeResponse, toReqRes } from '@fastly/http-compute-js'
4+
import { HandlerEvent, type Handler, HandlerContext } from "@netlify/functions"
25
import type { WorkerRequestHandler } from 'next/dist/server/lib/types.js'
36

7+
import { netliBlob } from '../helpers/blobs/blobs.cjs'
48
import { TASK_DIR } from '../helpers/constants.js'
59

610
let nextHandler: WorkerRequestHandler
@@ -38,3 +42,12 @@ export default async (request: Request) => {
3842

3943
return toComputeResponse(res)
4044
}
45+
// Commenting out for now
46+
// export const handler: Handler = (event: HandlerEvent, context: HandlerContext): any => {
47+
// if (context?.clientContext?.custom?.blobs) {
48+
// const rawData = Buffer.from(context.clientContext.custom.blobs, 'base64')
49+
// const data = JSON.parse(rawData.toString('ascii'))
50+
51+
// netliBlob(data.token, `deploy:${event.headers['x-nf-deploy-id']}`, `${event.headers['x-nf-site-id']}`, data.url)
52+
// }
53+
// }

0 commit comments

Comments
 (0)