mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 09:01:13 +00:00
pnpm, verify, cleanup
This commit is contained in:
parent
b68151035a
commit
28b6e9c264
45 changed files with 4276 additions and 5133 deletions
|
|
@ -12,6 +12,6 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc --noEmit -p tsconfig.json"
|
||||
"check-types": "tsc --noEmit -p tsconfig.json"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,7 @@
|
|||
"$id": "https://betternas.local/schemas/cloud-profile.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"exportId",
|
||||
"provider",
|
||||
"baseUrl",
|
||||
"path"
|
||||
],
|
||||
"required": ["id", "exportId", "provider", "baseUrl", "path"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
|
|
|
|||
|
|
@ -3,13 +3,7 @@
|
|||
"$id": "https://betternas.local/schemas/control-plane-health.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"service",
|
||||
"status",
|
||||
"timestamp",
|
||||
"uptimeSeconds",
|
||||
"nextcloud"
|
||||
],
|
||||
"required": ["service", "status", "timestamp", "uptimeSeconds", "nextcloud"],
|
||||
"properties": {
|
||||
"service": {
|
||||
"const": "control-plane"
|
||||
|
|
@ -26,11 +20,7 @@
|
|||
"nextcloud": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"configured",
|
||||
"baseUrl",
|
||||
"provider"
|
||||
],
|
||||
"required": ["configured", "baseUrl", "provider"],
|
||||
"properties": {
|
||||
"configured": {
|
||||
"type": "boolean"
|
||||
|
|
@ -45,4 +35,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,7 @@
|
|||
"$id": "https://betternas.local/schemas/control-plane-version.schema.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"service",
|
||||
"version",
|
||||
"apiVersion"
|
||||
],
|
||||
"required": ["service", "version", "apiVersion"],
|
||||
"properties": {
|
||||
"service": {
|
||||
"const": "control-plane"
|
||||
|
|
@ -20,4 +16,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"credentialMode": {
|
||||
"enum": [
|
||||
"session-token",
|
||||
"app-password"
|
||||
]
|
||||
"enum": ["session-token", "app-password"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,26 +27,16 @@
|
|||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"online",
|
||||
"offline",
|
||||
"degraded"
|
||||
]
|
||||
"enum": ["online", "offline", "degraded"]
|
||||
},
|
||||
"lastSeenAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"directAddress": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"relayAddress": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@
|
|||
}
|
||||
},
|
||||
"capacityBytes": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
]
|
||||
"type": ["number", "null"]
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
export const CONTROL_PLANE_ROUTES = {
|
||||
health: "/health",
|
||||
version: "/version"
|
||||
version: "/version",
|
||||
} as const;
|
||||
|
||||
export interface NextcloudBackendStatus {
|
||||
|
|
@ -22,4 +22,3 @@ export interface ControlPlaneVersionResponse {
|
|||
version: string;
|
||||
apiVersion: "v1";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ export const FOUNDATION_API_ROUTES = {
|
|||
nodeHeartbeat: "/api/v1/nodes/:nodeId/heartbeat",
|
||||
listExports: "/api/v1/exports",
|
||||
issueMountProfile: "/api/v1/mount-profiles/issue",
|
||||
issueCloudProfile: "/api/v1/cloud-profiles/issue"
|
||||
issueCloudProfile: "/api/v1/cloud-profiles/issue",
|
||||
} as const;
|
||||
|
||||
export type NasNodeStatus = "online" | "offline" | "degraded";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,5 @@
|
|||
"rootDir": "src",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
]
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
# `@betternas/sdk-ts`
|
||||
|
||||
Temporary TypeScript-facing SDK surface for the Next.js app.
|
||||
|
||||
The source of truth remains:
|
||||
|
||||
- [`packages/contracts/openapi`](/home/rathi/Documents/GitHub/betterNAS/packages/contracts/openapi)
|
||||
- [`packages/contracts/src`](/home/rathi/Documents/GitHub/betterNAS/packages/contracts/src)
|
||||
|
||||
Later this package should become generated code from the OpenAPI contracts.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import { config } from "@betternas/eslint-config/base";
|
||||
|
||||
export default config;
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"name": "@betternas/sdk-ts",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"lint": "eslint . --max-warnings 0",
|
||||
"check-types": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@betternas/contracts": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@betternas/eslint-config": "*",
|
||||
"@betternas/typescript-config": "*",
|
||||
"@types/node": "^22.15.3",
|
||||
"eslint": "^9.39.1",
|
||||
"typescript": "5.9.2"
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
export * from "@betternas/contracts";
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "@betternas/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
"check-types": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@betternas/eslint-config": "*",
|
||||
"@betternas/typescript-config": "*",
|
||||
"@betternas/eslint-config": "workspace:*",
|
||||
"@betternas/typescript-config": "workspace:*",
|
||||
"@types/node": "^22.15.3",
|
||||
"@types/react": "19.2.2",
|
||||
"@types/react-dom": "19.2.2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue