@kaikybrofc/omnizap-system 2.2.10 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/app/config/adminIdentity.js +1 -3
- package/app/connection/socketController.js +10 -20
- package/app/controllers/messageController.js +7 -28
- package/app/modules/aiModule/catCommand.js +29 -192
- package/app/modules/broadcastModule/noticeCommand.js +28 -97
- package/app/modules/gameModule/diceCommand.js +6 -32
- package/app/modules/playModule/playCommand.js +57 -258
- package/app/modules/quoteModule/quoteCommand.js +2 -4
- package/app/modules/rpgPokemonModule/rpgPokemonRepository.js +1 -13
- package/app/modules/statsModule/noMessageCommand.js +16 -84
- package/app/modules/statsModule/rankingCommand.js +5 -25
- package/app/modules/statsModule/rankingCommon.js +1 -9
- package/app/modules/stickerModule/convertToWebp.js +4 -27
- package/app/modules/stickerModule/stickerCommand.js +13 -24
- package/app/modules/stickerModule/stickerTextCommand.js +13 -25
- package/app/modules/stickerPackModule/autoPackCollectorService.js +16 -7
- package/app/modules/stickerPackModule/domainEventOutboxRepository.js +20 -36
- package/app/modules/stickerPackModule/domainEvents.js +2 -11
- package/app/modules/stickerPackModule/semanticReclassificationEngine.js +13 -50
- package/app/modules/stickerPackModule/semanticReclassificationEngine.test.js +2 -15
- package/app/modules/stickerPackModule/semanticThemeClusterService.js +14 -41
- package/app/modules/stickerPackModule/stickerAssetClassificationRepository.js +25 -95
- package/app/modules/stickerPackModule/stickerAssetRepository.js +12 -31
- package/app/modules/stickerPackModule/stickerAssetReprocessQueueRepository.js +13 -18
- package/app/modules/stickerPackModule/stickerAutoPackByTagsRuntime.js +284 -709
- package/app/modules/stickerPackModule/stickerClassificationBackgroundRuntime.js +27 -106
- package/app/modules/stickerPackModule/stickerClassificationService.js +46 -77
- package/app/modules/stickerPackModule/stickerDedicatedTaskWorkerRuntime.js +13 -53
- package/app/modules/stickerPackModule/stickerDomainEventBus.js +10 -16
- package/app/modules/stickerPackModule/stickerDomainEventConsumerRuntime.js +40 -39
- package/app/modules/stickerPackModule/stickerMarketplaceDriftService.js +1 -4
- package/app/modules/stickerPackModule/stickerObjectStorageService.js +26 -26
- package/app/modules/stickerPackModule/stickerPackCommandHandlers.js +32 -187
- package/app/modules/stickerPackModule/stickerPackInteractionEventRepository.js +6 -15
- package/app/modules/stickerPackModule/stickerPackItemRepository.js +6 -32
- package/app/modules/stickerPackModule/stickerPackMarketplaceService.js +12 -36
- package/app/modules/stickerPackModule/stickerPackMessageService.js +12 -40
- package/app/modules/stickerPackModule/stickerPackRepository.js +23 -66
- package/app/modules/stickerPackModule/stickerPackScoreSnapshotRepository.js +9 -21
- package/app/modules/stickerPackModule/stickerPackScoreSnapshotRuntime.js +10 -40
- package/app/modules/stickerPackModule/stickerPackService.js +50 -115
- package/app/modules/stickerPackModule/stickerPackServiceRuntime.js +2 -21
- package/app/modules/stickerPackModule/stickerPackUtils.js +13 -3
- package/app/modules/stickerPackModule/stickerStorageService.js +16 -65
- package/app/modules/stickerPackModule/stickerWorkerPipelineRuntime.js +4 -22
- package/app/modules/stickerPackModule/stickerWorkerTaskQueueRepository.js +14 -29
- package/app/modules/systemMetricsModule/pingCommand.js +9 -39
- package/app/modules/tiktokModule/tiktokCommand.js +17 -109
- package/app/modules/userModule/userCommand.js +2 -88
- package/app/observability/metrics.js +5 -16
- package/app/services/captchaService.js +1 -6
- package/app/services/dbWriteQueue.js +3 -18
- package/app/services/featureFlagService.js +2 -8
- package/app/services/newsBroadcastService.js +0 -1
- package/app/services/queueUtils.js +2 -4
- package/app/services/whatsappLoginLinkService.js +7 -9
- package/app/store/premiumUserStore.js +1 -2
- package/app/utils/antiLink/antiLinkModule.js +3 -233
- package/app/utils/logger/loggerModule.js +9 -34
- package/app/utils/systemMetrics/systemMetricsModule.js +1 -4
- package/database/index.js +1 -0
- package/database/init.js +1 -8
- package/database/migrations/20260228_0027_web_visit_event.sql +15 -0
- package/docker-compose.yml +27 -27
- package/docs/seo/omnizap-seo-playbook-br-2026-02-28.md +26 -0
- package/docs/seo/satellite-page-template.md +2 -0
- package/docs/seo/satellite-pages-phase1.json +40 -177
- package/eslint.config.js +2 -15
- package/index.js +8 -36
- package/ml/clip_classifier/README.md +4 -6
- package/observability/alert-rules.yml +12 -12
- package/observability/grafana/provisioning/dashboards/dashboards.yml +1 -1
- package/package.json +6 -3
- package/public/api-docs/index.html +220 -193
- package/public/bot-whatsapp-para-grupo/index.html +291 -261
- package/public/bot-whatsapp-sem-programar/index.html +291 -261
- package/public/comandos/index.html +421 -406
- package/public/como-automatizar-avisos-no-whatsapp/index.html +291 -261
- package/public/como-criar-comandos-whatsapp/index.html +291 -261
- package/public/como-evitar-spam-no-whatsapp/index.html +291 -261
- package/public/como-moderar-grupo-whatsapp/index.html +291 -261
- package/public/como-organizar-comunidade-whatsapp/index.html +291 -261
- package/public/css/github-project-panel.css +13 -8
- package/public/css/stickers-admin.css +25 -9
- package/public/css/styles.css +23 -16
- package/public/index.html +1106 -993
- package/public/js/apps/apiDocsApp.js +17 -167
- package/public/js/apps/createPackApp.js +69 -332
- package/public/js/apps/homeApp.js +274 -101
- package/public/js/apps/loginApp.js +3 -12
- package/public/js/apps/stickersAdminApp.js +190 -181
- package/public/js/apps/stickersApp.js +482 -1411
- package/public/js/apps/userApp.js +217 -1
- package/public/js/catalog.js +11 -74
- package/public/js/github-panel/components/ErrorState.js +1 -8
- package/public/js/github-panel/components/GithubProjectPanel.js +2 -9
- package/public/js/github-panel/components/SkeletonPanel.js +1 -11
- package/public/js/github-panel/components/StatCard.js +1 -7
- package/public/js/github-panel/vendor/react.js +1 -9
- package/public/js/runtime/react-runtime.js +1 -9
- package/public/licenca/index.html +200 -86
- package/public/login/index.html +315 -325
- package/public/melhor-bot-whatsapp-para-grupos/index.html +291 -261
- package/public/stickers/admin/index.html +14 -19
- package/public/stickers/create/index.html +39 -44
- package/public/stickers/index.html +96 -107
- package/public/termos-de-uso/index.html +369 -122
- package/public/user/index.html +527 -350
- package/scripts/cache-bust.mjs +5 -24
- package/scripts/generate-seo-satellite-pages.mjs +10 -13
- package/scripts/run-prettier-all.mjs +25 -0
- package/scripts/sticker-catalog-loadtest.mjs +13 -11
- package/scripts/sticker-worker-task.mjs +1 -4
- package/scripts/sync-readme-snapshot.mjs +3 -2
- package/server/auth/googleWebAuth/googleWebAuthService.js +614 -0
- package/server/controllers/stickerCatalogController.js +297 -632
- package/server/http/httpServer.js +2 -10
- package/server/routes/stickerCatalog/catalogHandlers/catalogAdminHttp.js +1 -8
- package/server/routes/stickerCatalog/catalogHandlers/catalogAuthHttp.js +1 -9
- package/server/routes/stickerCatalog/catalogHandlers/catalogPublicHttp.js +10 -11
- package/server/routes/stickerCatalog/catalogHandlers/catalogUploadHttp.js +1 -10
- package/server/routes/stickerCatalog/catalogRouter.js +11 -13
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import logger from '../../app/utils/logger/loggerModule.js';
|
|
3
|
-
import {
|
|
4
|
-
getMetricsServerConfig,
|
|
5
|
-
isMetricsEnabled,
|
|
6
|
-
recordHttpRequest,
|
|
7
|
-
resolveRouteGroup,
|
|
8
|
-
} from '../../app/observability/metrics.js';
|
|
3
|
+
import { getMetricsServerConfig, isMetricsEnabled, recordHttpRequest, resolveRouteGroup } from '../../app/observability/metrics.js';
|
|
9
4
|
import { parseRequestUrl, normalizeRequestId } from './requestContext.js';
|
|
10
5
|
import { maybeHandleMetricsRoute } from '../routes/metricsRoute.js';
|
|
11
|
-
import {
|
|
12
|
-
getStickerCatalogRouteConfig,
|
|
13
|
-
maybeHandleStickerCatalogRoute,
|
|
14
|
-
} from '../routes/stickerCatalogRoute.js';
|
|
6
|
+
import { getStickerCatalogRouteConfig, maybeHandleStickerCatalogRoute } from '../routes/stickerCatalogRoute.js';
|
|
15
7
|
|
|
16
8
|
let server = null;
|
|
17
9
|
let serverStarted = false;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
export const handleCatalogAdminRoutes = async ({
|
|
2
|
-
req,
|
|
3
|
-
res,
|
|
4
|
-
url,
|
|
5
|
-
segments,
|
|
6
|
-
handlers,
|
|
7
|
-
sendJson,
|
|
8
|
-
}) => {
|
|
1
|
+
export const handleCatalogAdminRoutes = async ({ req, res, url, segments, handlers, sendJson }) => {
|
|
9
2
|
if (segments[0] !== 'admin') return false;
|
|
10
3
|
|
|
11
4
|
if (segments.length === 2 && segments[1] === 'overview') {
|
|
@@ -2,15 +2,7 @@ const METHOD_NOT_ALLOWED_BODY = { error: 'Metodo nao permitido.' };
|
|
|
2
2
|
|
|
3
3
|
const isReadMethod = (method) => method === 'GET' || method === 'HEAD';
|
|
4
4
|
|
|
5
|
-
export const handleCatalogAuthRoutes = async ({
|
|
6
|
-
req,
|
|
7
|
-
res,
|
|
8
|
-
pathname,
|
|
9
|
-
url,
|
|
10
|
-
apiBasePath,
|
|
11
|
-
handlers,
|
|
12
|
-
sendJson,
|
|
13
|
-
}) => {
|
|
5
|
+
export const handleCatalogAuthRoutes = async ({ req, res, pathname, url, apiBasePath, handlers, sendJson }) => {
|
|
14
6
|
if (pathname === `${apiBasePath}/auth/google/session`) {
|
|
15
7
|
await handlers.handleGoogleAuthSessionRequest(req, res);
|
|
16
8
|
return true;
|
|
@@ -2,17 +2,7 @@ const METHOD_NOT_ALLOWED_BODY = { error: 'Metodo nao permitido.' };
|
|
|
2
2
|
|
|
3
3
|
const isReadMethod = (method) => method === 'GET' || method === 'HEAD';
|
|
4
4
|
|
|
5
|
-
export const handleCatalogPublicRoutes = async ({
|
|
6
|
-
req,
|
|
7
|
-
res,
|
|
8
|
-
pathname,
|
|
9
|
-
url,
|
|
10
|
-
segments,
|
|
11
|
-
apiBasePath,
|
|
12
|
-
orphanApiPath,
|
|
13
|
-
handlers,
|
|
14
|
-
sendJson,
|
|
15
|
-
}) => {
|
|
5
|
+
export const handleCatalogPublicRoutes = async ({ req, res, pathname, url, segments, apiBasePath, orphanApiPath, handlers, sendJson }) => {
|
|
16
6
|
if (pathname === apiBasePath) {
|
|
17
7
|
if (!isReadMethod(req.method || '')) {
|
|
18
8
|
sendJson(req, res, 405, METHOD_NOT_ALLOWED_BODY);
|
|
@@ -58,6 +48,15 @@ export const handleCatalogPublicRoutes = async ({
|
|
|
58
48
|
return true;
|
|
59
49
|
}
|
|
60
50
|
|
|
51
|
+
if (pathname === `${apiBasePath}/home-bootstrap`) {
|
|
52
|
+
if (!isReadMethod(req.method || '')) {
|
|
53
|
+
sendJson(req, res, 405, METHOD_NOT_ALLOWED_BODY);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
await handlers.handleHomeBootstrapRequest(req, res, url);
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
61
60
|
if (pathname === `${apiBasePath}/create-config`) {
|
|
62
61
|
if (!isReadMethod(req.method || '')) {
|
|
63
62
|
sendJson(req, res, 405, METHOD_NOT_ALLOWED_BODY);
|
|
@@ -2,16 +2,7 @@ const METHOD_NOT_ALLOWED_BODY = { error: 'Metodo nao permitido.' };
|
|
|
2
2
|
|
|
3
3
|
const isPublishStateMethod = (method) => method === 'GET' || method === 'HEAD' || method === 'POST';
|
|
4
4
|
|
|
5
|
-
export const handleCatalogUploadRoutes = async ({
|
|
6
|
-
req,
|
|
7
|
-
res,
|
|
8
|
-
pathname,
|
|
9
|
-
url,
|
|
10
|
-
segments,
|
|
11
|
-
apiBasePath,
|
|
12
|
-
handlers,
|
|
13
|
-
sendJson,
|
|
14
|
-
}) => {
|
|
5
|
+
export const handleCatalogUploadRoutes = async ({ req, res, pathname, url, segments, apiBasePath, handlers, sendJson }) => {
|
|
15
6
|
if (pathname === `${apiBasePath}/create`) {
|
|
16
7
|
if (req.method !== 'POST') {
|
|
17
8
|
sendJson(req, res, 405, METHOD_NOT_ALLOWED_BODY);
|
|
@@ -4,20 +4,18 @@ import { handleCatalogUploadRoutes } from './catalogHandlers/catalogUploadHttp.j
|
|
|
4
4
|
import { handleCatalogPublicRoutes } from './catalogHandlers/catalogPublicHttp.js';
|
|
5
5
|
|
|
6
6
|
const decodePathSegments = (suffix) =>
|
|
7
|
-
suffix
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
suffix
|
|
8
|
+
.split('/')
|
|
9
|
+
.filter(Boolean)
|
|
10
|
+
.map((segment) => {
|
|
11
|
+
try {
|
|
12
|
+
return decodeURIComponent(segment);
|
|
13
|
+
} catch {
|
|
14
|
+
return segment;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
14
17
|
|
|
15
|
-
export const createCatalogApiRouter = ({
|
|
16
|
-
apiBasePath,
|
|
17
|
-
orphanApiPath,
|
|
18
|
-
handlers,
|
|
19
|
-
sendJson,
|
|
20
|
-
}) => {
|
|
18
|
+
export const createCatalogApiRouter = ({ apiBasePath, orphanApiPath, handlers, sendJson }) => {
|
|
21
19
|
if (!apiBasePath || typeof handlers !== 'object' || typeof sendJson !== 'function') {
|
|
22
20
|
throw new Error('catalog_api_router_config_invalid');
|
|
23
21
|
}
|