experiment: run backend without meteor - #41781
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds vite, @vitejs/plugin-react and vite-plugin-istanbul to the meteor app, aligns the uikit-playground plugin-react version, and declares livechat's existing preact-render-to-string dependency explicitly.
…runtime Reimplements the Meteor client packages the web client depends on (DDP client, minimongo, tracker, accounts/OAuth, EJSON, reactive-dict, reload, etc.) as a plain TypeScript workspace package, typechecked standalone via its own tsconfig. minimongo.ts and mongo.ts are direct ports of untyped prototype-based JS and are ts-nocheck'd for now; the rest of the package passes strict typechecking.
Adds the SPA shell (index.html), the vite-only entry point (src/) wiring @rocket.chat/meteor-client and a client-side typia stub, the vite config with dev-server proxy to any Rocket.Chat server (ROOT_URL), source aliases for workspace packages and the meteor/* namespace, and plugins that inject the meteor runtime config, replace rocketchat.info, and emit an nginx.conf for serving production builds. The vite-only sources are excluded from the Meteor app's tsconfig: they are not part of the Meteor build and rely on bundler-style resolution.
When the client is served from localhost, full URLs must use the local origin so assets and uploads go through the vite proxy instead of hitting the remote Site_Url origin's CORS policy.
The vite dev client is always served from the same localhost origin no matter which server it proxies to, so the public-settings cache (IndexedDB, token-less, survives logout) leaked across workspaces: pointing the proxy at a server with E2E enabled after using one without it kept E2E_Enable=false cached, and the _updatedAt delta sync never repaired it. Expose the proxy target as UPSTREAM_ROOT_URL in the injected runtime config and use it as the PublicCachedStore token, evicting the cache whenever the target server changes. No-op in the Meteor-served client, where the origin already identifies the workspace.
MinimongoCollection is constructed with a null name — no connection, no DDP replication — and immediately replaces the inherited _collection with the Zustand-backed LocalCollection, so extending Mongo.Collection contributes nothing at runtime. Nothing calls the inherited query or mutator API either: Meteor.user/userId are overridden to read the Zustand store and no client code calls Meteor.users.* methods. Making it standalone removes the client's last construction-time dependency on Mongo.Collection.
The internal users collection only ever served findOne-by-id lookups of the logged-in user's own document and the registration of the 'users' DDP store. Replace it with DdpCollectionStore, a Map-backed client store — this client never runs method stubs, so none of minimongo's matcher/originals machinery is needed. Also drop the collection and defaultFieldSelector config options: nothing sets them and projections are no longer supported.
…tore
The login service configuration collection is only read through
configurations.findOne({ service }) by the OAuth provider modules;
a Map-backed DDP store covers that without minimongo.
With Accounts.users and ServiceConfiguration backed by plain DDP stores and MinimongoCollection no longer extending Mongo.Collection, nothing reaches mongo.ts, minimongo.ts, allow-deny.ts or check.ts anymore: no client code creates collections, calls allow/deny, or runs method stubs. Inline oauth.ts's only check() call as a typeof assertion and drop the _preventAutopublish typing that existed solely for the ported Collection constructor. Removes the package's last two ts-nocheck files; everything left passes strict typechecking.
66d2246 to
1d62d9f
Compare
Uh oh!
There was an error while loading. Please reload this page.