-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuation of [PRO-720](https://linear.app/replay/issue/PRO-720); follows up to #562 Moving much of the `replayio` utility-type code into the new `shared` package so that we can use those Node APIs for querying the list of recording and uploading or deleting them. Most of this was rote but I did make a couple of changes worth calling out explicitly: - I changed the value returned by `fetchAuthIdsFromGraphQL` from `{ userId: string | null; workspaceId: string | null }` to `{ id: string; type: "user" | "workspace" }` and updated the callers; this was easier to work with (from a types perspective) - Grafana still gets `userId` _or_ `workspaceId` though, just not both - `Logger` is now eagerly instantiated; the `initialize()` method will accept a name and version and pass them along to the Grafana instance. Logging before initialization (or in Jest tests) will be local-only. - Note that a version parameter is also supported now (so we can associate Grafana logs with specific releases) - Both name and version should probably be imported and passed directly from `package.json` (which is what I am currently doing for Puppeteer and replayio) - Note that I've replaced the previous "replayio" name prefix with whatever the passed package name is - Lots of `debug(...args)` logging has been changed to `logger.debug("...", {...args})` - I've moved `mixpanel` and `launch-darkly` code over to `shared` too, even though (for now) `replayio` is the only thing using this stuff - I also tidied up the `getRecordings` method to not create so many throw-away arrays; (I didn't just do this for performance, but TypeScript was complaining about the return array containing recordings _and_ `undefined` with the previous code structure) ## Next steps - Remove the `test-utils` dependency on `@replayio/replay` (and delete `@replayio/replay`) - Update `test-utils` to be a peer dependency so that it will get inlined as well (to resolve ambiguous logger ownership) - Audit `logger.debug` entries and decide which ones should be `info`, `log`, or even `error` - Address any added `TODO [PRO-720]` comments
- Loading branch information
Showing
175 changed files
with
1,178 additions
and
951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { initLogger, logger } from "@replay-cli/shared/logger"; | ||
import { installLatestRuntimeRelease } from "@replay-cli/shared/runtime/installLatestRuntimeRelease"; | ||
import { name, version } from "../package.json"; | ||
|
||
async function install() { | ||
initLogger("puppeteer"); | ||
export default async function install() { | ||
initLogger(name, version); | ||
try { | ||
await installLatestRuntimeRelease(); | ||
} finally { | ||
await logger.close(); | ||
} | ||
} | ||
|
||
export default install; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.