-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port logging UI utils back from local-dev-lib #1004
Conversation
@@ -1036,6 +1036,17 @@ en: | |||
linkText: "HubSpot's sample projects" | |||
url: "https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next" | |||
message: "See {{ link }}" | |||
git: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ported some of the git-related logging utils back into here, so I had to also add the lang keys for them
@@ -0,0 +1,103 @@ | |||
const moment = require('moment'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This serverless logging functionality is duplicated in here and in the serverless-dev-runtime package. It's a little gross, but ideally we can deprecate that package soon in favor of the developer projects version of local dev for serverless functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One very minor comment, otherwise this looks good to me!
@@ -9,15 +9,12 @@ const { | |||
} = require('../../lib/commonOpts'); | |||
const { trackCommandUsage } = require('../../lib/usageTracking'); | |||
const { logger } = require('@hubspot/local-dev-lib/logger'); | |||
// const { outputLogs } = require('@hubspot/cli-lib/lib/logs'); | |||
// const { outputLogs } = require('../lib/ui/serverlessFunctionLogs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this comment? If so, looks like the import path is wrong - needs another ../
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could delete all of them. I think they were kept around because we plan to bring the functionality back sometime soon hopefully.
@@ -17,7 +17,6 @@ | |||
"test": "echo \"Error: run tests from root\" && exit 1" | |||
}, | |||
"dependencies": { | |||
"@hubspot/cli-lib": "^9.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just beautiful
Description and Context
Relies on: HubSpot/hubspot-local-dev-lib#108
Porting all of the deleted logging UI utils from local-dev-lib into the CLI. The idea is to keep the UI utils here in the CLI, which is effectively the UI of our local dev tooling. I reorganized things in the
lib/
folder because the file structure in that folder is so flat that it's tough to find things in there. Now we havelib/ui/
which can be a place for all of our UI utils. We're planning to eventually expand on the ui utils at some point this year so this sets us up for that.I mentioned it in the LDL PR, but there is a little bit of duplicated code in here because of the other two packages that live in this repo. My opinion is that we should work towards breaking those two packages out into their own repos. There isn't a ton of maintenance that goes into supporting them, so it wouldn't be a big lift.
Screenshots
TODO
Who to Notify