Skip to content
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 functions file to lib #37

Merged
merged 7 commits into from
Sep 27, 2023
Merged

Port functions file to lib #37

merged 7 commits into from
Sep 27, 2023

Conversation

brandenrodgers
Copy link
Contributor

@brandenrodgers brandenrodgers commented Sep 1, 2023

Description and Context

Porting the cli-lib functions logic into local dev lib. This is the logic responsible for handling the hs create function command to generate a CMS serverless function.

I made a few changes to the structure of this file:

  • The main util functions in here now throw errors instead of returning anything or logging
  • I added logging hooks into the main createFunction method
  • I'm planning to move the code for the function into cms-sample-assets because that's a better place for it. It'll be easier to maintain the code when it's stored in a repo.

Screenshots

TODO

  • I have not tested this out yet and I'm assuming there will be some bugs.
  • Ask the CMS team if it's alright for me to move the function code into the sample assets repo

Who to Notify

@brandenrodgers brandenrodgers marked this pull request as ready for review September 25, 2023 19:52
Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment, otherwise LGTM

lib/cms/functions.ts Show resolved Hide resolved
Copy link
Contributor

@kemmerle kemmerle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this out with the instructions you left on Slack, @brandenrodgers, and everything is working correctly for me 🚢

@brandenrodgers brandenrodgers merged commit ea64393 into main Sep 27, 2023
1 check passed
@brandenrodgers brandenrodgers deleted the br-top-level-exports-2 branch September 27, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants