-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adapt Superflare to work with Wrangler 3 and Remix v2 (vite compiler) #66
Merged
Merged
Changes from 156 commits
Commits
Show all changes
157 commits
Select commit
Hold shift + click to select a range
733a4f4
:arrow_up: Upgrade pnpm/wrangler/better-sqlite3
acusti b8672c9
Remove defunct NO_D1_WARNING env var
acusti 7a4579f
:arrow_up: Upgrade to latest remix v2.x
acusti 88886ee
:arrow_up: Upgrade to latest typescript (v5.x)
acusti 2d834ef
Remove defunct custom pnpm resolutions
acusti 7ca376f
Update remix vite cloudflare-workers dependencies
acusti c94d3c9
Upgrade to latest tailwind + markdoc
acusti 4d2e0e7
Update docs site to work w/ remix v2 + vite (WIP)
acusti 339afff
Update remix-cms example for remix v2 + vite (WIP)
acusti 85172f0
Update remix template for remix v2 + vite (WIP)
acusti b13ba42
Make generateTypesFromSqlite take D1Database db
acusti f832a5b
Fix types via generics + conditional in Button.tsx
acusti a235049
Handle rename LoaderArgs → LoaderFunctionArgs
acusti c6b1217
Handle rename ActionArgs → ActionFunctionArgs
acusti e5b6f65
Make meta functions remix v2 compatible
acusti 9bc6422
Remove deprecated (now default) wrangler CLI flags
acusti 34c6c43
:memo: Update docs site README env var info
acusti 5394636
Regenerate docs site worker types with .dev.vars
acusti 6defafb
Fix types in docs site’s docs.server.ts
acusti c058dc2
Update docs site’s env var names in .env.example
acusti 7ddc464
Adapt docs site’s loaders to new ctx shape
acusti a209b26
Remove redundant wrangler dev script arg
acusti 0f9bcab
Restore TS cloudflare worker’s entry file + name
acusti 586f8a8
Remove defunct cloudflare Env type declarations
acusti 4e4fbdb
Restore focus-visible polyfill
acusti 4f9da67
:memo: Fix a typo in superflare/cli/new.ts
acusti 05cf820
Import + use types from @cloudflare/workers-types
acusti 6fbd8bd
Adapt superflare’s loadContext to getPlatformProxy
acusti ffc5677
Add auth + session to AppLoadContext type
acusti 18738b2
Restore superflare handlers in remix template
acusti 029dd81
:memo: Update docs based on latest APIs
acusti c12ceaa
Fix package.json types location for TS v.4.7+
acusti 56f6eda
Add typecheck run script to packages/*
acusti d0c7ea1
Add missing @cloudflare/workers-types devDep
acusti 983ce3e
:arrow_up: Upgrade @cloudflare/workers-types
acusti 5c9e50d
Restore ambient workers types + original filenames
acusti ada2441
Disambiguate workers Request type (from global)
acusti 3e3564e
Fix superflare build by making redis pkgs external
acusti 1e3dada
:arrow_up: Upgrade latest eslint-plugin-turbo
acusti 0ca86a2
Use createTestDatabase in /d1-types.test.ts
acusti 160950b
Specify latest version for @miniflare/* deps
acusti 0de2d93
Migrate from local /d1js → @miniflare/d1
acusti b6139c1
Add .dev.vars to .gitignore
acusti 41ce1e7
Remove global process type from examples/remix-cms
acusti 9b1d7d3
Use createD1Database util in migrateHandler
acusti 0c66959
Use .dev.vars to define APP_KEY + regen types
acusti 048a2b2
Simplify secure protocol check for session cookie
acusti 03e4cb1
Fix reference to remix build in remix-cms worker
acusti f002442
Replace non-existent Auth import → SuperflareAuth
acusti 00917fb
:arrow_up: Upgrade to latest vite (v5.3.4)
acusti 61df979
:arrow_up: Upgrade latest docs site UI libs
acusti 755dca4
Add ssr.noExternal to fix docs site’s build issues
acusti b800de0
Restore remix-cms DO Channel export to main
acusti 1146c09
:shower: Cleanup unneeded TS config values
acusti c08b78e
Restore queue + scheduled to remix-cms/worker.ts
acusti ff17a9e
Fix naming of docs site’s root route’s index route
acusti 7073a76
Filter out "_cf_KV" table when handling D1 models
acusti 2fcd89a
:shower: Remove need for intermediate foo var
acusti e723ad6
Crane + file cabinet emojis need an extra space
acusti 33fe1fe
Replace better-sqlite3 → @miniflare/d1 in tests
acusti c6652c7
:shower: Remove direct deps on better-sqlite3
acusti 9889492
:shower: Remove unused generate migration option
acusti fe766b9
Add getD1Database(dbName) using getPlatformProxy
acusti 22f47d4
Refactor getD1Database from wrangler → miniflare@3
acusti 6beeeb5
Refactor d1 commands from dbPath → dbName
acusti fd0dbc6
Explicitly exit CLI migrate command
acusti 6f4d861
Update workers compatibility_date to latest
acusti b044a0e
Remove defunct <LiveReload> component
acusti 23100a8
Remove inapplicable dev:superflare command
acusti ddf3cd9
Use vite’s built-in CSS handling in docs site
acusti fbe589c
Use CJS-compatible pluralize import
acusti f7359b2
Use remix vite:dev for superflare dev command
acusti dd270fe
Use superflare dev command for dev run script
acusti 0ffe24a
:arrow_up: Upgrade to latest @clack/prompts
acusti ade2cf4
Remove redundant ellipsis from spinner text
acusti a35e538
Shorten spinner text to avoid text wrap bug
acusti f680ba4
Remove defunct --legacy-peer-deps
acusti bdc3b4c
Tighten up headers whitespace for readability
acusti b5c94d9
Add snapshot publishing
jplhomer 4f96a9b
No compacting
jplhomer 32986c1
Merge branch 'main' into wrangler3
jplhomer b5d5d06
Allow `--repo` to be passed to `superflare new`
jplhomer 66bc307
feat: add support for account selection during `superflare new`
jplhomer fb38d74
Add getLoadContext to @superflare/remix
acusti b9ecf0d
Add superflareDevProxyVitePlugin for convenience
acusti edb0467
Cast-to-any as type incompatibility workaround
acusti 031ab99
Use superflareDevProxyVitePlugin in vite.config
acusti 339d246
Remove duplicate local load-context.ts
acusti 88f44da
:shower: Remove unused variable
acusti 40f027c
Add experimentalJsonConfig for wrangler.json
acusti feae062
Use getLoadContext to instantiate config singleton
acusti 62173ee
Use relative import to work pre-tsconfig
acusti 9de0a9e
Resolve type error by updating config type
acusti 08faf1c
Update types to resolve no implicit any errors
acusti f5874c0
Add script_name for Channel DO binding
acusti 21dbb19
Clarify comments + use implicit return
acusti 260b23f
Differentiate index.types.ts type exports
acusti eb6af05
Replace type DefineConfigResult → DefineConfigReturn
acusti f4d25c7
Fix superflare-remix vite plugin + getLoadContext
acusti 8f10d88
Update vite.configs to not pass superflare.config
acusti 2718c38
Restore ~/ import in superflare.config.ts
acusti 821f402
Use entry.(client|server).tsx from remix example
acusti a766a7e
:package: Update postcss + autoprefixer deps
acusti fb31936
Fix tailwind styles in examples/remix-cms
acusti cf584b6
Fix input width on mobile + add a max width
acusti 864ecfc
Add props.autoComplete to inputs + typeof action
acusti 12c654a
Fix getSessionCookie, consistent superflare import
acusti b6e556d
Move config init to superflareDevProxyVitePlugin
acusti f1b8c17
Ensure type-only superflare import + remove unused
acusti bbd093f
Add commitSession logic to entry.server.tsx
acusti b2f83ae
Use wrangler’s getPlatformProxy in getD1Database
acusti c9f5157
Refactor @superflare/remix types to take Env
acusti 43d9e99
Remove defunct "superflare" import
acusti 4574c3c
Fix import TextareaMarkdown for vite
acusti 224fb0e
Fix types for routes/auth/hooks.ts’ useAdmin
acusti 9373f60
Upgrade isbot + eslint-(config|plugin)-turbo
acusti 86be592
:shower: Remove defunct concurrently deps
acusti 55aa977
:package: Upgrade to latest concurrently
acusti 1ac6ade
Use experimental json config for wrangler deploy
acusti 573179a
:shower: Cleanup unused dependencies
acusti fa224be
Export getLoadContext from @superflare/remix
acusti 6f504e9
Move superflareDevProxyVitePlugin → remix-dev pkg
acusti 5e8b590
Use @superflare/remix-dev in remix-cms + template
acusti 602249d
Update superflare dev to also run wrangler dev
acusti f944a60
Run build serially (superflare/remix depends on superflare)
acusti 2e7b3b6
Remove unused dependency from apps/site/
acusti 82ccdde
Fix tsconfig’s cloudflare.env.d.ts include path
acusti 0149e1f
Move vite dev plugin to @superflare/remix/dev
acusti 10619af
Use @superflare/remix/dev in examples
acusti 1d12080
Use installed wrangler version (not latest) in CLI
acusti b7fe8d5
Use static assets for workers feature
acusti 2f5bebb
Remove defunct DBConfig type
acusti 0fb6b19
Fix d1_databases wrangler config field name
acusti ebdbc99
Add script_name for Channel DO binding in CLI
acusti 994433a
Adopt default remix v2 flat routing convention
acusti 08cf7ff
Add generic types to template useActionData
acusti d2775b9
Drop migrations table for migrate --fresh option
acusti 466113d
Don’t return handleQueue Promise.all
acusti de2029d
Fix request object type in handleFetch
acusti 5ad68eb
Fix type of scheduled event argument
acusti 883c3ba
DO script_name is worker app name (not file name)
acusti 65f75d6
Fix script_name for DO binding in remix-cms example
acusti b4b0bd3
Separate @superflare/remix/dev completely from @superflare/remix
acusti b7ba762
Specify a wrangler version that supports static assets
acusti 6c795d7
Fix superflare dev command + suppress wrangler dev io
acusti 335191e
Add @remix-run/server-runtime, use latest pnpm
acusti 82163e3
Specify minimum remix version for devProxyVite plugin
acusti c7d8831
Fix committing session changes on response in dev
acusti a473b81
Ensure <meta charset> is first thing rendered
acusti 92193d1
Include “.md” ext in default docs filepath
acusti 378b444
Upgrade to latest version of turbo (2.x)
acusti 4cfcc56
:shower: Strip down entry.server.tsx files
acusti 687d7d7
Add lang to all code blocks for prism-react-renderer
acusti 198e9f7
Fix server-runtime imports (should be cloudflare)
acusti 4c69f28
Add better-sqlite3 devDependency in packages/superflare
acusti 57eb78a
Make getPlatformProxy experimentalJsonConfig: true
acusti b02d16e
Add proper migrations to Remix CMS
jplhomer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.13.0 | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
NEXT_PUBLIC_DOCSEARCH_APP_ID=RETR9S9VHS | ||
NEXT_PUBLIC_DOCSEARCH_API_KEY=326c1723a310dfe29004b47608709907 | ||
NEXT_PUBLIC_DOCSEARCH_INDEX_NAME=tailwindui-protocol | ||
DOCSEARCH_APP_ID=RETR9S9VHS | ||
DOCSEARCH_API_KEY=326c1723a310dfe29004b47608709907 | ||
DOCSEARCH_INDEX_NAME=tailwindui-protocol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import { MetaFunction } from "@remix-run/react/dist/routeModules"; | ||
|
||
export { default, loader } from "./index"; | ||
|
||
export const meta: MetaFunction = ({ data }) => ({ | ||
title: data?.title ? `${data.title} - Superflare` : "Superflare", | ||
"twitter:title": data?.title ? `${data.title} - Superflare` : "Superflare", | ||
description: data?.description, | ||
"twitter:description": data?.description, | ||
}); | ||
import { loader as indexLoader } from "./_index"; | ||
|
||
export { default } from "./_index"; | ||
|
||
export const loader = indexLoader; | ||
|
||
export const meta: MetaFunction<typeof loader> = ({ data }) => [ | ||
{ | ||
title: data?.title ? `${data.title} - Superflare` : "Superflare", | ||
}, | ||
{ | ||
"twitter:title": data?.title ? `${data.title} - Superflare` : "Superflare", | ||
}, | ||
{ description: data?.description, "twitter:description": data?.description }, | ||
]; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jplhomer heads up that this line is a change in behavior. in the previous version of this function, if
typeof node === "string"
, the function returned an empty string, which i thought might be a bug, but if it is in fact desired, i will just lump this check in with the conditions in the nextif
statement (on line 93) so that it also returns an empty string.