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