Upgrade to deno 2.2
parent
5111b5a380
commit
5ca0e98300
|
@ -33,7 +33,7 @@ jobs:
|
|||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v2.1.9
|
||||
deno-version: v2.2.0
|
||||
|
||||
- name: Run bundle build
|
||||
run: |
|
||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@v2
|
||||
with:
|
||||
deno-version: v2.1
|
||||
deno-version: v2.2
|
||||
- name: Run build
|
||||
run: deno task build
|
||||
- name: Bundle
|
||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@v2
|
||||
with:
|
||||
deno-version: v2.1
|
||||
deno-version: v2.2
|
||||
|
||||
- name: Build bundles
|
||||
run: |
|
||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@v2
|
||||
with:
|
||||
deno-version: v2.1
|
||||
deno-version: v2.2
|
||||
|
||||
- name: Run build
|
||||
run: deno task build
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FROM gitpod/workspace-full:latest
|
||||
|
||||
RUN curl -fsSL https://deno.land/x/install/install.sh | sh -s v2.1.9
|
||||
RUN curl -fsSL https://deno.land/x/install/install.sh | sh -s v2.2.0
|
||||
RUN /home/gitpod/.deno/bin/deno completions bash > /home/gitpod/.bashrc.d/90-deno && \
|
||||
echo 'export DENO_INSTALL="/home/gitpod/.deno"' >> /home/gitpod/.bashrc.d/90-deno && \
|
||||
echo 'export PATH="$DENO_INSTALL/bin:$PATH"' >> /home/gitpod/.bashrc.d/90-deno
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM denoland/deno:debian-2.1.9
|
||||
FROM denoland/deno:debian-2.2.0
|
||||
|
||||
# The volume that will keep the space data
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ export class HttpServer {
|
|||
if (typeof response.body === "string") {
|
||||
return ctx.text(response.body);
|
||||
} else if (response.body instanceof Uint8Array) {
|
||||
return ctx.body(response.body);
|
||||
return ctx.body(response.body.buffer as ArrayBuffer);
|
||||
} else {
|
||||
return ctx.json(response.body);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ export class HttpServer {
|
|||
}
|
||||
c.status(200);
|
||||
c.header("Content-type", this.clientAssetBundle.getMimeType(assetName));
|
||||
let data: Uint8Array | string = this.clientAssetBundle.readFileSync(
|
||||
let data = this.clientAssetBundle.readFileSync(
|
||||
assetName,
|
||||
);
|
||||
c.header("Content-length", "" + data.length);
|
||||
|
@ -286,7 +286,7 @@ export class HttpServer {
|
|||
// console.log(
|
||||
// "Swapping out config hash in service worker",
|
||||
// );
|
||||
data = textData.replaceAll(
|
||||
return Promise.resolve(c.body(textData.replaceAll(
|
||||
"{{CONFIG_HASH}}",
|
||||
base64Encode(
|
||||
JSON.stringify([
|
||||
|
@ -295,9 +295,10 @@ export class HttpServer {
|
|||
this.spaceServer.enableSpaceScript,
|
||||
]),
|
||||
),
|
||||
);
|
||||
)));
|
||||
} else {
|
||||
return Promise.resolve(c.body(new Uint8Array(data).buffer));
|
||||
}
|
||||
return Promise.resolve(c.body(data));
|
||||
} // else e.g. HEAD, OPTIONS, don't send body
|
||||
} catch {
|
||||
return next();
|
||||
|
@ -632,7 +633,7 @@ export class HttpServer {
|
|||
) {
|
||||
return c.body(null, 304);
|
||||
}
|
||||
return c.body(fileData.data, 200, {
|
||||
return c.body(new Uint8Array(fileData.data).buffer, 200, {
|
||||
...this.fileMetaToHeaders(fileData.meta),
|
||||
"Last-Modified": lastModifiedHeader,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue