Migrating a v4 fork
v5 split the flat v4 repository (lib/, api/, mod/, root express.js) into the monorepo. A fork or a host which imports XYZ modules must change:[1]
- Entry point. The server is
apps/xyz/server.js; the rootexpress.jsandapi/api.jsare gone. Every import path changed. The@geolytix/xyz-apppackage exports only./router,./serverand./mod/*, with no default export. Build a custom server fromcreateRouter(); see XYZ API. - File paths.
file:references in workspaces and launch configurations resolve fromXYZ_CWD, which defaults to the repository root. Remove../../prefixes. See Server. - Environment. Varlock replaces
dotenv. A plainnode apps/xyz/server.jsreads no.envfile; usepnpm devorvarlock run. See the Varlock README. - Cookies.
COOKIE_PROPSdefaults toSecure; HttpOnly; SameSite=Strict; Path=${DIR}.[2] A deployment on plain HTTP must set it withoutSecure. - Params. Middleware stores validated params on
req._params. The defaultvalidateRequestAuthcopies them toreq.params, and the built-in endpoint modules copy them again.[3] A custom endpoint behind a custom chain must runObject.assign(req.params, req._params)itself. - composeObj. A host which composes workspace objects passes the user object, not a roles array:
composeObj(obj, user).[4] - keyVerification. The v4
keyVerification()is gone. Provider request signature checks are in apps/auth/providerRequestSignature.js, which no server mounts by default.[5] A deployment relying on signed provider URLs mounts it in its own chain. - Library tests. MAPP and MAPP.UI browser test suites replace the v4
tests/libandtests/browsersuites; see TESTING.md. - MongoDB. The mongodb provider was removed.
Keeping a fork current
utils/sync-fork.js helps sync a fork with the upstream repository. Keep fork-specific code in plugins, workspace templates or a host app built on createRouter(), so upstream merges stay small.