chore: add static markdown import

This commit is contained in:
Rohit Rajan
2025-11-20 13:33:10 +05:30
parent 05d2d1b7fe
commit d444756f67
4 changed files with 5 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ import { WorkflowFile } from "maxun-core";
import { googleSheetUpdateTasks, processGoogleSheetUpdates } from "../workflow-management/integrations/gsheet";
import { airtableUpdateTasks, processAirtableUpdates } from "../workflow-management/integrations/airtable";
import { sendWebhook } from "../routes/webhook";
import { convertPageToMarkdown } from '../markdownify/scrape';
chromium.use(stealthPlugin());
@@ -665,7 +666,6 @@ async function executeRun(id: string, userId: string) {
});
try {
const { convertPageToMarkdown } = await import('../markdownify/scrape');
const url = recording.recording_meta.url;
if (!url) {

View File

@@ -20,6 +20,7 @@ import { airtableUpdateTasks, processAirtableUpdates } from './workflow-manageme
import { io as serverIo } from "./server";
import { sendWebhook } from './routes/webhook';
import { BinaryOutputService } from './storage/mino';
import { convertPageToMarkdown } from './markdownify/scrape';
if (!process.env.DB_USER || !process.env.DB_PASSWORD || !process.env.DB_HOST || !process.env.DB_PORT || !process.env.DB_NAME) {
throw new Error('Failed to start pgboss worker: one or more required environment variables are missing.');
@@ -183,7 +184,7 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
try {
// Find the recording
const recording = await Robot.findOne({ where: { 'recording_meta.id': plainRun.robotMetaId }, raw: true });
if (!recording) {
throw new Error(`Recording for run ${data.runId} not found`);
}
@@ -197,7 +198,6 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
});
try {
const { convertPageToMarkdown } = await import('./markdownify/scrape');
const url = recording.recording_meta.url;
if (!url) {

View File

@@ -15,6 +15,7 @@ import { WorkflowFile } from "maxun-core";
import { Page } from "playwright";
import { sendWebhook } from "../../routes/webhook";
import { airtableUpdateTasks, processAirtableUpdates } from "../integrations/airtable";
import { convertPageToMarkdown } from "../../markdownify/scrape";
chromium.use(stealthPlugin());
async function createWorkflowAndStoreMetadata(id: string, userId: string) {
@@ -231,7 +232,6 @@ async function executeRun(id: string, userId: string) {
}
try {
const { convertPageToMarkdown } = await import('../../markdownify/scrape');
const url = recording.recording_meta.url;
if (!url) {