feat: scaffold outreach engine monorepo on the novelpad-desktop stack
Workspaces: config (copied), outreach-core (schema + actions/queries + hard gates), outreach-ai (Gemini client + embeddings copies, profiler and mission-fit-judge agent stubs), outreach-worker (DBOS executor with nightly ingest + hourly expiry workflows), outreach-review (RR7 review queue v0). Initial drizzle migration incl. pgvector extension. Stack contract: Yarn 4.5.0 + Turbo, Node 22.16, Drizzle 0.44.6 + pgvector, DBOS 4.17.6, @google/genai on Vertex, gemini-embedding-001 @1536, React Router v7. Files copied from novelpad-desktop carry provenance headers @ 62c56b87. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
32
packages/config/vite-plugins/react-virtualized.js
vendored
Normal file
32
packages/config/vite-plugins/react-virtualized.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import { createRequire } from 'node:module';
|
||||
import path from 'node:path';
|
||||
import url from 'node:url';
|
||||
|
||||
const WRONG_CODE = `import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";`;
|
||||
|
||||
export function reactVirtualized() {
|
||||
return {
|
||||
name: 'flat:react-virtualized',
|
||||
// Note: we cannot use the `transform` hook here
|
||||
// because libraries are pre-bundled in vite directly,
|
||||
// plugins aren't able to hack that step currently.
|
||||
// so instead we manually edit the file in node_modules.
|
||||
// all we need is to find the timing before pre-bundling.
|
||||
configResolved: async () => {
|
||||
const require = createRequire(import.meta.url);
|
||||
const reactVirtualizedPath = require.resolve('react-virtualized');
|
||||
const { pathname: reactVirtualizedFilePath } = new url.URL(
|
||||
reactVirtualizedPath,
|
||||
import.meta.url,
|
||||
);
|
||||
const file = reactVirtualizedFilePath.replace(
|
||||
path.join('dist', 'commonjs', 'index.js'),
|
||||
path.join('dist', 'es', 'WindowScroller', 'utils', 'onScroll.js'),
|
||||
);
|
||||
const code = await fs.readFile(file, 'utf-8');
|
||||
const modified = code.replace(WRONG_CODE, '');
|
||||
await fs.writeFile(file, modified);
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user