@@ -9,11 +9,9 @@ import { chromium } from 'playwright-extra';
|
|||||||
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
||||||
import { PlaywrightBlocker } from '@cliqz/adblocker-playwright';
|
import { PlaywrightBlocker } from '@cliqz/adblocker-playwright';
|
||||||
import fetch from 'cross-fetch';
|
import fetch from 'cross-fetch';
|
||||||
import { throttle } from 'lodash';
|
|
||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
|
|
||||||
import logger from '../../logger';
|
import logger from '../../logger';
|
||||||
import { InterpreterSettings, RemoteBrowserOptions } from "../../types";
|
import { InterpreterSettings } from "../../types";
|
||||||
import { WorkflowGenerator } from "../../workflow-management/classes/Generator";
|
import { WorkflowGenerator } from "../../workflow-management/classes/Generator";
|
||||||
import { WorkflowInterpreter } from "../../workflow-management/classes/Interpreter";
|
import { WorkflowInterpreter } from "../../workflow-management/classes/Interpreter";
|
||||||
import { getDecryptedProxyConfig } from '../../routes/proxy';
|
import { getDecryptedProxyConfig } from '../../routes/proxy';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Request, Response } from "express";
|
import { Response } from "express";
|
||||||
import User from "../models/User";
|
import User from "../models/User";
|
||||||
import { AuthenticatedRequest } from "../routes/record"
|
import { AuthenticatedRequest } from "../routes/record"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Model, DataTypes, Optional } from 'sequelize';
|
import { Model, DataTypes, Optional } from 'sequelize';
|
||||||
import sequelize from '../storage/db';
|
import sequelize from '../storage/db';
|
||||||
import { WorkflowFile, Where, What, WhereWhatPair } from 'maxun-core';
|
import { WhereWhatPair } from 'maxun-core';
|
||||||
|
|
||||||
interface RobotMeta {
|
interface RobotMeta {
|
||||||
name: string;
|
name: string;
|
||||||
@@ -143,9 +143,4 @@ Robot.init(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Robot.hasMany(Run, {
|
|
||||||
// foreignKey: 'robotId',
|
|
||||||
// as: 'runs', // Alias for the relation
|
|
||||||
// });
|
|
||||||
|
|
||||||
export default Robot;
|
export default Robot;
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import { DataTypes, Model, Optional } from 'sequelize';
|
import { DataTypes, Model, Optional } from 'sequelize';
|
||||||
import sequelize from '../storage/db';
|
import sequelize from '../storage/db';
|
||||||
import Robot from './Robot';
|
|
||||||
|
|
||||||
interface UserAttributes {
|
interface UserAttributes {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -61,13 +60,6 @@ User.init(
|
|||||||
proxy_username: {
|
proxy_username: {
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
allowNull: true,
|
allowNull: true,
|
||||||
// validate: {
|
|
||||||
// isProxyPasswordRequired(value: string | null) {
|
|
||||||
// if (value && !this.proxy_password) {
|
|
||||||
// throw new Error('Proxy password is required when proxy username is provided');
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
proxy_password: {
|
proxy_password: {
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
@@ -80,9 +72,4 @@ User.init(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// User.hasMany(Robot, {
|
|
||||||
// foreignKey: 'userId',
|
|
||||||
// as: 'robots', // Alias for the relation
|
|
||||||
// });
|
|
||||||
|
|
||||||
export default User;
|
export default User;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
destroyRemoteBrowser,
|
destroyRemoteBrowser,
|
||||||
interpretWholeWorkflow,
|
interpretWholeWorkflow,
|
||||||
stopRunningInterpretation,
|
stopRunningInterpretation,
|
||||||
createRemoteBrowserForRun
|
|
||||||
} from './browser-management/controller';
|
} from './browser-management/controller';
|
||||||
import { WorkflowFile } from 'maxun-core';
|
import { WorkflowFile } from 'maxun-core';
|
||||||
import Run from './models/Run';
|
import Run from './models/Run';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Router, Request, Response } from "express";
|
import { Router, Request, Response } from "express";
|
||||||
|
|
||||||
import User from "../models/User";
|
import User from "../models/User";
|
||||||
import Robot from "../models/Robot";
|
import Robot from "../models/Robot";
|
||||||
import jwt from "jsonwebtoken";
|
import jwt from "jsonwebtoken";
|
||||||
@@ -10,7 +9,6 @@ import { google } from "googleapis";
|
|||||||
import { capture } from "../utils/analytics";
|
import { capture } from "../utils/analytics";
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
|
|
||||||
|
|
||||||
declare module "express-session" {
|
declare module "express-session" {
|
||||||
interface SessionData {
|
interface SessionData {
|
||||||
code_verifier: string;
|
code_verifier: string;
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import { Router, Request, Response } from 'express';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
initializeRemoteBrowserForRecording,
|
initializeRemoteBrowserForRecording,
|
||||||
destroyRemoteBrowser,
|
|
||||||
getActiveBrowserId,
|
|
||||||
interpretWholeWorkflow,
|
interpretWholeWorkflow,
|
||||||
stopRunningInterpretation,
|
stopRunningInterpretation,
|
||||||
getRemoteBrowserCurrentUrl,
|
getRemoteBrowserCurrentUrl,
|
||||||
@@ -16,7 +14,6 @@ import {
|
|||||||
import { chromium } from 'playwright-extra';
|
import { chromium } from 'playwright-extra';
|
||||||
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
||||||
import logger from "../logger";
|
import logger from "../logger";
|
||||||
import { getDecryptedProxyConfig } from './proxy';
|
|
||||||
import { requireSignIn } from '../middlewares/auth';
|
import { requireSignIn } from '../middlewares/auth';
|
||||||
import { pgBoss } from '../pgboss-worker';
|
import { pgBoss } from '../pgboss-worker';
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,21 @@
|
|||||||
import { Router } from 'express';
|
import { Router } from 'express';
|
||||||
import logger from "../logger";
|
import logger from "../logger";
|
||||||
import { createRemoteBrowserForRun, destroyRemoteBrowser, getActiveBrowserIdByState } from "../browser-management/controller";
|
import { createRemoteBrowserForRun, getActiveBrowserIdByState } from "../browser-management/controller";
|
||||||
import { chromium } from 'playwright-extra';
|
import { chromium } from 'playwright-extra';
|
||||||
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
||||||
import { browserPool } from "../server";
|
import { browserPool } from "../server";
|
||||||
import { uuid } from "uuidv4";
|
import { uuid } from "uuidv4";
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
import cron from 'node-cron';
|
import cron from 'node-cron';
|
||||||
import { googleSheetUpdateTasks, processGoogleSheetUpdates } from '../workflow-management/integrations/gsheet';
|
|
||||||
import { getDecryptedProxyConfig } from './proxy';
|
import { getDecryptedProxyConfig } from './proxy';
|
||||||
import { requireSignIn } from '../middlewares/auth';
|
import { requireSignIn } from '../middlewares/auth';
|
||||||
import Robot from '../models/Robot';
|
import Robot from '../models/Robot';
|
||||||
import Run from '../models/Run';
|
import Run from '../models/Run';
|
||||||
import { BinaryOutputService } from '../storage/mino';
|
|
||||||
import { workflowQueue } from '../worker';
|
|
||||||
import { AuthenticatedRequest } from './record';
|
import { AuthenticatedRequest } from './record';
|
||||||
import { computeNextRun } from '../utils/schedule';
|
import { computeNextRun } from '../utils/schedule';
|
||||||
import { capture } from "../utils/analytics";
|
import { capture } from "../utils/analytics";
|
||||||
import { tryCatch } from 'bullmq';
|
|
||||||
import { encrypt, decrypt } from '../utils/auth';
|
import { encrypt, decrypt } from '../utils/auth';
|
||||||
import { WorkflowFile } from 'maxun-core';
|
import { WorkflowFile } from 'maxun-core';
|
||||||
import { Page } from 'playwright';
|
|
||||||
import { airtableUpdateTasks, processAirtableUpdates } from '../workflow-management/integrations/airtable';
|
|
||||||
import { cancelScheduledWorkflow, scheduleWorkflow } from '../schedule-worker';
|
import { cancelScheduledWorkflow, scheduleWorkflow } from '../schedule-worker';
|
||||||
import { pgBoss } from '../pgboss-worker';
|
import { pgBoss } from '../pgboss-worker';
|
||||||
chromium.use(stealthPlugin());
|
chromium.use(stealthPlugin());
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import logger from './logger';
|
|||||||
import Robot from './models/Robot';
|
import Robot from './models/Robot';
|
||||||
import { handleRunRecording } from './workflow-management/scheduler';
|
import { handleRunRecording } from './workflow-management/scheduler';
|
||||||
import { computeNextRun } from './utils/schedule';
|
import { computeNextRun } from './utils/schedule';
|
||||||
import { capture } from './utils/analytics';
|
|
||||||
|
|
||||||
const pgBossConnectionString = `postgres://${process.env.DB_USER}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_NAME}`;
|
const pgBossConnectionString = `postgres://${process.env.DB_USER}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_NAME}`;
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ import { record, workflow, storage, auth, integration, proxy } from './routes';
|
|||||||
import { BrowserPool } from "./browser-management/classes/BrowserPool";
|
import { BrowserPool } from "./browser-management/classes/BrowserPool";
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
import { connectDB, syncDB } from './storage/db'
|
import { connectDB, syncDB } from './storage/db'
|
||||||
import bodyParser from 'body-parser';
|
|
||||||
import cookieParser from 'cookie-parser';
|
import cookieParser from 'cookie-parser';
|
||||||
import csrf from 'csurf';
|
|
||||||
import { SERVER_PORT } from "./constants/config";
|
import { SERVER_PORT } from "./constants/config";
|
||||||
import { Server } from "socket.io";
|
import { Server } from "socket.io";
|
||||||
import { readdirSync } from "fs"
|
import { readdirSync } from "fs"
|
||||||
@@ -20,9 +18,7 @@ import swaggerUi from 'swagger-ui-express';
|
|||||||
import swaggerSpec from './swagger/config';
|
import swaggerSpec from './swagger/config';
|
||||||
import connectPgSimple from 'connect-pg-simple';
|
import connectPgSimple from 'connect-pg-simple';
|
||||||
import pg from 'pg';
|
import pg from 'pg';
|
||||||
|
|
||||||
import session from 'express-session';
|
import session from 'express-session';
|
||||||
|
|
||||||
import Run from './models/Run';
|
import Run from './models/Run';
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Namespace, Socket } from 'socket.io';
|
import { Namespace, Socket } from 'socket.io';
|
||||||
import { IncomingMessage } from 'http';
|
import { IncomingMessage } from 'http';
|
||||||
import { verify, JwtPayload, sign } from 'jsonwebtoken';
|
import { verify, JwtPayload } from 'jsonwebtoken';
|
||||||
import logger from "../logger";
|
import logger from "../logger";
|
||||||
import registerInputHandlers from '../browser-management/inputHandlers';
|
import registerInputHandlers from '../browser-management/inputHandlers';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Sequelize } from 'sequelize';
|
import { Sequelize } from 'sequelize';
|
||||||
import dotenv from 'dotenv';
|
import dotenv from 'dotenv';
|
||||||
import setupAssociations from '../models/associations';
|
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,7 @@ import {
|
|||||||
selectorAlreadyInWorkflow
|
selectorAlreadyInWorkflow
|
||||||
} from "../selector";
|
} from "../selector";
|
||||||
import { CustomActions } from "../../../../src/shared/types";
|
import { CustomActions } from "../../../../src/shared/types";
|
||||||
import { workflow } from "../../routes";
|
|
||||||
import Robot from "../../models/Robot";
|
import Robot from "../../models/Robot";
|
||||||
import Run from "../../models/Run";
|
|
||||||
import { saveFile } from "../storage";
|
|
||||||
import fs from "fs";
|
|
||||||
import { getBestSelectorForAction } from "../utils";
|
import { getBestSelectorForAction } from "../utils";
|
||||||
import { browserPool } from "../../server";
|
import { browserPool } from "../../server";
|
||||||
import { uuid } from "uuidv4";
|
import { uuid } from "uuidv4";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|||||||
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
||||||
import { NavBarButton } from '../ui/buttons/buttons';
|
import { NavBarButton } from '../ui/buttons/buttons';
|
||||||
import { UrlForm } from './UrlForm';
|
import { UrlForm } from './UrlForm';
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect } from "react";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../context/socket";
|
||||||
import { getCurrentUrl } from "../../api/recording";
|
import { getCurrentUrl } from "../../api/recording";
|
||||||
import { useGlobalInfoStore } from '../../context/globalInfo';
|
import { useGlobalInfoStore } from '../../context/globalInfo';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Tab from '@mui/material/Tab';
|
|||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { Paper, Button, useTheme } from "@mui/material";
|
import { Paper, Button, useTheme } from "@mui/material";
|
||||||
import { AutoAwesome, FormatListBulleted, VpnKey, Usb, Article, CloudQueue, Code, } from "@mui/icons-material";
|
import { AutoAwesome, FormatListBulleted, VpnKey, Usb, CloudQueue, Code, } from "@mui/icons-material";
|
||||||
import { apiUrl } from "../../apiConfig";
|
import { apiUrl } from "../../apiConfig";
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import i18n from '../../i18n';
|
import i18n from '../../i18n';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import SwipeableDrawer from '@mui/material/SwipeableDrawer';
|
import SwipeableDrawer from '@mui/material/SwipeableDrawer';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { Button, TextField, Grid } from '@mui/material';
|
import { Button, Grid } from '@mui/material';
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../context/socket";
|
||||||
import { Buffer } from 'buffer';
|
import { Buffer } from 'buffer';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React from 'react';
|
||||||
import { Grid } from "@mui/material";
|
import { Grid } from "@mui/material";
|
||||||
import { RunsTable } from "./RunsTable";
|
import { RunsTable } from "./RunsTable";
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import TableContainer from '@mui/material/TableContainer';
|
|||||||
import TableHead from '@mui/material/TableHead';
|
import TableHead from '@mui/material/TableHead';
|
||||||
import TablePagination from '@mui/material/TablePagination';
|
import TablePagination from '@mui/material/TablePagination';
|
||||||
import TableRow from '@mui/material/TableRow';
|
import TableRow from '@mui/material/TableRow';
|
||||||
import { Accordion, AccordionSummary, AccordionDetails, Typography, Box, TextField, CircularProgress, Tooltip } from '@mui/material';
|
import { Accordion, AccordionSummary, AccordionDetails, Typography, Box, TextField, Tooltip } from '@mui/material';
|
||||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||||
import SearchIcon from '@mui/icons-material/Search';
|
import SearchIcon from '@mui/icons-material/Search';
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, Button, IconButton, Stack, Typography } from "@mui/material";
|
import { Box, Button, Typography } from "@mui/material";
|
||||||
|
|
||||||
interface ConfirmationBoxProps {
|
interface ConfirmationBoxProps {
|
||||||
selector: string;
|
selector: string;
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import { io, Socket } from "socket.io-client";
|
|||||||
import { stopRecording } from "../api/recording";
|
import { stopRecording } from "../api/recording";
|
||||||
import { RunSettings } from "../components/run/RunSettings";
|
import { RunSettings } from "../components/run/RunSettings";
|
||||||
import { ScheduleSettings } from "../components/robot/ScheduleSettings";
|
import { ScheduleSettings } from "../components/robot/ScheduleSettings";
|
||||||
import { IntegrationSettings } from "../components/integration/IntegrationSettings";
|
|
||||||
import { RobotSettings } from "../components/robot/RobotSettings";
|
|
||||||
import { apiUrl } from "../apiConfig";
|
import { apiUrl } from "../apiConfig";
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { AuthProvider } from '../context/auth';
|
|||||||
import { RecordingPage } from "./RecordingPage";
|
import { RecordingPage } from "./RecordingPage";
|
||||||
import { MainPage } from "./MainPage";
|
import { MainPage } from "./MainPage";
|
||||||
import { useGlobalInfoStore } from "../context/globalInfo";
|
import { useGlobalInfoStore } from "../context/globalInfo";
|
||||||
import { getActiveBrowserId } from "../api/recording";
|
|
||||||
import { AlertSnackbar } from "../components/ui/AlertSnackbar";
|
import { AlertSnackbar } from "../components/ui/AlertSnackbar";
|
||||||
import Login from './Login';
|
import Login from './Login';
|
||||||
import Register from './Register';
|
import Register from './Register';
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Grid } from '@mui/material';
|
|||||||
import { BrowserContent } from "../components/browser/BrowserContent";
|
import { BrowserContent } from "../components/browser/BrowserContent";
|
||||||
import { InterpretationLog } from "../components/run/InterpretationLog";
|
import { InterpretationLog } from "../components/run/InterpretationLog";
|
||||||
import { startRecording, getActiveBrowserId } from "../api/recording";
|
import { startRecording, getActiveBrowserId } from "../api/recording";
|
||||||
import { LeftSidePanel } from "../components/recorder/LeftSidePanel";
|
|
||||||
import { RightSidePanel } from "../components/recorder/RightSidePanel";
|
import { RightSidePanel } from "../components/recorder/RightSidePanel";
|
||||||
import { Loader } from "../components/ui/Loader";
|
import { Loader } from "../components/ui/Loader";
|
||||||
import { useSocketStore } from "../context/socket";
|
import { useSocketStore } from "../context/socket";
|
||||||
|
|||||||
Reference in New Issue
Block a user