mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 19:58:08 +08:00
Merge branch 'main' into nsc/job-priority
This commit is contained in:
commit
e64d3815ea
|
@ -15,8 +15,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
|||
RUN apt-get update -qq && apt-get install -y ca-certificates && update-ca-certificates
|
||||
RUN pnpm install
|
||||
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \
|
||||
SENTRY_AUTH_TOKEN="$(cat /run/secrets/SENTRY_AUTH_TOKEN)" \
|
||||
bash -c "if [ -z $SENTRY_AUTH_TOKEN ]; then pnpm run build:nosentry; else pnpm run build; fi"
|
||||
bash -c 'export SENTRY_AUTH_TOKEN="$(cat /run/secrets/SENTRY_AUTH_TOKEN)"; if [ -z $SENTRY_AUTH_TOKEN ]; then pnpm run build:nosentry; else pnpm run build; fi'
|
||||
|
||||
# Install packages needed for deployment
|
||||
|
||||
|
|
|
@ -267,9 +267,18 @@ export class WebCrawler {
|
|||
public filterURL(href: string, url: string): string | null {
|
||||
let fullUrl = href;
|
||||
if (!href.startsWith("http")) {
|
||||
fullUrl = new URL(href, this.baseUrl).toString();
|
||||
try {
|
||||
fullUrl = new URL(href, this.baseUrl).toString();
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
let urlObj;
|
||||
try {
|
||||
urlObj = new URL(fullUrl);
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
const urlObj = new URL(fullUrl);
|
||||
const path = urlObj.pathname;
|
||||
|
||||
if (this.isInternalLink(fullUrl)) { // INTERNAL LINKS
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
// Import with `import * as Sentry from "@sentry/node"` if you are using ESM
|
||||
import * as Sentry from "@sentry/node";
|
||||
import { nodeProfilingIntegration } from "@sentry/profiling-node";
|
||||
import { Logger } from "../lib/logger";
|
||||
|
||||
if (process.env.SENTRY_DSN) {
|
||||
Logger.info("Setting up Sentry...");
|
||||
Sentry.init({
|
||||
dsn: process.env.SENTRY_DSN,
|
||||
integrations: [
|
||||
nodeProfilingIntegration(),
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
tracesSampleRate: 0.045,
|
||||
profilesSampleRate: 1.0,
|
||||
serverName: process.env.FLY_MACHINE_ID,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,12 +17,7 @@
|
|||
"*": ["node_modules/*", "src/types/*"],
|
||||
},
|
||||
|
||||
"inlineSources": true,
|
||||
|
||||
// Set `sourceRoot` to "/" to strip the build path prefix
|
||||
// from generated source code references.
|
||||
// This improves issue grouping in Sentry.
|
||||
"sourceRoot": "/"
|
||||
"inlineSources": true
|
||||
},
|
||||
"include": ["src/","src/**/*", "services/db/supabase.ts", "utils/utils.ts", "services/db/supabaseEmbeddings.ts", "utils/EventEmmitter.ts", "src/services/queue-service.ts"]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user