Skip to content

Commit

Permalink
Move stray code files in supabase
Browse files Browse the repository at this point in the history
  • Loading branch information
limdingwen committed Jul 25, 2024
1 parent d94ae39 commit 98e7a2e
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions supabase/functions/generate-bills-summary/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts";
import proxyToResponseWrapper from "../proxy-to-response-wrapper.ts";
import generateBillsSummary from "../generate-bills-summary.ts";
import proxyToResponseWrapper from "../lib/utils/proxy-to-response-wrapper.ts";
import generateBillsSummary from "../lib/shared-functions/generate-bills-summary.ts";

Deno.serve(proxyToResponseWrapper(generateBillsSummary));
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSupabase } from "./create-supabase.ts";
import createOpenAi from "./create-openai.ts";
import { isAdmin } from "./check-admin.ts";
import buildResponseProxy from "./build-response-proxy.ts";
import { createSupabase } from "../utils/create-supabase.ts";
import createOpenAi from "../utils/create-openai.ts";
import { isAdmin } from "../utils/check-admin.ts";
import buildResponseProxy from "../utils/build-response-proxy.ts";
import { TextContentBlock } from "https://deno.land/x/[email protected]/resources/beta/threads/messages.ts";

function restrictInputLength(input: string, length: number) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createSupabase } from "./create-supabase.ts";
import { isAdmin } from "./check-admin.ts";
import { createSupabase } from "../utils/create-supabase.ts";
import { isAdmin } from "../utils/check-admin.ts";
import {
DOMParser,
Element,
} from "https://deno.land/x/[email protected]/deno-dom-wasm.ts";
import buildResponseProxy from "./build-response-proxy.ts";
import buildResponseProxy from "../utils/build-response-proxy.ts";

function toIsoDate(dateString: string): string {
const [day, month, year] = dateString.split(".");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createSupabase } from "./create-supabase.ts";
import { isAdmin } from "./check-admin.ts";
import * as pdfjs from "./lib/pdfjs/pdf.mjs";
import * as pdfjsworker from "./lib/pdfjs/pdf.worker.mjs";
import buildResponseProxy from "./build-response-proxy.ts";
import { createSupabase } from "../utils/create-supabase.ts";
import { isAdmin } from "../utils/check-admin.ts";
import * as pdfjs from "../pdfjs/pdf.mjs";
import * as pdfjsworker from "../pdfjs/pdf.worker.mjs";
import buildResponseProxy from "../utils/build-response-proxy.ts";

// Just a reference to force the import of the worker, otherwise it will not be included in the bundle
// noinspection JSUnusedLocalSymbols
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions supabase/functions/per-1-hour/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts";
import { buildResponse } from "../build-response.ts";
import scrapeBillsIntroduced from "../scrape-bills-introduced.ts";
import { buildResponse } from "../lib/utils/build-response.ts";
import scrapeBillsIntroduced from "../lib/shared-functions/scrape-bills-introduced.ts";

Deno.serve(async (req) => {
return buildResponse([await scrapeBillsIntroduced(req)]);
Expand Down
6 changes: 3 additions & 3 deletions supabase/functions/per-10-min/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts";
import scrapeBillsPdf from "../scrape-bills-pdf.ts";
import generateBillsSummary from "../generate-bills-summary.ts";
import { buildResponse } from "../build-response.ts";
import scrapeBillsPdf from "../lib/shared-functions/scrape-bills-pdf.ts";
import generateBillsSummary from "../lib/shared-functions/generate-bills-summary.ts";
import { buildResponse } from "../lib/utils/build-response.ts";

Deno.serve(async (req) => {
return buildResponse([
Expand Down
4 changes: 2 additions & 2 deletions supabase/functions/scrape-bills-introduced/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts";
import proxyToResponseWrapper from "../proxy-to-response-wrapper.ts";
import scrapeBillsIntroduced from "../scrape-bills-introduced.ts";
import proxyToResponseWrapper from "../lib/utils/proxy-to-response-wrapper.ts";
import scrapeBillsIntroduced from "../lib/shared-functions/scrape-bills-introduced.ts";

Deno.serve(proxyToResponseWrapper(scrapeBillsIntroduced));
4 changes: 2 additions & 2 deletions supabase/functions/scrape-bills-pdf/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "https://esm.sh/@supabase/functions-js/src/edge-runtime.d.ts";
import proxyToResponseWrapper from "../proxy-to-response-wrapper.ts";
import scrapeBillsPdf from "../scrape-bills-pdf.ts";
import proxyToResponseWrapper from "../lib/utils/proxy-to-response-wrapper.ts";
import scrapeBillsPdf from "../lib/shared-functions/scrape-bills-pdf.ts";

Deno.serve(proxyToResponseWrapper(scrapeBillsPdf));

0 comments on commit 98e7a2e

Please sign in to comment.