Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# OpenGB
.opengb/
dist/
gen/
_gen/
*.gen.ts

# Created by https://www.toptal.com/developers/gitignore/api/deno,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=deno,macos
Expand Down
4 changes: 2 additions & 2 deletions modules/auth/scripts/auth_email_passwordless.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RuntimeError } from "../_gen/mod.ts";
import { ScriptContext } from "../_gen/scripts/auth_email_passwordless.ts";
import { RuntimeError } from "../module.gen.ts";
import { ScriptContext } from "../module.gen.ts";
import { Verification } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/auth/scripts/verify_email_passwordless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assertExists } from "https://deno.land/std@0.208.0/assert/mod.ts";
import {
RuntimeError,
ScriptContext,
} from "../_gen/scripts/verify_email_passwordless.ts";
} from "../module.gen.ts";
import { TokenWithSecret } from "../../tokens/utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/auth/tests/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, TestContext } from "../_gen/test.ts";
import { test, TestContext } from "../module.gen.ts";
import { assertEquals } from "https://deno.land/std@0.208.0/assert/mod.ts";
import { faker } from "https://deno.land/x/deno_faker@v1.0.3/mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/currency/scripts/deposit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/deposit.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";

import { getBalance } from "../utils/get_balance.ts";
import { setBalance } from "../utils/set_balance.ts";
Expand Down
2 changes: 1 addition & 1 deletion modules/currency/scripts/get_balance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/get_balance.ts";
import { ScriptContext } from "../module.gen.ts";

import { getBalance } from "../utils/get_balance.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/currency/scripts/get_balance_by_token.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/get_balance_by_token.ts";
import { ScriptContext } from "../module.gen.ts";

export interface Request {
userToken: string;
Expand Down
4 changes: 2 additions & 2 deletions modules/currency/scripts/set_balance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RuntimeError } from "../_gen/scripts/set_balance.ts";
import { ScriptContext } from "../_gen/scripts/set_balance.ts";
import { RuntimeError } from "../module.gen.ts";
import { ScriptContext } from "../module.gen.ts";

import { setBalance } from "../utils/set_balance.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/currency/scripts/withdraw.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/withdraw.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";

import { getBalance } from "../utils/get_balance.ts";
import { setBalance } from "../utils/set_balance.ts";
Expand Down
2 changes: 1 addition & 1 deletion modules/currency/tests/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, TestContext } from "../_gen/test.ts";
import { test, TestContext } from "../module.gen.ts";
import { assertEquals } from "https://deno.land/std@0.217.0/assert/mod.ts";
import { faker } from "https://deno.land/x/deno_faker@v1.0.3/mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/currency/tests/errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, test, TestContext } from "../_gen/test.ts";
import { RuntimeError, test, TestContext } from "../module.gen.ts";
import {
assertEquals,
assertRejects,
Expand Down
2 changes: 1 addition & 1 deletion modules/currency/utils/get_balance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { prisma } from "../_gen/mod.ts";
import { prisma } from "../module.gen.ts";

type LimittedDB = Omit<
prisma.Prisma.DefaultPrismaClient,
Expand Down
2 changes: 1 addition & 1 deletion modules/currency/utils/set_balance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { prisma, RuntimeError } from "../_gen/mod.ts";
import { prisma, RuntimeError } from "../module.gen.ts";

type LimittedDB = Omit<
prisma.Prisma.DefaultPrismaClient,
Expand Down
2 changes: 1 addition & 1 deletion modules/email/scripts/send_email.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertExists } from "https://deno.land/std@0.208.0/assert/assert_exists.ts";
import { RuntimeError, ScriptContext } from "../_gen/scripts/send_email.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";
import { ProviderSendGrid } from "../config.ts";
import { Email } from "../utils/types.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/accept_request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/accept_request.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";

export interface Request {
userToken: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/decline_request.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
RuntimeError,
ScriptContext,
} from "../_gen/scripts/decline_request.ts";
} from "../module.gen.ts";

export interface Request {
userToken: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/list_friends.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/list_friends.ts";
import { ScriptContext } from "../module.gen.ts";
import { Friend, friendFromRow } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/list_incoming_friend_requests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/list_incoming_friend_requests.ts";
import { ScriptContext } from "../module.gen.ts";
import { FriendRequest, friendRequestFromRow } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/list_outgoing_friend_requests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/list_outgoing_friend_requests.ts";
import { ScriptContext } from "../module.gen.ts";
import { FriendRequest, friendRequestFromRow } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/remove_friend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/remove_friend.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";

export interface Request {
userToken: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/scripts/send_request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/send_request.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";
import { FriendRequest, friendRequestFromRow } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/friends/tests/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, TestContext } from "../_gen/test.ts";
import { test, TestContext } from "../module.gen.ts";
import { assertEquals } from "https://deno.land/std@0.217.0/assert/mod.ts";
import { faker } from "https://deno.land/x/deno_faker@v1.0.3/mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/friends/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { prisma } from "../_gen/mod.ts";
import { prisma } from "../module.gen.ts";

export interface Friend {
userIdA: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/rate_limit/scripts/throttle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/throttle.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";

export interface Request {
/**
Expand Down
2 changes: 1 addition & 1 deletion modules/rate_limit/scripts/throttle_public.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/throttle_public.ts";
import { ScriptContext } from "../module.gen.ts";

export interface Request {
/**
Expand Down
2 changes: 1 addition & 1 deletion modules/rate_limit/tests/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, test, TestContext } from "../_gen/test.ts";
import { RuntimeError, test, TestContext } from "../module.gen.ts";
import {
assertEquals,
assertRejects,
Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/scripts/create.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/create.ts";
import { ScriptContext } from "../module.gen.ts";
import { TokenWithSecret } from "../utils/types.ts";
import { tokenFromRow } from "../utils/types.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/scripts/extend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/extend.ts";
import { ScriptContext } from "../module.gen.ts";
import { TokenWithSecret } from "../utils/types.ts";
import { tokenFromRow } from "../utils/types.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/scripts/get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/get.ts";
import { ScriptContext } from "../module.gen.ts";
import { Token } from "../utils/types.ts";
import { tokenFromRow } from "../utils/types.ts";

Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/scripts/get_by_token.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/get_by_token.ts";
import { ScriptContext } from "../module.gen.ts";
import { Token, tokenFromRow } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/scripts/revoke.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Prisma, ScriptContext } from "../_gen/scripts/revoke.ts";
import { Prisma, ScriptContext } from "../module.gen.ts";

export interface Request {
tokenIds: string[];
Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/scripts/validate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, ScriptContext } from "../_gen/scripts/validate.ts";
import { RuntimeError, ScriptContext } from "../module.gen.ts";
import { Token } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/tests/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, TestContext } from "../_gen/test.ts";
import { test, TestContext } from "../module.gen.ts";
import {
assertEquals,
assertExists,
Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/tests/validate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RuntimeError, test, TestContext } from "../_gen/test.ts";
import { RuntimeError, test, TestContext } from "../module.gen.ts";
import {
assertEquals,
assertRejects,
Expand Down
2 changes: 1 addition & 1 deletion modules/tokens/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { prisma } from "../_gen/mod.ts";
import { prisma } from "../module.gen.ts";

export interface Token {
id: string;
Expand Down
4 changes: 2 additions & 2 deletions modules/users/scripts/authenticate_user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RuntimeError } from "../_gen/mod.ts";
import { ScriptContext } from "../_gen/scripts/authenticate_user.ts";
import { RuntimeError } from "../module.gen.ts";
import { ScriptContext } from "../module.gen.ts";

export interface Request {
userToken: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/users/scripts/create_user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/create_user.ts";
import { ScriptContext } from "../module.gen.ts";
import { User } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/users/scripts/create_user_token.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TokenWithSecret } from "../../tokens/utils/types.ts";
import { ScriptContext } from "../_gen/scripts/create_user_token.ts";
import { ScriptContext } from "../module.gen.ts";

export interface Request {
userId: string;
Expand Down
2 changes: 1 addition & 1 deletion modules/users/scripts/get_user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ScriptContext } from "../_gen/scripts/get_user.ts";
import { ScriptContext } from "../module.gen.ts";
import { User } from "../utils/types.ts";

export interface Request {
Expand Down
2 changes: 1 addition & 1 deletion modules/users/tests/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, TestContext } from "../_gen/test.ts";
import { test, TestContext } from "../module.gen.ts";
import { faker } from "https://deno.land/x/deno_faker@v1.0.3/mod.ts";
import { assertEquals } from "https://deno.land/std@0.217.0/assert/assert_equals.ts";
import { assertExists } from "https://deno.land/std@0.217.0/assert/assert_exists.ts";
Expand Down
Loading