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

feat(cli): add a disclaimer on how the manifest options will behave when published #338

Conversation

demetriusfeijoo
Copy link
Contributor

What?

Improve the printed messages regarding options found in a manifest file and add a disclaimer on what to expect about the behavior of these options when the plugin gets attached to a Field.

Why?

It can be common for users to think that the option values (found in a manifest file) will be shared with a real Field when the plugin gets attached to it, but, it isn't the way it happens.

To avoid sensitive data from getting leaked with other users, all the option values reside accessible only during development time (through the Field Plugin Editor or the Sandbox), and as soon as the field plugin gets attached to a real Field, only the option names are fetched and listed to the user to fulfill.

JIRA: EXT-2170

Creation with no options:
manifest-creation-no-options

Creation with options:
manifest-creation-with-options

Update with no options:
manifest-update-no-options

Update with options:
manifest-update-with-options

Copy link

vercel bot commented Jan 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plugin-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2024 4:30pm

@@ -228,14 +231,10 @@ export const confirmOptionsUpdate = async (
return
}

if (options.length > 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this console.log from here and created a new method (lookForManifestOptions()) for printing the options and the disclaimer because this method here is only called during updating time and I thought would be nice to add the disclaimer also during creation time.

What do you think, @eunjae-lee?

@@ -85,7 +85,10 @@ export const upsertFieldPlugin: UpsertFieldPluginFunc = async (args) => {

const storyblokClient = StoryblokClient({ token, scope })

lookForManifestOptions(manifest?.options)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
lookForManifestOptions(manifest?.options)
printManifestOptions(manifest?.options)

What do you think? It's just printing out information. It's not finding and returning something from something.

Co-authored-by: Eunjae Lee <hey@eunjae.dev>
@demetriusfeijoo
Copy link
Contributor Author

I made the requested adjustments, @eunjae-lee 🙌

Let me know what do you think about them.

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

Let's go!

@demetriusfeijoo demetriusfeijoo merged commit f9f5088 into main Jan 19, 2024
11 checks passed
@demetriusfeijoo demetriusfeijoo deleted the EXT-2170-update-the-cli-to-inform-options-values-wont-be-shared branch January 19, 2024 11:47
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.

2 participants