Restructuring routerlicious package dependencies for a better consumption model.
#3504
Need to figure out a better way to restructure r11s so that utilities can be consumed in a better way.
I've got a working POC in my fork's repackage-r11s branch. At a directory level, the change hoists Riddler and Alfred source code out of routerlicious/packages/routerlicious/src and up to routerlicious/packages. At a dependency/package level,
- Riddler and Alfred are published as
@fluidframework/server-alfredand@fluidframework/server-riddler, respectively @fluidframework/server-routerliciousdepends on riddler and alfred packages to implement itsalfred/www.tsandriddler/www.tsfiles@fluidframework/server-riddlerdepends on@fluidframework/server-alfredfor the utilsgetParamandgetTenantIdFromRequest
@tanviraumi would you mind giving this a look when you get a chance? My off-the-bat questions are:
- Is this the correct directory level for Riddler and Alfred? Initially I thought I'd put them up by gateway, historian, and admin, but they seem to make more sense staying within
routerlicious? - Should the utils that are currently within Alfred move outside it? They don't seem to fit within
services-utilssince they are only used by Riddler and Alfred
Any feedback on this first iteration would be appreciated 🙂
I was alternatively wondering if, instead of publishing Riddler and Alfred as their own packages, export them within a new package like @fluidframework/server-apis, following suit with @fluidframework/server-lambdas. Then, the current Alfred utils would/could be exported from there as API utils.
I like your suggestion :) Rather than creating two separate packages, we should just create one. Let's call it @fluidframework/server-routerlicious-base. The directory structure will be the same as now.
Let me know when you update it and I will look into the detailed changes. You can also send a draft PR for easy collaboration.
Thanks for the draft PR pointer! I moved Riddler and Alfred into @fluidframework/server-routerlicious-base and consumed that within @fluidframework/server-routerlicious. There are some more specific details in #3592
@tanviraumi, @znewton wondering if there are addition work that needs to be done for this issue?
We should be able to close it now. @znewton ?