Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: decoupled sourcing PoC#561

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ascorbic wants to merge18 commits intomain
base:main
Choose a base branch
Loading
frommk/merlin
Draft

feat: decoupled sourcing PoC#561

ascorbic wants to merge18 commits intomainfrommk/merlin

Conversation

@ascorbic
Copy link
Contributor

@ascorbicascorbic commentedFeb 10, 2023
edited
Loading

Summary

PoC for experimental decoupled sourcing support. Test this by installing@netlify/plugin-gatsby@merlin and then setting the env varsGATSBY_CLOUD_DATALAYER,CONTENT_CLOUD_ID andRESOURCE_AUTH_JWT

Test plan

  1. Visit the Deploy Preview (insert link to specific page) ...

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was
published correctly.

@netlify
Copy link

netlifybot commentedFeb 10, 2023
edited
Loading

Deploy Preview fornetlify-plugin-gatsby-demo ready!

NameLink
🔨 Latest commit71db642
🔍 Latest deploy loghttps://app.netlify.com/sites/netlify-plugin-gatsby-demo/deploys/63f4ed8a55c16a0008a4abe3
😎 Deploy Previewhttps://deploy-preview-561--netlify-plugin-gatsby-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

"prepare":"npm run build"
},
"dependencies": {
"@gatsby-cloud-pkg/merlin-synchronizer":"^0.3.6",
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Adding it as a dep of the pluginshould make it resolvable to builds, but we can do tests with auto-install using feature flags later

Comment on lines 33 to 37
if(
!process.env.GATSBY_CLOUD_DATALAYER||
!process.env.GATSBY_SITE_ID||
!process.env.SITE_AUTH_JWT
){
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

These currently need to be manually set

Choose a reason for hiding this comment

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

instead of SITE_AUTH_JWT, can we make itRESOURCE_AUTH_JWT

Choose a reason for hiding this comment

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

and instead ofGATSBY_SITE_ID lets doCONTENT_CLOUD_ID

ascorbic reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

SITE_AUTH_JWT is formerlin-synchronizer, so we'd need to change that module to allow either

* This file was copied from Gatsby core and modified and will be copied back into node_modules/gatsby when Netlify does a cold-cache build.
* See 'helpers/files.ts'
*/

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This injected file is copied from the Gatsby repo with a few small changes to work on Netlify

returnoriginalSourceNodesApiRunner.sourceNodesApiRunner(args)
}

const{ synchronize}=require(`@gatsby-cloud-pkg/merlin-synchronizer`)
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Wemay need to replace this with a full resolved path to the dependency if resolving from an auto-installed plugin fails

encoding:`string`,
}).init()

constsiteId=process.env.GATSBY_SITE_ID
Copy link

@abhiaiyer91abhiaiyer91Feb 10, 2023
edited
Loading

Choose a reason for hiding this comment

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

this will beCONTENT_CLOUD_ID

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@abhiaiyer91abhiaiyer91abhiaiyer91 left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@ascorbic@abhiaiyer91@DanielSLew@sarahetter

[8]ページ先頭

©2009-2025 Movatter.jp