Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/deno-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
strategy:
matrix:
deno-version:
- v2.3
- v2.5
- v2.6
- canary
fail-fast: false # run each branch to completion

Expand Down
27 changes: 15 additions & 12 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions integrations/firebase-hosting-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

import { encodeHex } from '@std/encoding/hex';

export type SiteFile = {path: string, body: Uint8Array};
type ByteArray = Uint8Array<ArrayBuffer>;
export type SiteFile = {path: string, body: ByteArray};
export async function deployFirebaseSite(opts: {
siteId: string;
channelId?: string;
Expand Down Expand Up @@ -51,7 +52,7 @@ export async function deployFirebaseSite(opts: {
console.log('Firebase release', name, 'is', status);

const fileHashes: Record<string,string> = Object.create(null);
const hashMap = new Map<string,SiteFile&{compressed: Uint8Array}>();
const hashMap = new Map<string,SiteFile&{compressed: ByteArray}>();
for (const file of opts.files) {

const compressed = await gzipEncode(file.body);
Expand Down Expand Up @@ -109,7 +110,7 @@ export async function deployFirebaseSite(opts: {
return deploy;
}

async function gzipEncode(str: Uint8Array): Promise<Uint8Array> {
async function gzipEncode(str: ByteArray): Promise<ByteArray> {
const stream = ReadableStream.from([str])
.pipeThrough(new CompressionStream("gzip"));
return new Uint8Array(await new Response(stream).arrayBuffer());
Expand Down
3 changes: 2 additions & 1 deletion integrations/google-service-account_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Deno.test('Fetching an issued JWT', async () => {

sa[_mockFetch] = async (url, opts) => {
if (!opts || typeof url != 'string') throw new Error(`mock fail`);
if (!('body' in opts)) throw new Error('mock needs a body');
if (!(opts.body instanceof FormData)) throw new Error(`mock body fail`);

assertEquals(opts.body.get('assertion'), "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIiLCJzY29wZSI6InRlc3Qtc2NvcGUiLCJhdWQiOiJodHRwczovL29hdXRoMi5nb29nbGVhcGlzLmNvbS90b2tlbiIsImV4cCI6MTYwOTQ1OTIwMCwiaWF0IjoxNjA5NDU1NjAwfQ.d7WbLF29_tM457LfhZc4pq-4WdH002LjLCZaZMerl1FNTJ7r1Bf76JPc-QGq-QksIZJ33HGHjc27U9tBkoiZa1ja16-La-VoUkDrcBXIBZbGaWt7BSp4liHoX_Hnlhe8MrOctQb0MBmlkMOn_yu1Got3tyNqdrClAIpC5apWKucs_ZUzyZdxPZCjehjClY7RAkot1sTKj6rj_lVQY9lqRKgwyz4Ba7UvX7RA3YN1_5_niZTstl_dxsNv1DGHahgoT4fpmTuDikO_eoa8sfS59Ql8FXqwZVLCbIdzgi9Rc3Y9c6FzeXOn6gzR2KoBx7XjZxZlUPyToQM9Lmsw0JOb9A");

return new Response('{}');
return await Response.json({});
};
await sa.issueToken(['test-scope']);
});
Expand Down