Compare commits
4 Commits
d1f0242e1a
...
c17ecaaa7a
| Author | SHA1 | Date | |
|---|---|---|---|
| c17ecaaa7a | |||
| 69b7f1f864 | |||
| 2c8f09a028 | |||
| 184eafde46 |
@@ -1 +1,6 @@
|
||||
approvedGitRepositories:
|
||||
- "**"
|
||||
|
||||
enableScripts: true
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
+21
-21
@@ -12,48 +12,48 @@
|
||||
"prisma-update": "yarn prisma db push"
|
||||
},
|
||||
"dependencies": {
|
||||
"@chakra-ui/charts": "^3.34.0",
|
||||
"@chakra-ui/react": "^3.34.0",
|
||||
"@chakra-ui/charts": "^3.35.0",
|
||||
"@chakra-ui/react": "^3.35.0",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@escape.tech/graphql-armor": "^3.2.0",
|
||||
"@prisma/client": "^6.19.2",
|
||||
"@prisma/client": "^6.19.3",
|
||||
"@prisma/extension-accelerate": "^3.0.1",
|
||||
"@urql/next": "^2.0.0",
|
||||
"dotenv": "^17.3.1",
|
||||
"graphql": "^16.13.1",
|
||||
"dotenv": "^17.4.2",
|
||||
"graphql": "^16.13.2",
|
||||
"graphql-scalars": "^1.25.0",
|
||||
"graphql-yoga": "^5.18.1",
|
||||
"next": "16.2.1",
|
||||
"graphql-yoga": "^5.21.0",
|
||||
"next": "16.2.4",
|
||||
"next-themes": "^0.4.6",
|
||||
"react": "19.2.4",
|
||||
"react-dom": "19.2.4",
|
||||
"react": "19.2.5",
|
||||
"react-dom": "19.2.5",
|
||||
"react-icons": "^5.6.0",
|
||||
"recharts": "^3.8.0",
|
||||
"recharts": "^3.8.1",
|
||||
"rxjs": "^7.8.2",
|
||||
"urql": "^5.0.1"
|
||||
"urql": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.3.5",
|
||||
"@eslint/js": "^9.39.4",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@iconify/react": "^6.0.2",
|
||||
"@types/node": "^25.5.0",
|
||||
"@types/node": "^25.6.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.57.1",
|
||||
"@typescript-eslint/parser": "^8.57.1",
|
||||
"baseline-browser-mapping": "^2.10.10",
|
||||
"@typescript-eslint/eslint-plugin": "^8.59.1",
|
||||
"@typescript-eslint/parser": "^8.59.1",
|
||||
"baseline-browser-mapping": "^2.10.25",
|
||||
"eslint": "^9.39.4",
|
||||
"eslint-config-next": "16.2.1",
|
||||
"eslint-config-next": "16.2.4",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"prettier": "3.8.1",
|
||||
"prisma": "^6.19.2",
|
||||
"prettier": "3.8.3",
|
||||
"prisma": "^6.19.3",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.57.1"
|
||||
"typescript-eslint": "^8.59.1"
|
||||
},
|
||||
"packageManager": "yarn@4.12.0"
|
||||
"packageManager": "yarn@4.14.1"
|
||||
}
|
||||
|
||||
@@ -81,10 +81,13 @@ export const resolvers = {
|
||||
|
||||
if (env !== "development") {
|
||||
if (!mutationKey) {
|
||||
console.info("INIT: REFUSED - no mutation key was provided.");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mutationKey !== envMutationKey) {
|
||||
console.info("INIT: REFUSED - mutation key provided was incorrect.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -101,6 +104,7 @@ export const resolvers = {
|
||||
count++;
|
||||
}
|
||||
|
||||
console.info(`INIT: ${count} tables have been initialized with data.`);
|
||||
return `${count} tables have been initialized with data.`;
|
||||
},
|
||||
cronJob: async (
|
||||
@@ -112,10 +116,14 @@ export const resolvers = {
|
||||
|
||||
if (env !== "development") {
|
||||
if (!mutationKey) {
|
||||
console.info("CRONJOB: REFUSED - no mutation key was provided.");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mutationKey !== envMutationKey) {
|
||||
console.info(
|
||||
"CRONJOB: REFUSED - mutation key provided was incorrect."
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -124,6 +132,7 @@ export const resolvers = {
|
||||
|
||||
if (latestDailyStats !== null) {
|
||||
if (isDailyStatToday(String(latestDailyStats.createdAt))) {
|
||||
console.info("Cron job refused: latest document is current date.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -159,6 +168,7 @@ export const resolvers = {
|
||||
}
|
||||
});
|
||||
|
||||
console.info("CRONJOB: Creating new document.");
|
||||
return await prisma.totalStats.update({
|
||||
where: {
|
||||
createdAt: totalStats?.createdAt
|
||||
@@ -183,10 +193,15 @@ export const resolvers = {
|
||||
|
||||
if (env !== "development") {
|
||||
if (!mutationKey) {
|
||||
console.info("ADD GROUP: REFUSED - no mutation key was provided.");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mutationKey !== envMutationKey) {
|
||||
console.info(
|
||||
"ADD GROUP: REFUSED - mutation key provided was incorrect."
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -208,6 +223,7 @@ export const resolvers = {
|
||||
});
|
||||
}
|
||||
|
||||
console.info("ADD GROUP: Created new document.");
|
||||
return existingGroup;
|
||||
}
|
||||
|
||||
@@ -227,14 +243,21 @@ export const resolvers = {
|
||||
|
||||
if (env !== "development") {
|
||||
if (!mutationKey) {
|
||||
console.info(
|
||||
"INCREMENT GROUP: REFUSED - no mutation key was provided."
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mutationKey !== envMutationKey) {
|
||||
console.info(
|
||||
"INCREMENT GROUP: REFUSED - mutation key provided was incorrect."
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
console.info("INCREMENT GROUP: Incremented group document.");
|
||||
return await prisma.groups.update({
|
||||
where: { telegramID: BigInt(groupID) },
|
||||
data: { linksDeleted: { increment: linksDeleted } }
|
||||
@@ -254,10 +277,14 @@ export const resolvers = {
|
||||
|
||||
if (env !== "development") {
|
||||
if (!mutationKey) {
|
||||
console.info("INCREMENT: REFUSED - no mutation key was provided.");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mutationKey !== envMutationKey) {
|
||||
console.info(
|
||||
"INCREMENT: REFUSED - mutation key provided was incorrect."
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -279,6 +306,8 @@ export const resolvers = {
|
||||
});
|
||||
}
|
||||
|
||||
console.info("INCREMENT: Incremented information on today's document.");
|
||||
|
||||
return await prisma.dailyStats.update({
|
||||
where: { createdAt: latestDailyStats.createdAt },
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user