diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 79e232a..6109130 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,13 +1,13 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: 'github-actions' + directory: '/' schedule: - interval: "daily" - - package-ecosystem: "npm" - directory: "/" + interval: 'daily' + - package-ecosystem: 'npm' + directory: '/' schedule: - interval: "daily" + interval: 'daily' allow: - - dependency-name: "@scalar/*" + - dependency-name: '@scalar/*' diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 4371445..ac74d35 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -14,7 +14,7 @@ jobs: id: metadata uses: dependabot/fetch-metadata@v1 with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + github-token: '${{ secrets.GITHUB_TOKEN }}' - name: Approve PR if: contains(steps.metadata.outputs.dependency-names, '@scalar') run: gh pr review --approve "$PR_URL" @@ -26,4 +26,4 @@ jobs: run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.prettierrc b/.prettierrc index ad81017..c2c3f61 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,9 +1,13 @@ { + "plugins": ["@trivago/prettier-plugin-sort-imports"], "trailingComma": "all", "quoteProps": "consistent", "tabWidth": 2, "semi": false, "singleQuote": true, "singleAttributePerLine": true, - "bracketSameLine": true + "bracketSameLine": true, + "importOrder": ["^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true } diff --git a/db/schema.ts b/db/schema.ts index cf2e284..b63dca1 100644 --- a/db/schema.ts +++ b/db/schema.ts @@ -1,5 +1,5 @@ -import { text, integer, sqliteTable } from 'drizzle-orm/sqlite-core' import { sql } from 'drizzle-orm' +import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core' export const Specs = sqliteTable('Specs', { id: text('id').primaryKey(), diff --git a/functions/api/share.ts b/functions/api/share.ts index 62dd7fe..05bfa28 100644 --- a/functions/api/share.ts +++ b/functions/api/share.ts @@ -1,7 +1,8 @@ +import { sql } from 'drizzle-orm' import { drizzle } from 'drizzle-orm/d1' +import { customAlphabet, nanoid } from 'nanoid' + import { Specs } from '../../db/schema' -import { nanoid, customAlphabet } from 'nanoid' -import { sql } from 'drizzle-orm' export interface Env { // If you set another name in wrangler.toml as the value for 'binding', diff --git a/functions/api/share/[id].ts b/functions/api/share/[id].ts index b0becba..0ded94d 100644 --- a/functions/api/share/[id].ts +++ b/functions/api/share/[id].ts @@ -1,6 +1,7 @@ +import { sql } from 'drizzle-orm' import { drizzle } from 'drizzle-orm/d1' + import { Specs } from '../../../db/schema' -import { sql } from 'drizzle-orm' export interface Env { // If you set another name in wrangler.toml as the value for 'binding', diff --git a/functions/files/[[id]].ts b/functions/files/[[id]].ts index 0e1c04f..9ec289e 100644 --- a/functions/files/[[id]].ts +++ b/functions/files/[[id]].ts @@ -1,8 +1,9 @@ -import { drizzle } from 'drizzle-orm/d1' -import { Specs } from '../../db/schema' +import { normalize } from '@scalar/openapi-parser' import { sql } from 'drizzle-orm' +import { drizzle } from 'drizzle-orm/d1' import YAML from 'yaml' -import { normalize } from '@scalar/openapi-parser' + +import { Specs } from '../../db/schema' export interface Env { // If you set another name in wrangler.toml as the value for 'binding', diff --git a/index.html b/index.html index b1e2363..af473ce 100644 --- a/index.html +++ b/index.html @@ -2,14 +2,30 @@
- - - + + +