generated from sergiodxa/remix-auth-strategy-template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
16 changed files
with
218 additions
and
35 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,20 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
reviewers: | ||
- "sergiodxa" | ||
assignees: | ||
- "sergiodxa" | ||
|
||
- package-ecosystem: npm | ||
directory: / | ||
schedule: | ||
interval: "weekly" | ||
reviewers: | ||
- "sergiodxa" | ||
assignees: | ||
- "sergiodxa" |
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,14 +1,20 @@ | ||
changelog: | ||
categories: | ||
- title: Documentation Changes | ||
labels: | ||
- documentation | ||
- title: New Features | ||
labels: | ||
- enhancement | ||
- title: Documentation Changes | ||
labels: | ||
- documentation | ||
- title: Bug Fixes | ||
labels: | ||
- bug | ||
- title: Example | ||
labels: | ||
- example | ||
- title: Deprecations | ||
labels: | ||
- deprecated | ||
- title: Other Changes | ||
labels: | ||
- "*" | ||
- "*" |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Semver type of new version (major / minor / patch)" | ||
description: "Type of version to bump" | ||
required: true | ||
type: choice | ||
options: | ||
|
@@ -22,7 +22,7 @@ jobs: | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
|
||
- uses: oven-sh/setup-bun@v1 | ||
- run: bun install | ||
- run: bun install --frozen-lockfile | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
|
@@ -33,4 +33,5 @@ jobs: | |
git config user.email '[email protected]' | ||
- run: npm version ${{ github.event.inputs.version }} | ||
- run: bun run quality:fix | ||
- run: git push origin main --follow-tags |
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,24 @@ | ||
name: Enable auto-merge for Dependabot PRs | ||
|
||
on: | ||
pull_request: | ||
types: opened | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- id: metadata | ||
uses: dependabot/fetch-metadata@v2 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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,33 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "docs" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
- run: bun install --frozen-lockfile | ||
- run: bunx typedoc | ||
- uses: actions/configure-pages@v5 | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "./docs" | ||
- uses: actions/deploy-pages@v4 | ||
id: deployment |
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,6 +1,4 @@ | ||
/node_modules | ||
/build | ||
/coverage | ||
|
||
*.log | ||
.DS_Store | ||
/docs | ||
/node_modules |
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 @@ | ||
lts/* |
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,31 +1,52 @@ | ||
{ | ||
"name": "remix-auth-form", | ||
"version": "1.5.0", | ||
"main": "./build/index.js", | ||
"types": "./build/index.d.ts", | ||
"type": "commonjs", | ||
"description": "A Remix Auth strategy to work with any form", | ||
"license": "MIT", | ||
"funding": ["https://github.com/sponsors/sergiodxa"], | ||
"author": { | ||
"name": "Sergio Xalambrí", | ||
"email": "[email protected]", | ||
"url": "https://sergiodxa.com" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/sergiodxa/remix-auth-form" | ||
}, | ||
"homepage": "https://sergiodxa.github.io/remix-auth-form", | ||
"bugs": { | ||
"url": "https://github.com/sergiodxa/remix-auth-form/issues" | ||
}, | ||
"scripts": { | ||
"prepare": "bun run build", | ||
"build": "tsc --project tsconfig.json", | ||
"typecheck": "tsc --project tsconfig.json --noEmit", | ||
"check": "biome check .", | ||
"lint": "biome lint --apply .", | ||
"format": "biome format --write ." | ||
"build": "tsc", | ||
"typecheck": "tsc --noEmit", | ||
"quality": "biome check .", | ||
"quality:fix": "biome check . --apply-unsafe", | ||
"exports": "bun run ./scripts/exports.ts" | ||
}, | ||
"sideEffects": false, | ||
"type": "module", | ||
"engines": { | ||
"node": ">=20.0.0" | ||
}, | ||
"keywords": ["remix", "remix-auth", "auth", "authentication", "strategy"], | ||
"license": "MIT", | ||
"files": ["build", "package.json", "README.md"], | ||
"exports": { | ||
".": "./build/index.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"peerDependencies": { | ||
"@remix-run/server-runtime": "^1.0.0 || ^2.0.0", | ||
"remix-auth": "^3.6.0" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.7.1", | ||
"@remix-run/node": "2.9.1", | ||
"@remix-run/server-runtime": "2.9.1", | ||
"@types/bun": "^1.1.0", | ||
"remix-auth": "3.6.0", | ||
"typescript": "5.4.5" | ||
"@arethetypeswrong/cli": "^0.15.3", | ||
"@biomejs/biome": "^1.7.2", | ||
"@remix-run/node": "^2.9.2", | ||
"@types/bun": "^1.1.1", | ||
"consola": "^3.2.3", | ||
"remix-auth": "^3.7.0", | ||
"typedoc": "^0.25.13", | ||
"typedoc-plugin-mdn-links": "^3.1.23", | ||
"typescript": "^5.4.5" | ||
} | ||
} |
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,48 @@ | ||
import { file, spawn } from "bun"; | ||
import { consola } from "consola"; | ||
|
||
let proc = spawn([ | ||
"bunx", | ||
"attw", | ||
"-f", | ||
"table-flipped", | ||
"--no-emoji", | ||
"--no-color", | ||
"--pack", | ||
]); | ||
|
||
let text = await new Response(proc.stdout).text(); | ||
|
||
let entrypointLines = text | ||
.slice(text.indexOf('"remix-utils/')) | ||
.split("\n") | ||
.filter(Boolean) | ||
.filter((line) => !line.includes("─")) | ||
.map((line) => | ||
line | ||
.replaceAll(/[^\d "()/A-Za-z│-]/g, "") | ||
.replaceAll("90m│39m", "│") | ||
.replaceAll(/^│/g, "") | ||
.replaceAll(/│$/g, ""), | ||
); | ||
|
||
let pkg = await file("package.json").json(); | ||
let entrypoints = entrypointLines.map((entrypointLine) => { | ||
let [entrypoint, ...resolutionColumns] = entrypointLine.split("│"); | ||
return { | ||
entrypoint: entrypoint.replace(pkg.name, ".").trim(), | ||
esm: resolutionColumns[2].trim(), | ||
bundler: resolutionColumns[3].trim(), | ||
}; | ||
}); | ||
|
||
let entrypointsWithProblems = entrypoints.filter( | ||
(item) => item.esm.includes("fail") || item.bundler.includes("fail"), | ||
); | ||
|
||
if (entrypointsWithProblems.length > 0) { | ||
consola.error("Entrypoints with problems:"); | ||
process.exit(1); | ||
} else { | ||
consola.success("All entrypoints are valid!"); | ||
} |
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,10 @@ | ||
{ | ||
"$schema": "https://typedoc.org/schema.json", | ||
"includeVersion": true, | ||
"entryPoints": ["./src/index.ts"], | ||
"out": "docs", | ||
"json": "docs/index.json", | ||
"cleanOutputDir": true, | ||
"plugin": ["typedoc-plugin-mdn-links"], | ||
"categorizeByGroup": false | ||
} |