@easydocs/dashboard 0.5.0 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 EasyDocs
3
+ Copyright (c) 2025 Ruben González Alonso
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/next.config.ts CHANGED
@@ -3,21 +3,7 @@ import type { NextConfig } from 'next'
3
3
  const config: NextConfig = {
4
4
  transpilePackages: ['@easydocs/core'],
5
5
  serverExternalPackages: ['@libsql/client', 'libsql', 'better-sqlite3'],
6
- webpack(webpackConfig, { isServer }) {
7
- if (isServer) {
8
- const existing = Array.isArray(webpackConfig.externals) ? webpackConfig.externals : []
9
- webpackConfig.externals = [
10
- ...existing,
11
- ({ request }: { request?: string }, callback: (err?: Error | null, result?: string) => void) => {
12
- if (request && /^(libsql|@libsql\/)/.test(request)) {
13
- return callback(null, `commonjs ${request}`)
14
- }
15
- callback()
16
- },
17
- ]
18
- }
19
- return webpackConfig
20
- },
6
+ turbopack: {},
21
7
  }
22
8
 
23
9
  export default config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easydocs/dashboard",
3
- "version": "0.5.0",
3
+ "version": "0.5.4",
4
4
  "description": "EasyDocs docs dashboard — view and export AI-generated OpenAPI specs",
5
5
  "files": [
6
6
  "src",
@@ -15,11 +15,11 @@
15
15
  "@codemirror/theme-one-dark": "^6.1.3",
16
16
  "@uiw/react-codemirror": "^4.25.9",
17
17
  "js-yaml": "^4.1.0",
18
- "next": "15.1.6",
18
+ "next": "16.2.6",
19
19
  "react": "^19.0.0",
20
- "react-dom": "^19.0.0",
20
+ "react-dom": "^19.2.6",
21
21
  "zod": "^3.25.76",
22
- "@easydocs/core": "0.5.0"
22
+ "@easydocs/core": "0.5.4"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/js-yaml": "^4.0.9",
@@ -27,16 +27,21 @@
27
27
  "@types/react": "^19",
28
28
  "@types/react-dom": "^19",
29
29
  "eslint": "^9",
30
- "eslint-config-next": "15.1.6",
30
+ "eslint-config-next": "16.2.6",
31
31
  "postcss": "^8",
32
32
  "tailwindcss": "^3.4.1",
33
33
  "typescript": "^5"
34
34
  },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/RubenGlez/easydocs",
38
+ "directory": ""
39
+ },
35
40
  "scripts": {
36
41
  "dev": "next dev --port 4999",
37
42
  "build": "next build",
38
43
  "start": "next start --port 4999",
39
44
  "typecheck": "tsc --noEmit",
40
- "lint": "next lint"
45
+ "lint": "eslint ."
41
46
  }
42
47
  }
@@ -9,7 +9,7 @@ function ValueNode({ value, depth = 0 }: { value: unknown; depth?: number }) {
9
9
  if (typeof value === 'number')
10
10
  return <span className="text-amber-400">{String(value)}</span>
11
11
  if (typeof value === 'string')
12
- return <span className="text-green-400">"{value}"</span>
12
+ return <span className="text-green-400">&quot;{value}&quot;</span>
13
13
 
14
14
  if (Array.isArray(value)) {
15
15
  if (value.length === 0) return <span className="text-zinc-400">[]</span>
@@ -38,7 +38,7 @@ function ValueNode({ value, depth = 0 }: { value: unknown; depth?: number }) {
38
38
  <div className="ml-4">
39
39
  {entries.map(([k, v], i) => (
40
40
  <div key={k}>
41
- <span className="text-sky-300">"{k}"</span>
41
+ <span className="text-sky-300">&quot;{k}&quot;</span>
42
42
  <span className="text-zinc-400">: </span>
43
43
  <ValueNode value={v} depth={depth + 1} />
44
44
  {i < entries.length - 1 && <span className="text-zinc-600">,</span>}
@@ -1,12 +1,12 @@
1
1
  'use client'
2
2
 
3
- import { useState, useEffect } from 'react'
3
+ import { useState } from 'react'
4
4
  import CodeMirror from '@uiw/react-codemirror'
5
5
  import { json } from '@codemirror/lang-json'
6
6
  import { oneDark } from '@codemirror/theme-one-dark'
7
7
  import type { Endpoint } from '@easydocs/core/schema'
8
- import type { Operation } from '@easydocs/core'
9
- import { OperationSchema } from '@easydocs/core'
8
+ import type { Operation } from '@easydocs/core/spec/schema'
9
+ import { OperationSchema } from '@easydocs/core/spec/schema'
10
10
 
11
11
  interface Props {
12
12
  endpoint: Endpoint
@@ -32,17 +32,12 @@ function validate(raw: string): string | null {
32
32
  export function SpecEditor({ endpoint, onSaved, onCancel }: Props) {
33
33
  const activeSpec = endpoint.isManuallyEdited ? endpoint.manualSpec : endpoint.spec
34
34
  const [value, setValue] = useState(() => JSON.stringify(activeSpec, null, 2))
35
- const [validationError, setValidationError] = useState<string | null>(null)
35
+ const validationError = validate(value)
36
36
  const [saveError, setSaveError] = useState<string | null>(null)
37
37
  const [saving, setSaving] = useState(false)
38
38
 
39
- useEffect(() => {
40
- setValidationError(validate(value))
41
- }, [value])
42
-
43
39
  async function handleSave() {
44
- const err = validate(value)
45
- if (err) { setValidationError(err); return }
40
+ if (validationError) return
46
41
  setSaveError(null)
47
42
  setSaving(true)
48
43
  const parsed = JSON.parse(value) as Operation
package/tsconfig.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2017",
4
- "lib": ["dom", "dom.iterable", "esnext"],
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
5
9
  "allowJs": true,
6
10
  "skipLibCheck": true,
7
11
  "strict": true,
@@ -11,13 +15,27 @@
11
15
  "moduleResolution": "bundler",
12
16
  "resolveJsonModule": true,
13
17
  "isolatedModules": true,
14
- "jsx": "preserve",
18
+ "jsx": "react-jsx",
15
19
  "incremental": true,
16
- "plugins": [{ "name": "next" }],
20
+ "plugins": [
21
+ {
22
+ "name": "next"
23
+ }
24
+ ],
17
25
  "paths": {
18
- "@/*": ["./src/*"]
26
+ "@/*": [
27
+ "./src/*"
28
+ ]
19
29
  }
20
30
  },
21
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
22
- "exclude": ["node_modules"]
31
+ "include": [
32
+ "next-env.d.ts",
33
+ "**/*.ts",
34
+ "**/*.tsx",
35
+ ".next/types/**/*.ts",
36
+ ".next/dev/types/**/*.ts"
37
+ ],
38
+ "exclude": [
39
+ "node_modules"
40
+ ]
23
41
  }