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