mcp-scraper 0.88.2 → 0.89.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/CHANGELOG.md +41 -2
- package/README.md +6 -3
- package/dist/analytics-repository-J25XR5E7.js +1 -0
- package/dist/bin/api-server.js +2 -41
- package/dist/bin/mcp-scraper-cli.js +39 -756
- package/dist/bin/mcp-scraper-core.js +1 -60
- package/dist/bin/mcp-scraper-install.js +2 -25
- package/dist/bin/mcp-stdio-server.js +1 -19
- package/dist/bin/paa-harvest.js +1 -41
- package/dist/chunk-3GP5CYZX.js +1 -0
- package/dist/chunk-4FROKQJN.js +1 -0
- package/dist/chunk-57AHYL2O.js +20 -0
- package/dist/chunk-5H3MCTTP.js +1 -0
- package/dist/chunk-63T4W2LX.js +1271 -0
- package/dist/chunk-645LQBE7.js +2595 -0
- package/dist/chunk-6QO4F2KC.js +21710 -0
- package/dist/chunk-CCYWSJNG.js +16 -0
- package/dist/chunk-D6IQJP64.js +84 -0
- package/dist/chunk-DGBLGFNJ.js +182 -0
- package/dist/chunk-FFPD2DOF.js +59 -0
- package/dist/chunk-FXEWHK54.js +1 -0
- package/dist/chunk-HE45FFBU.js +1 -0
- package/dist/chunk-HUV2WTRW.js +1 -0
- package/dist/chunk-IJ2AO7AO.js +102 -0
- package/dist/chunk-KJQXUZ4Y.js +4 -0
- package/dist/chunk-MEM4D2QN.js +1280 -0
- package/dist/chunk-MZN4U5BL.js +1 -0
- package/dist/chunk-PRWZNHQB.js +1 -0
- package/dist/chunk-QPWPR5XG.js +10 -0
- package/dist/chunk-RYNHNEF3.js +73 -0
- package/dist/chunk-TMB56NCA.js +1 -0
- package/dist/chunk-W2BVJ7S2.js +13 -0
- package/dist/chunk-WO3N5FH2.js +5 -0
- package/dist/chunk-XLWNEVUZ.js +27 -0
- package/dist/chunk-YQZGZBB4.js +1 -0
- package/dist/chunk-YUPLOOTB.js +4 -0
- package/dist/chunk-ZHORX44A.js +100 -0
- package/dist/db-JJWJLAVQ.js +1 -0
- package/dist/extract-bundle-TTSEGWYF.js +26 -0
- package/dist/gmail-service-34PIJRLK.js +1 -0
- package/dist/index.cjs +21838 -6034
- package/dist/index.js +18 -315
- package/dist/lead-list-enrichment-repository-VJBBMBCG.js +1 -0
- package/dist/location-data-repository-W3LPT6G3.js +1 -0
- package/dist/server-UEY5YQL6.js +7329 -0
- package/dist/site-extract-repository-7W5ZUNPR.js +1 -0
- package/dist/worker-ZOTOKG56.js +1 -0
- package/package.json +11 -4
- package/dist/analytics-repository-GGJJCVVP.js +0 -194
- package/dist/chunk-4QMUF6XM.js +0 -1013
- package/dist/chunk-6HAV7LCE.js +0 -265
- package/dist/chunk-ABF2CGOZ.js +0 -113
- package/dist/chunk-C5Z4OFKW.js +0 -404
- package/dist/chunk-DNM65UCK.js +0 -299
- package/dist/chunk-EQGTEHLZ.js +0 -592
- package/dist/chunk-F5GQJWZU.js +0 -732
- package/dist/chunk-GGZEC22A.js +0 -215
- package/dist/chunk-GXBZXWXB.js +0 -184
- package/dist/chunk-IHXAXYIS.js +0 -843
- package/dist/chunk-K3Z5AQYE.js +0 -683
- package/dist/chunk-K45K75OF.js +0 -6
- package/dist/chunk-LFW2FRPJ.js +0 -224
- package/dist/chunk-MZDNZQWT.js +0 -2078
- package/dist/chunk-NVUKO5NN.js +0 -256
- package/dist/chunk-OM7HVEJ3.js +0 -26
- package/dist/chunk-OPQIGAFB.js +0 -286
- package/dist/chunk-OZJMVCDK.js +0 -16
- package/dist/chunk-P7FWOMU7.js +0 -505
- package/dist/chunk-PGJQDMC2.js +0 -383
- package/dist/chunk-PKZS6SHW.js +0 -33139
- package/dist/chunk-RJ7JVYKU.js +0 -68
- package/dist/chunk-S24LFPL7.js +0 -5262
- package/dist/chunk-T3MZISOF.js +0 -240
- package/dist/chunk-UZPTGUDV.js +0 -1915
- package/dist/chunk-X623GTBV.js +0 -8290
- package/dist/chunk-YXNDOQXN.js +0 -4018
- package/dist/db-Z34LPZNR.js +0 -284
- package/dist/extract-bundle-565SBZCR.js +0 -1003
- package/dist/gmail-service-E6ALS7JG.js +0 -25
- package/dist/lead-list-enrichment-repository-36RPVV6N.js +0 -67
- package/dist/location-data-repository-WPRG62GE.js +0 -34
- package/dist/server-SQZ3A7SY.js +0 -86606
- package/dist/site-extract-repository-VYFZASPU.js +0 -69
- package/dist/worker-LDCAULWL.js +0 -146
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ All notable changes to MCP Scraper are documented here. The format is based on [
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.89.1] - 2026-09-08
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Added an operator-controlled path to isolate OAuth state in a dedicated Turso database with authority epochs, bounded cleanup, verified migration and rollback, and fail-closed maintenance behavior. Existing OAuth issuer, client setup, API-key authentication, and MCP tool contracts remain unchanged.
|
|
12
|
+
- Bounded the root cron by admitting work lazily with explicit concurrency and deadline limits, so timed-out responses no longer eagerly start every maintenance task.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Made authorization-code exchange and refresh-token rotation atomic and safely retryable after an uncertain database response, including deterministic replay of the one committed result under concurrent requests.
|
|
17
|
+
- Accepted standards-compatible HTTPS, loopback, and reverse-domain native redirects while enforcing PKCE syntax, redirect matching, client binding, scope reduction, resource binding, and bounded dynamic registration.
|
|
18
|
+
|
|
19
|
+
### Security
|
|
20
|
+
|
|
21
|
+
- Replaced raw OAuth code and refresh-token storage in the canonical store with keyed digests and short-lived authenticated-encryption replay receipts, added key-retention checks, and kept destructive legacy-row cleanup behind a separate explicit gate.
|
|
22
|
+
|
|
23
|
+
## [0.89.0] - 2026-09-04
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Collect Facebook profile and Page Reel URLs with `facebook_reels_inventory`, including partial results, stopping reasons, and deduplication against previously returned URLs. Anonymous scans return up to 60 URLs; a scan costs 4 credits and is refunded when it adds no new URLs.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Use neutral browser labels in Facebook extraction diagnostics and package the existing local API, library, and CLI with provider-name obfuscation.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Dismiss optional Facebook login dialogs before extracting public videos and Reel inventories, and retry failed acquisition through a backup browser while preserving useful partial results.
|
|
36
|
+
|
|
37
|
+
## [0.88.3] - 2026-09-02
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- Give each `reddit_thread` retrieval a 300-second end-to-end deadline, with two 60-second Kernel attempts and two 60-second managed-browser backup attempts, instead of exhausting the full retry ladder in about 50 seconds. The MCP client now waits long enough to receive the endpoint's structured terminal result.
|
|
42
|
+
|
|
7
43
|
## [0.88.2] - 2026-09-02
|
|
8
44
|
|
|
9
45
|
### Fixed
|
|
@@ -35,7 +71,6 @@ All notable changes to MCP Scraper are documented here. The format is based on [
|
|
|
35
71
|
|
|
36
72
|
- Added optional `pages: 2` support to synchronous and durable PAA harvests, capturing a second organic result page before expanding questions on the untouched first page.
|
|
37
73
|
- Added requested/captured page counts and bounded second-page outcomes to live results, durable recovery, the dashboard, and generated client contracts. A failed optional page-two capture preserves first-page evidence.
|
|
38
|
-
|
|
39
74
|
## [0.86.5] - 2026-09-02
|
|
40
75
|
|
|
41
76
|
### Fixed
|
|
@@ -1737,7 +1772,7 @@ All notable changes to MCP Scraper are documented here. The format is based on [
|
|
|
1737
1772
|
- Write actions remain unavailable until the account owner explicitly enables them.
|
|
1738
1773
|
- Provider-specific connection data is normalized into one agent-facing contract.
|
|
1739
1774
|
|
|
1740
|
-
[Unreleased]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.
|
|
1775
|
+
[Unreleased]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.89.0...HEAD
|
|
1741
1776
|
[0.88.0]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.87.0...v0.88.0
|
|
1742
1777
|
[0.87.0]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.86.5...v0.87.0
|
|
1743
1778
|
[0.86.0]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.85.0...v0.86.0
|
|
@@ -1880,3 +1915,7 @@ All notable changes to MCP Scraper are documented here. The format is based on [
|
|
|
1880
1915
|
[0.21.5]: https://github.com/VilovietaSEO/mcp-scraper/releases/tag/v0.21.5
|
|
1881
1916
|
[0.21.4]: https://github.com/VilovietaSEO/mcp-scraper/releases/tag/v0.21.4
|
|
1882
1917
|
[0.11.0]: https://github.com/VilovietaSEO/mcp-scraper/releases/tag/v0.11.0
|
|
1918
|
+
|
|
1919
|
+
[0.89.0]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.88.3...v0.89.0
|
|
1920
|
+
[Unreleased]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.89.1...HEAD
|
|
1921
|
+
[0.89.1]: https://github.com/VilovietaSEO/mcp-scraper/compare/v0.89.0...v0.89.1
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
MCP Scraper is an MCP server for live web intelligence tools backed by `https://mcpscraper.dev`.
|
|
4
4
|
|
|
5
|
-
The authenticated
|
|
5
|
+
The authenticated Reddit API supports search, result selection, and extraction from current Reddit pages.
|
|
6
6
|
|
|
7
7
|
## Product repository
|
|
8
8
|
|
|
@@ -175,7 +175,7 @@ Build the branded one-click bundle:
|
|
|
175
175
|
npm run build:mcpb
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.
|
|
178
|
+
The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.89.1`, SHA-256 `f7ea38f87f0bb1bd73900f3817b47f923eb98c18428ca1b6f010d95f489aac74`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, API-key configuration field, and manually curated current-release message from the bundle manifest.
|
|
179
179
|
|
|
180
180
|
The MCPB install exposes every tool — web-intelligence plus all `browser_*` tools — through the one `mcp-scraper` server.
|
|
181
181
|
|
|
@@ -259,6 +259,7 @@ Check `pagination.requestedPages`, `pagination.capturedPages`, and `pagination.p
|
|
|
259
259
|
- `archive_read` — list files in a bounded public ZIP, read one selected UTF-8 text file in byte windows, or preserve the complete selected file in the tenant Library vault. Use it with the `bundleUrl` returned by `check_site_export`.
|
|
260
260
|
- `youtube_harvest`
|
|
261
261
|
- `youtube_transcribe`
|
|
262
|
+
- `facebook_reels_inventory` — collect up to the requested number of public Reel URLs from a Facebook profile or Page, then pass selected URLs to `facebook_video_transcribe`. Anonymous scans return at most 60 URLs; access walls and time limits can return fewer. Partial results include a stopping reason and can be retained with `resumeUrls`. A scan costs 4 credits and is refunded when it adds no new URLs.
|
|
262
263
|
- `facebook_ad_search`
|
|
263
264
|
- `facebook_page_intel`
|
|
264
265
|
- `facebook_ad_transcribe` — transcribe a direct Facebook ad video URL returned by `facebook_page_intel`.
|
|
@@ -350,7 +351,7 @@ The `mcp-scraper` server (and the MCPB bundle, which runs it) exposes both secti
|
|
|
350
351
|
|
|
351
352
|
All MCP tools return `structuredContent` with the IDs, URLs, CSV paths, transcripts, browser session handles, replay paths, artifacts, recipe fields, or blueprint fields needed by the next step, plus readable text content for compatibility. Runtime `tools/list` omits output schemas so strict clients can register the complete catalog; the generated developer manifest retains every canonical output schema for validation and typed SDK generation. All tools carry MCP annotations; file-writing tools such as replay downloads and annotations state their filesystem side effects.
|
|
352
353
|
|
|
353
|
-
The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`. The unified server exposes
|
|
354
|
+
The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`. The unified server exposes 376 tools: 250 scraper, browser, workflow, billing, connected-service, and personal-assistant tools plus 126 durable-memory tools. The two retired customer credential mutations are no longer advertised. The scraper-side inventory includes complete Gmail selection, message, attachment, export, bulk-action, and Memory-import workflows; governed personal-assistant commands, messaging, approvals, grants, number setup, and execution readback; durable PAA starts and status; rendered site-content similarity; governed Local Sourcebook and Transparent Commons workflows; direct site-export reads; Editorial Reading Room and News Publisher templates; and production X-Ray setup, analytics, seven-model attribution, structured post-purchase surveys, reported impact, truthful view-evidence status, CRM policy and receipt, campaign, export, and scheduled-report tools. Provider setup remains absent until its authorization, ingestion, reconciliation, privacy, canary, cleanup, and deployment receipts are complete. Successful evidence-compiled Local Sourcebook revisions publish automatically to their canonical `localsourcebook.com` category profile and review URLs; administrator controls handle exceptional rejection or unpublishing. Release verification compares the exact local and hosted tool-name sets, not only the count.
|
|
354
355
|
|
|
355
356
|
For contract parity, stdio and MCPB memory calls invoke the matching public tool on the hosted MCP Scraper `/mcp` endpoint. The hosted aggregate runtime owns MCP Scraper-specific billing, scheduling, credential, and in-process cutover policy; its internal `/memory/mcp-call` bridge is a fallback to the standalone Memory service, not a second customer setup path. Existing direct Memory credentials remain compatible for one release, but all new customer setup uses the root endpoint and `MCP_SCRAPER_API_KEY`.
|
|
356
357
|
|
|
@@ -368,6 +369,8 @@ The `mcp-scraper` NPX stdio server also exposes saved reports as MCP resources:
|
|
|
368
369
|
- `BROWSER_AGENT_PROFILE_NAME` is optional and sets the default saved hosted browser profile for `mcp-scraper` stdio sessions. Aliases: `BROWSER_SERVICE_PROFILE_NAME`, `KERNEL_BROWSER_PROFILE_NAME`, `KERNEL_PROFILE_NAME`.
|
|
369
370
|
- `BROWSER_AGENT_PROFILE_SAVE_CHANGES=true` is optional hosted setup behavior. It persists cookies and storage back to the named profile when `browser_close` deletes the hosted browser session. Aliases: `BROWSER_SERVICE_PROFILE_SAVE_CHANGES`, `KERNEL_BROWSER_PROFILE_SAVE_CHANGES`, `KERNEL_PROFILE_SAVE_CHANGES`.
|
|
370
371
|
|
|
372
|
+
Hosted operators can isolate authorization state in a dedicated Turso/libSQL database without changing the public MCP tool catalog or API-key authentication. The secured store uses atomic authorization-code exchange and refresh rotation, keyed secret lookup, bounded encrypted replay receipts, authority epochs, and fail-closed maintenance behavior. Production migration and rollback are controlled data moves, not ordinary mode flips; see [MCP OAuth operations](docs/operations/mcp-oauth-runbook.md). Existing client setup and reconnect behavior are unchanged in Phase 1.
|
|
373
|
+
|
|
371
374
|
Every web intelligence tool call made through `mcp-scraper` saves a full Markdown report to disk by default and returns the file path in the MCP response. The hosted `/mcp` endpoint returns reports inline only and never writes files. Browser replay downloads are saved by `browser_replay_download` under `MCP_SCRAPER_OUTPUT_DIR/browser-replays`. AI fan-out captures are always returned inline; only installed stdio/MCPB clients write optional `export=true` files under `MCP_SCRAPER_OUTPUT_DIR/fanout`, returning relative paths. Hosted clients always receive `exports: null`.
|
|
372
375
|
|
|
373
376
|
## Updating Existing Installs
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as L,$a as La,A as k,Aa as ka,B as l,Ba as la,C as m,Ca as ma,D as n,Da as na,E as o,Ea as oa,F as p,Fa as pa,G as q,Ga as qa,H as r,Ha as ra,I as s,Ia as sa,J as t,Ja as ta,K as u,Ka as ua,L as v,La as va,M as w,Ma as wa,N as x,Na as xa,O as y,Oa as ya,P as z,Pa as za,Q as A,Qa as Aa,R as B,Ra as Ba,S as C,Sa as Ca,T as D,Ta as Da,U as E,Ua as Ea,V as F,Va as Fa,W as G,Wa as Ga,X as H,Xa as Ha,Y as I,Ya as Ia,Z as J,Za as Ja,_ as K,_a as Ka,aa as M,ab as Ma,ba as N,bb as Na,ca as O,da as P,ea as Q,fa as R,ga as S,ha as T,ia as U,ja as V,ka as W,la as X,ma as Y,na as Z,oa as _,pa as $,q as a,qa as aa,r as b,ra as ba,s as c,sa as ca,t as d,ta as da,u as e,ua as ea,v as f,va as fa,w as g,wa as ga,x as h,xa as ha,y as i,ya as ia,z as j,za as ja}from"./chunk-645LQBE7.js";import"./chunk-D6IQJP64.js";import"./chunk-63T4W2LX.js";export{P as ANALYTICS_CONTENT_SORTS,a as AnalyticsRepositoryError,B as ENGAGED_SESSION_MS,A as MAX_ENGAGED_MS,N as analyticsAcquisition,l as analyticsBusinessMetrics,O as analyticsChannelBreakdown,R as analyticsContent,T as analyticsConversions,Ma as analyticsCsvCell,V as analyticsDimensions,S as analyticsEventCounts,m as analyticsForecast,Ja as analyticsHealth,x as analyticsIdentityPromotionAllowed,w as analyticsIdentityResolutionAllowed,L as analyticsOverview,U as analyticsPaths,M as analyticsTimeseries,H as appendAnalyticsAuthoritativeOutcomeVersion,ta as archiveAnalyticsActivationDestination,Y as archiveAnalyticsCampaignLink,ga as assignAnalyticsIdentityNode,fa as backfillAnalyticsConfirmedHistory,oa as claimAnalyticsCrmImportRows,Ea as claimAnalyticsFormDeliveryJobs,c as closeAnalyticsPool,pa as completeAnalyticsCrmImportRow,Ga as completeAnalyticsFormBridgeDelivery,Fa as completeAnalyticsFormDelivery,J as consumeAnalyticsSurveyInvite,ra as createAnalyticsActivationDestination,W as createAnalyticsCampaignLink,K as createAnalyticsConversion,ma as createAnalyticsCrmImport,Na as createAnalyticsExport,_ as createAnalyticsForm,o as createAnalyticsPixel,h as createAnalyticsSite,qa as deferAnalyticsCrmImportRow,Ha as deferAnalyticsFormDelivery,n as deleteAnalyticsSite,ea as deterministicAnalyticsCrmEntityId,ja as enrichAnalyticsExistingCrmIdentity,ua as getAnalyticsActivationDestinationConnectionRef,la as getAnalyticsPersonJourney,b as getAnalyticsPool,aa as getPublicAnalyticsForm,da as identityHmac,F as ingestAnalyticsEvents,G as insertAnalyticsRevenueSetupRevision,Ia as isAnalyticsFormPlacementApproved,ia as linkAnalyticsFormIdentity,ha as linkAnalyticsIdentityInTransaction,sa as listAnalyticsActivationDestinations,xa as listAnalyticsActivationReceipts,X as listAnalyticsCampaignLinks,na as listAnalyticsCrmImports,$ as listAnalyticsForms,t as listAnalyticsHostGroups,ka as listAnalyticsPeople,p as listAnalyticsPixels,i as listAnalyticsSites,d as migrateAnalytics,C as normalizeAnalyticsPath,D as normalizeAnalyticsUrl,Q as normalizeContentOptions,e as normalizeObservedHostname,za as pollAnalyticsActivationDiagnostics,u as prepareAnalyticsLinkerIssue,I as projectAnalyticsAuthoritativeConversion,y as projectAnalyticsPixelEventConsent,Aa as queueAnalyticsActivation,Ca as queueAnalyticsFormBridgeTransaction,Ba as queueAnalyticsFormDelivery,ba as recordAnalyticsFormSubmission,v as redeemAnalyticsLinkerRecord,Ka as refreshAnalyticsDailyRollups,La as refreshAnalyticsDailyRollupsIfDue,f as requireAnalyticsAccess,g as requireAnalyticsEditor,Z as resolveAnalyticsCampaignLink,z as resolveAnalyticsConfirmedActivationIdentity,ya as retryAnalyticsActivationJob,E as sanitizeAnalyticsProperties,ca as sanitizeClickIds,va as setAnalyticsActivationReadiness,r as setAnalyticsPixelDomainState,Da as sweepAnalyticsRestrictedRetention,wa as testAnalyticsActivationDestination,j as updateAnalyticsBusinessModel,q as updateAnalyticsPixel,k as upsertAnalyticsAdSpend,s as upsertAnalyticsHostGroup};
|
package/dist/bin/api-server.js
CHANGED
|
@@ -1,42 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { readFileSync } from "fs";
|
|
5
|
-
function loadDotEnv() {
|
|
6
|
-
try {
|
|
7
|
-
for (const line of readFileSync(".env", "utf8").split("\n")) {
|
|
8
|
-
const eq = line.indexOf("=");
|
|
9
|
-
if (eq < 1 || line.trimStart().startsWith("#")) continue;
|
|
10
|
-
const k = line.slice(0, eq).trim();
|
|
11
|
-
if (!process.env[k]) process.env[k] = line.slice(eq + 1).trim();
|
|
12
|
-
}
|
|
13
|
-
} catch {
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
loadDotEnv();
|
|
17
|
-
async function main() {
|
|
18
|
-
const [{ serve }, { app, personalAssistantProductionStartup }, { startWorker }, { migrate }] = await Promise.all([
|
|
19
|
-
import("@hono/node-server"),
|
|
20
|
-
import("../server-SQZ3A7SY.js"),
|
|
21
|
-
import("../worker-LDCAULWL.js"),
|
|
22
|
-
import("../db-Z34LPZNR.js")
|
|
23
|
-
]);
|
|
24
|
-
const PORT = parseInt(process.env.PORT ?? "3001");
|
|
25
|
-
try {
|
|
26
|
-
await personalAssistantProductionStartup;
|
|
27
|
-
await migrate();
|
|
28
|
-
if (process.env.ANALYTICS_DATABASE_URL) {
|
|
29
|
-
const { migrateAnalytics } = await import("../analytics-repository-GGJJCVVP.js");
|
|
30
|
-
await migrateAnalytics();
|
|
31
|
-
}
|
|
32
|
-
startWorker();
|
|
33
|
-
serve({ fetch: app.fetch, port: PORT }, (info) => {
|
|
34
|
-
console.log(`[server] http://localhost:${info.port}`);
|
|
35
|
-
console.log(`[server] admin auth: ${process.env.ADMIN_KEY ? "configured" : "not configured"}`);
|
|
36
|
-
});
|
|
37
|
-
} catch (err) {
|
|
38
|
-
console.error("[startup] server preflight failed", err instanceof Error ? err.name : "unknown_error");
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
void main();
|
|
2
|
+
import{readFileSync as a}from"fs";function c(){try{for(let t of a(".env","utf8").split(`
|
|
3
|
+
`)){let o=t.indexOf("=");if(o<1||t.trimStart().startsWith("#"))continue;let e=t.slice(0,o).trim();process.env[e]||(process.env[e]=t.slice(o+1).trim())}}catch{}}c();async function p(){let[{serve:t},{app:o,personalAssistantProductionStartup:e},{startWorker:i},{migrate:n}]=await Promise.all([import("@hono/node-server"),import("../server-UEY5YQL6.js"),import("../worker-ZOTOKG56.js"),import("../db-JJWJLAVQ.js")]),s=parseInt(process.env.PORT??"3001");try{if(await e,await n(),process.env.ANALYTICS_DATABASE_URL){let{migrateAnalytics:r}=await import("../analytics-repository-J25XR5E7.js");await r()}i(),t({fetch:o.fetch,port:s},r=>{console.log(`[server] http://localhost:${r.port}`),console.log(`[server] admin auth: ${process.env.ADMIN_KEY?"configured":"not configured"}`)})}catch(r){console.error("[startup] server preflight failed",r instanceof Error?r.name:"unknown_error"),process.exit(1)}}p();
|