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(og-gen): Adds package and vite plugin for dynamic og generation #10439

Merged
merged 14 commits into from
Apr 12, 2024

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Apr 11, 2024

For #10440

This PR creates a new package @redwoodjs/ogimage-gen - that we'll use to house the dynamic OG image generator using middleware.

The PR is broken down into a smaller chunk, and includes the package setup, and the vite plugin we will need for the middleware to work!

Related/Oustanding:

Naming 🐥
I'm not tied to the name of the package, and happy to take suggestions here please! The package will house middleware, react hooks and this vite plugin

@dac09 dac09 added this to the SSR milestone Apr 11, 2024
@dac09 dac09 added the release:feature This PR introduces a new feature label Apr 11, 2024
const updatedConfig = plugin.config()

// Assert the rollup inputs
expect(updatedConfig.build?.rollupOptions?.input).toEqual({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We'll go through this again @cannikin when we pair, so can change things, but just a headsup here on what the output paths will look like

packages/internal/package.json Outdated Show resolved Hide resolved
… into feat/og-gen-mw-vite-plugin

* 'feat/og-gen-mw-vite-plugin' of github.com:dac09/redwood:
  Update rbac.md - code match (redwoodjs#10405)
  chore: make crwa e2e test work across branches (redwoodjs#10437)
  feat: [Auth] Common AuthProvider & use* changes for middleware auth (redwoodjs#10420)
{
"name": "@redwoodjs/og-gen",
"version": "7.0.0",
"type": "module",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: ESM ONLY! ✌️

@dac09 dac09 marked this pull request as draft April 11, 2024 06:59
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"moduleResolution": "Node16", // uses the exports field in @redwoodjs/vite, @redwoodjs/internal
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See this!

@dac09 dac09 marked this pull request as ready for review April 11, 2024 09:55
@dac09 dac09 requested a review from cannikin April 11, 2024 09:55
Copy link
Member

@cannikin cannikin left a comment

Choose a reason for hiding this comment

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

I haven't created a package in years but I trust you know what you're doing!

… into feat/og-gen-mw-vite-plugin

* 'feat/og-gen-mw-vite-plugin' of github.com:dac09/redwood:
  chore(deps): bump browserify-sign from 4.2.1 to 4.2.3 (redwoodjs#10446)
  chore(deps): bump tar from 6.1.11 to 6.2.1 in /docs (redwoodjs#10438)
  chore(deps): update dependency firebase to v10.11.0 (redwoodjs#10366)
  fix(auth): Handle when authorization header is lowercased (redwoodjs#10442)
@dac09 dac09 enabled auto-merge (squash) April 12, 2024 02:46
@dac09 dac09 added the fixture-ok Override the test project fixture check label Apr 12, 2024
@dac09 dac09 merged commit e17fdd7 into redwoodjs:main Apr 12, 2024
51 of 52 checks passed
@dac09 dac09 deleted the feat/og-gen-mw-vite-plugin branch April 12, 2024 03:05
dac09 added a commit that referenced this pull request Apr 12, 2024
…g-gen-mw-p2

* 'main' of github.com:redwoodjs/redwood:
  feat(og-gen): Adds package and vite plugin for dynamic og generation (#10439)
  chore(deps): bump browserify-sign from 4.2.1 to 4.2.3 (#10446)
  chore(deps): bump tar from 6.1.11 to 6.2.1 in /docs (#10438)
  chore(deps): update dependency firebase to v10.11.0 (#10366)
  fix(auth): Handle when authorization header is lowercased (#10442)
  Update rbac.md - code match (#10405)
  chore: make crwa e2e test work across branches (#10437)
  feat: [Auth] Common AuthProvider & use* changes for middleware auth (#10420)
dac09 added a commit that referenced this pull request Apr 16, 2024
…-dbauth-middleware

* 'main' of github.com:redwoodjs/redwood:
  chore(location): Accept URL-like object (#10467)
  fix(router): Remove barrel exports from router.tsx (#10464)
  chore(dbauth-mw): Refactor web side dbAuth creation (#10460)
  chore(router): Prevent circular dependency for namedRoutes (#10463)
  chore(router): route-validators: Better types and clean up comments (#10462)
  feat(server-auth): dbAuth 3/3 -  handle login, logout, signup, etc. requests if forwarded from middleware (#10457)
  docs(router): Document new NavLink className replacement behavior (#10401)
  chore(refactor): Split the router out into smaller logical units (#10434)
  feat(server-auth): Part 1/3: dbAuth middleware support (web side changes) (#10444)
  chore(auth): Build: Put ESM at the root, and CJS in /cjs (#10458)
  fix(ssr): Successfully serve static assets like `favicon.png` (#10455)
  chore(deps): update chore (#10367)
  (docs) Fix useCache headers and links (#10451)
  chore: remove aws-lambda (#10450)
  chore(deps): update dependency typescript to v5.4.5 (#10452)
  feat(og-gen): Update implementation of useLocation | Update App template (#10441)
  feat(og-gen): Adds package and vite plugin for dynamic og generation (#10439)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixture-ok Override the test project fixture check release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants