Skip to content

Conversation

@shrunyan
Copy link

@shrunyan shrunyan commented May 17, 2023

Update starter to use extracted package. https://github.com/zesty-io/nextjs-sync

The starter will only be aware of the nextjs-sync package. The nextjs-sync package depends on a few others which have been either extracted or improved. This complete stack of dependencies is required for that starter to operate.

These changes introduce a signficant change in how environment variables are handled. Moving from a custom zesty.config.js file to the standard nextjs .env file.

It also abandons a few unnecessary variables.

  • src_dir is not necessary as nextjs only allows root or src. So instead opt to behave similarly to nextjs and determine which one the user has decided on by inspecting the file system

Additionally a few values are now derived and require no user action to setup.

  • preview url: {HASH}-dev.webengine.zesty.io
  • production url
  • instance zuid

Other variables have been moved from the prior zesty.config.js file into the cli managed .zesty/config.js file. Consolidating where zesty configurations occur.

  • preview password

@shrunyan shrunyan requested review from agalin920 and ardeay May 17, 2023 21:46
Copy link

@agalin920 agalin920 left a comment

Choose a reason for hiding this comment

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

@shrunyan How are we determining whether to hit stage url or prod url? Or are we defaulting to to one?

@shrunyan
Copy link
Author

@shrunyan How are we determining whether to hit stage url or prod url? Or are we defaulting to to one?

The domain selection is a nextjs specific detail and so it is contained within the nextjs-sync lib. https://github.com/zesty-io/nextjs-sync/blob/main/src/fetchPageJson.js#L20

@agalin920
Copy link

@shrunyan Sweet. Thanks

@agalin920 agalin920 self-requested a review June 16, 2023 19:11
@shrunyan
Copy link
Author

shrunyan commented Jun 21, 2023

To solve for a user being able to run sync without being logged in or the presence of the .zesty folder I plan to change the logic to start with the .env file. Which is honestly all it needs. The .zesty folder is a mechanism for the cli and not actually necessary for the starter. So we can ignore that directory in the .gitignore file.

For model ignore I'll add another env var. ZESTY_MODEL_IGNORE_LIST=6-000-0000,6-000-0000,6-000-0000...

The logic changes will be made in https://github.com/zesty-io/nextjs-sync

@ardeay ardeay merged commit 337d88b into main Jun 30, 2023
@ardeay
Copy link

ardeay commented Jun 30, 2023

@shrunyan @agalin920 i merged this to get the latest README in, @shrunyan I'd still like to see changes to zesty config setup

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.

4 participants