Repository: sudomf/remix-vite Branch: main Commit: 4beedae0def2 Files: 92 Total size: 110.9 KB Directory structure: gitextract_mjw2yo5y/ ├── .eslintignore ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yaml │ │ └── feature_request.yaml │ ├── PULL_REQUEST_TEMPLATE/ │ │ └── default.md │ └── workflows/ │ └── publish.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── LICENSE ├── README.md ├── config/ │ └── husky/ │ └── pre-commit ├── examples/ │ ├── complex/ │ │ ├── .dockerignore │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .gitpod.Dockerfile │ │ ├── .gitpod.yml │ │ ├── .npmrc │ │ ├── .prettierignore │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── app/ │ │ │ ├── db.server.ts │ │ │ ├── entry.client.tsx │ │ │ ├── entry.server.tsx │ │ │ ├── models/ │ │ │ │ ├── note.server.ts │ │ │ │ └── user.server.ts │ │ │ ├── root.tsx │ │ │ ├── routes/ │ │ │ │ ├── healthcheck.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── join.tsx │ │ │ │ ├── login.tsx │ │ │ │ ├── logout.tsx │ │ │ │ ├── notes/ │ │ │ │ │ ├── $noteId.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── new.tsx │ │ │ │ └── notes.tsx │ │ │ ├── session.server.ts │ │ │ ├── utils.test.ts │ │ │ └── utils.ts │ │ ├── custom-server.js │ │ ├── cypress/ │ │ │ ├── .eslintrc.js │ │ │ ├── e2e/ │ │ │ │ └── smoke.cy.ts │ │ │ ├── fixtures/ │ │ │ │ └── example.json │ │ │ ├── support/ │ │ │ │ ├── commands.ts │ │ │ │ ├── create-user.ts │ │ │ │ ├── delete-user.ts │ │ │ │ └── e2e.ts │ │ │ └── tsconfig.json │ │ ├── cypress.config.ts │ │ ├── fly.toml │ │ ├── mocks/ │ │ │ ├── README.md │ │ │ └── index.js │ │ ├── package.json │ │ ├── prisma/ │ │ │ ├── migrations/ │ │ │ │ ├── 20220713162558_init/ │ │ │ │ │ └── migration.sql │ │ │ │ └── migration_lock.toml │ │ │ ├── schema.prisma │ │ │ └── seed.ts │ │ ├── remix.config.js │ │ ├── remix.env.d.ts │ │ ├── remix.init/ │ │ │ ├── gitignore │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── start.sh │ │ ├── tailwind.config.js │ │ ├── test/ │ │ │ └── setup-test-env.ts │ │ ├── tsconfig.json │ │ └── vitest.config.ts │ └── simple/ │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── app/ │ │ ├── entry.client.tsx │ │ ├── entry.server.tsx │ │ ├── root.tsx │ │ └── routes/ │ │ └── index.tsx │ ├── package.json │ ├── remix.config.js │ ├── remix.env.d.ts │ └── tsconfig.json ├── package.json ├── src/ │ ├── constants.ts │ ├── entries/ │ │ ├── cli.ts │ │ └── lib.ts │ ├── plugins/ │ │ ├── hmr-fix.ts │ │ ├── inject.ts │ │ ├── remix.ts │ │ └── transform.ts │ ├── utils/ │ │ ├── code.ts │ │ ├── general.ts │ │ └── version.ts │ └── vite.ts ├── tools/ │ └── build.js └── tsconfig.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .eslintignore ================================================ /node_modules/** /declarations /examples/** /cli.js /lib.js /lib.esm.js ================================================ FILE: .gitattributes ================================================ # .gitattributes # Makes sure all line endings are LF. * text=auto eol=lf ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.yaml ================================================ name: Report a bug description: ——— labels: [bug] body: - type: markdown attributes: value: | # Thanks for reporting this bug! Help us replicate and find a fix for the issue by filling in this form. - type: textarea attributes: label: Description description: | Describe the issue and how to replicate it. If possible, please include a minimal example to reproduce the issue. validations: required: true - type: input attributes: label: Library version description: | Output of the `serve --version` command validations: required: true - type: input attributes: label: Node version description: Output of the `node --version` command validations: required: true ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.yaml ================================================ name: Suggest an improvement or new feature description: ——— labels: [enhancement] body: - type: markdown attributes: value: | # Thanks for filing this feature request! Help us understanding this feature and the need for it better by filling in this form. - type: textarea attributes: label: Description description: Describe the feature in detail validations: required: true - type: textarea attributes: label: Why description: Why should we add this feature? What are potential use cases for it? validations: required: true - type: textarea attributes: label: Alternatives description: Describe the alternatives you have considered, or existing workarounds validations: required: true ================================================ FILE: .github/PULL_REQUEST_TEMPLATE/default.md ================================================ ## Related Issues ## Description ### Added ### Changed ### Removed ## Caveats/Problems/Issues ## Checklist - [ ] The issues that this PR fixes/closes have been mentioned above. - [ ] What this PR adds/changes/removes has been explained. - [ ] All tests (`pnpm test`) pass. - [ ] The linter (`pnpm lint`) does not throw an errors. - [ ] All added/modified code has been commented, and methods/classes/constants/types have been annotated with TSDoc comments. ================================================ FILE: .github/workflows/publish.yml ================================================ name: Publish to NPM on: release: types: [created] jobs: build: runs-on: ubuntu-latest steps: - name: Cache id: node-modules uses: actions/cache@v3 with: path: node_modules key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-node-modules- - name: Checkout uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3 with: node-version: '18.x' registry-url: 'https://registry.npmjs.org' - name: Install dependencies and build 🔧 run: yarn && yarn build - name: Publish package on NPM 📦 run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} ================================================ FILE: .gitignore ================================================ # .gitignore # A list of files and folders that should not be tracked by Git. node_modules/ coverage/ build/ .cache/ .idea/ .vscode/ *.log *.tgz *.bak *.tmp cli.js lib.js lib.esm.js declarations ================================================ FILE: .npmrc ================================================ # .npmrc # Configuration for pnpm. # Uses the exact version instead of any within-patch-range version of an # installed package. save-exact=true # Do not error out on missing peer dependencies. strict-peer-dependencies=false ================================================ FILE: .prettierignore ================================================ node_modules/** declarations/** examples/** cli.js lib.js lib.esm.js ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2022 Mayke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # remix-vite
{data.note.body}
No note selected. Select a note on the left, or{" "} create a new note.
); } ================================================ FILE: examples/complex/app/routes/notes/new.tsx ================================================ import type { ActionArgs } from "@remix-run/node"; import { json, redirect } from "@remix-run/node"; import { Form, useActionData } from "@remix-run/react"; import * as React from "react"; import { createNote } from "~/models/note.server"; import { requireUserId } from "~/session.server"; export async function action({ request }: ActionArgs) { const userId = await requireUserId(request); const formData = await request.formData(); const title = formData.get("title"); const body = formData.get("body"); if (typeof title !== "string" || title.length === 0) { return json( { errors: { title: "Title is required", body: null } }, { status: 400 } ); } if (typeof body !== "string" || body.length === 0) { return json( { errors: { title: null, body: "Body is required" } }, { status: 400 } ); } const note = await createNote({ title, body, userId }); return redirect(`/notes/${note.id}`); } export default function NewNotePage() { const actionData = useActionData{user.email}
No notes yet
) : (