Skip to content

Commit 8f668fe

Browse files
authored
Revert "refactor: clearer folder organization (#792)" (#795)
This reverts commit 5d405f0.
1 parent 5d405f0 commit 8f668fe

File tree

449 files changed

+1000
-978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+1000
-978
lines changed

.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.organizeImports": "explicit",
4+
"source.eslint.fixAll": "explicit"
5+
},
6+
"editor.defaultFormatter": "esbenp.prettier-vscode",
7+
"editor.formatOnSave": true,
8+
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
9+
"typescript.tsdk": "node_modules/typescript/lib",
10+
"typescript.enablePromptUseWorkspaceTsdk": true,
11+
"[prisma]": {
12+
"editor.defaultFormatter": "Prisma.prisma"
13+
},
14+
"[typescript]": {
15+
"editor.defaultFormatter": "biomejs.biome"
16+
}
17+
}

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ COPY --from=build /app/package.json .
6464
COPY --from=build /app/node_modules ./node_modules
6565
COPY --from=build /app/src/prisma/* ./src/prisma/
6666
COPY --from=build /app/dist ./dist
67-
COPY --from=build /app/scripts ./dist/scripts
6867

6968
# Replace the schema path in the package.json file
7069
RUN sed -i 's_"schema": "./src/prisma/schema.prisma"_"schema": "./dist/prisma/schema.prisma"_g' package.json

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"dev:run": "npx nodemon --watch 'src/**/*.ts' --exec 'npx tsx ./src/index.ts' --files src/index.ts",
1414
"build": "rm -rf dist && tsc -p ./tsconfig.json --outDir dist",
1515
"build:docker": "docker build . -f Dockerfile -t prod",
16-
"generate:sdk": "npx tsx ./scripts/generate-sdk && cd ./sdk && yarn build",
17-
"prisma:setup:dev": "npx tsx ./scripts/setup-db.ts",
16+
"generate:sdk": "npx tsx ./src/scripts/generate-sdk && cd ./sdk && yarn build",
17+
"prisma:setup:dev": "npx tsx ./src/scripts/setup-db.ts",
1818
"prisma:setup:prod": "npx tsx ./dist/scripts/setup-db.js",
1919
"start": "yarn prisma:setup:prod && yarn start:migrations && yarn start:run",
2020
"start:migrations": "npx tsx ./dist/scripts/apply-migrations.js",

src/shared/db/chainIndexers/getChainIndexer.ts renamed to src/db/chainIndexers/getChainIndexer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Prisma } from "@prisma/client";
2-
import type { PrismaTransaction } from "../../schemas/prisma";
2+
import type { PrismaTransaction } from "../../schema/prisma";
33
import { getPrismaWithPostgresTx } from "../client";
44

55
interface GetLastIndexedBlockParams {

src/shared/db/chainIndexers/upsertChainIndexer.ts renamed to src/db/chainIndexers/upsertChainIndexer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { PrismaTransaction } from "../../schemas/prisma";
1+
import type { PrismaTransaction } from "../../schema/prisma";
22
import { getPrismaWithPostgresTx } from "../client";
33

44
interface UpsertChainIndexerParams {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PrismaClient } from "@prisma/client";
2-
import pg, { type Knex } from "knex";
3-
import type { PrismaTransaction } from "../schemas/prisma";
2+
import pg, { Knex } from "knex";
3+
import { PrismaTransaction } from "../schema/prisma";
44
import { env } from "../utils/env";
55

66
export const prisma = new PrismaClient({
@@ -26,7 +26,7 @@ export const isDatabaseReachable = async () => {
2626
try {
2727
await prisma.walletDetails.findFirst();
2828
return true;
29-
} catch {
29+
} catch (error) {
3030
return false;
3131
}
3232
};

src/shared/db/configuration/getConfiguration.ts renamed to src/db/configuration/getConfiguration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import type {
77
AwsWalletConfiguration,
88
GcpWalletConfiguration,
99
ParsedConfig,
10-
} from "../../schemas/config";
11-
import { WalletType } from "../../schemas/wallet";
12-
import { mandatoryAllowedCorsUrls } from "../../../server/utils/cors-urls";
10+
} from "../../schema/config";
11+
import { WalletType } from "../../schema/wallet";
12+
import { mandatoryAllowedCorsUrls } from "../../server/utils/cors-urls";
1313
import type { networkResponseSchema } from "../../utils/cache/getSdk";
1414
import { decrypt } from "../../utils/crypto";
1515
import { env } from "../../utils/env";
File renamed without changes.

src/shared/db/contractEventLogs/createContractEventLogs.ts renamed to src/db/contractEventLogs/createContractEventLogs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { ContractEventLogs, Prisma } from "@prisma/client";
2-
import type { PrismaTransaction } from "../../schemas/prisma";
1+
import { ContractEventLogs, Prisma } from "@prisma/client";
2+
import { PrismaTransaction } from "../../schema/prisma";
33
import { getPrismaWithPostgresTx } from "../client";
44

55
export interface BulkInsertContractLogsParams {

0 commit comments

Comments
 (0)