pnpm, verify, cleanup (#6)

This commit is contained in:
Hari 2026-03-31 23:59:52 -04:00 committed by GitHub
parent b68151035a
commit e2f03f47af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 4276 additions and 5133 deletions

View file

@ -12,6 +12,6 @@
],
"scripts": {
"build": "tsc -p tsconfig.json",
"typecheck": "tsc --noEmit -p tsconfig.json"
"check-types": "tsc --noEmit -p tsconfig.json"
}
}

View file

@ -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"

View file

@ -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 @@
}
}
}

View file

@ -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 @@
}
}
}

View file

@ -32,10 +32,7 @@
"type": "boolean"
},
"credentialMode": {
"enum": [
"session-token",
"app-password"
]
"enum": ["session-token", "app-password"]
}
}
}

View file

@ -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"]
}
}
}

View file

@ -32,10 +32,7 @@
}
},
"capacityBytes": {
"type": [
"number",
"null"
]
"type": ["number", "null"]
},
"tags": {
"type": "array",

View file

@ -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";
}

View file

@ -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";

View file

@ -4,8 +4,5 @@
"rootDir": "src",
"outDir": "dist"
},
"include": [
"src/**/*.ts"
]
"include": ["src/**/*.ts"]
}

View file

@ -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.

View file

@ -1,3 +0,0 @@
import { config } from "@betternas/eslint-config/base";
export default config;

View file

@ -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"
}
}

View file

@ -1 +0,0 @@
export * from "@betternas/contracts";

View file

@ -1,8 +0,0 @@
{
"extends": "@betternas/typescript-config/base.json",
"compilerOptions": {
"outDir": "dist"
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist"]
}

View file

@ -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",