prepare for client/server split

This commit is contained in:
Morten Olsen
2024-12-11 12:32:23 +01:00
parent 02614d216c
commit 99248e98b5
51 changed files with 409 additions and 1500 deletions

2
packages/base/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/node_modules/
/dist/

View File

@@ -0,0 +1,20 @@
{
"name": "@plainidx/base",
"version": "1.0.0",
"type": "module",
"main": "dist/exports.js",
"files": [
"dist"
],
"scripts": {
"build": "tsc --build"
},
"devDependencies": {
"@plainidx/configs": "workspace:*",
"typescript": "^5.7.2"
},
"dependencies": {
"nanoid": "^5.0.9",
"zod": "^3.24.0"
}
}

View File

@@ -0,0 +1,8 @@
export { z } from 'zod';
export {
type Manifest,
type ManifestBackendAction,
type ManifestBackendActions,
type ManifestBackend,
type ManifestFrontend,
} from './manifest/manifest.js';

View File

@@ -0,0 +1,36 @@
import { ZodSchema } from 'zod';
type ManifestBackendAction = {
input: ZodSchema;
output: ZodSchema;
};
type ManifestBackendActions = Record<string, ManifestBackendAction>;
type ManifestBackend = {
main: string;
actions: ManifestBackendActions;
};
type ManifestFrontend = {
main: string;
};
type Manifest = {
id: string;
name: string;
version: string;
description?: string;
icon?: string;
config: ZodSchema;
frontend?: ManifestFrontend;
backend?: ManifestBackend;
};
export {
type Manifest,
type ManifestBackendAction,
type ManifestBackendActions,
type ManifestBackend,
type ManifestFrontend,
};

View File

@@ -0,0 +1,9 @@
{
"extends": "@plainidx/configs/tsconfig.json",
"compilerOptions": {
"outDir": "dist"
},
"include": [
"src"
]
}