-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
213 additions
and
143 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enforce Unix newlines | ||
* text=auto eol=lf |
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
15 changes: 15 additions & 0 deletions
15
boilerplate/fullstack/remix/app/routes/supertokens.sessioninfo.$.tsx
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { json } from "@remix-run/node"; | ||
import { LoaderFunctionArgs } from "react-router-dom"; | ||
import { getSessionDetails } from "../lib/superTokensHelpers.js"; | ||
|
||
// Loader function for handling GET requests that also adds cache control headers | ||
export async function loader({ request }: LoaderFunctionArgs) { | ||
try { | ||
const res = await getSessionDetails(request); | ||
return { | ||
session: res.session, | ||
}; | ||
} catch (error) { | ||
return json({ error: "Internal server error" }, { status: 500 }); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { isValidPackageManager } from "./types.js"; | ||
import whichPMRuns from "which-pm-runs"; | ||
export function inferredPackageManager() { | ||
const packageManager = whichPMRuns(); | ||
const packageManagerName = packageManager?.name; | ||
if (packageManagerName && isValidPackageManager(packageManagerName)) { | ||
return packageManagerName; | ||
} | ||
return undefined; | ||
} | ||
export function addPackageCommand(packageManager) { | ||
switch (packageManager) { | ||
case "bun": | ||
return "bun add"; | ||
case "yarn": | ||
return "yarn add"; | ||
case "pnpm": | ||
return "pnpm add"; | ||
case "npm": | ||
return "npm i"; | ||
} | ||
} |
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
Oops, something went wrong.