@tailorkit/app 0.1.0-beta.8 → 1.0.0-beta.44

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.
Files changed (45) hide show
  1. package/LICENSE.md +74 -0
  2. package/README.md +123 -0
  3. package/dist/chunk-7ZQPXG7O.js +34 -0
  4. package/dist/chunk-MYK3WL3S.js +428 -0
  5. package/dist/chunk-QDZXHVTU.js +277 -0
  6. package/dist/chunk-YFKW5FBP.js +623 -0
  7. package/dist/client/connection.d.ts +31 -0
  8. package/dist/client/query-store.d.ts +23 -0
  9. package/dist/client/reference.d.ts +20 -0
  10. package/dist/client/session.d.ts +20 -0
  11. package/dist/client/tools.d.ts +16 -0
  12. package/dist/client-connection.js +16 -0
  13. package/dist/client.d.ts +11 -0
  14. package/dist/client.js +40 -0
  15. package/dist/database/definition.d.ts +8 -0
  16. package/dist/database/schema.d.ts +78 -0
  17. package/dist/database/types.d.ts +8 -0
  18. package/dist/errors.d.ts +6 -0
  19. package/dist/index.d.ts +2 -71
  20. package/dist/index.js +91 -75
  21. package/dist/preact.d.ts +52 -0
  22. package/dist/protocol.d.ts +74 -0
  23. package/dist/protocol.js +39 -0
  24. package/dist/routing.d.ts +35 -0
  25. package/dist/server/builder.d.ts +46 -0
  26. package/dist/server/bundle.d.ts +12 -0
  27. package/dist/server/functions.d.ts +113 -0
  28. package/dist/server/instances.d.ts +17 -0
  29. package/dist/server.d.ts +11 -0
  30. package/dist/server.js +60 -0
  31. package/dist/validation.d.ts +5 -0
  32. package/dist/views.d.ts +126 -0
  33. package/package.json +59 -22
  34. package/LICENSE +0 -674
  35. package/dist/builder/index.d.ts +0 -10
  36. package/dist/builder/upload-manifest.d.ts +0 -13
  37. package/dist/builder.js +0 -224
  38. package/dist/chunk-EKCUETAV.js +0 -26
  39. package/dist/chunk-ZFYKVXDO.js +0 -27
  40. package/dist/config/config.d.ts +0 -20
  41. package/dist/config/index.d.ts +0 -1
  42. package/dist/config/loader.d.ts +0 -7
  43. package/dist/config-loader.js +0 -7
  44. package/dist/config.js +0 -8
  45. package/dist/preact-version.d.ts +0 -7
@@ -0,0 +1,46 @@
1
+ import type { StandardSchemaV1 } from "@standard-schema/spec";
2
+ import type { AnyRelations, EmptyRelations } from "drizzle-orm/relations";
3
+ import * as v from "valibot";
4
+ import type { DatabaseDefinition } from "#database/definition";
5
+ import type { MutationDatabase, QueryDatabase } from "#database/types";
6
+ import type { ActionContext, EmptyFunctions, FunctionKind, Functions, Identity } from "./functions";
7
+ type HandlerContext<K extends FunctionKind, A extends StandardSchemaV1, F extends Functions, D extends AnyRelations> = {
8
+ input: StandardSchemaV1.InferOutput<A>;
9
+ } & (K extends "action" ? ActionContext<F> : {
10
+ db: K extends "query" ? QueryDatabase<D> : MutationDatabase<D>;
11
+ identity: Identity;
12
+ });
13
+ type OutputInput<R> = R extends StandardSchemaV1 ? StandardSchemaV1.InferInput<R> : unknown;
14
+ type HandlerOutput<K, O> = K extends "action" ? O | Promise<O> : O & ([O] extends [never] ? unknown : O extends PromiseLike<unknown> ? never : unknown);
15
+ type BuiltFunction<K extends FunctionKind, A extends StandardSchemaV1, R, O, F extends Functions, D extends AnyRelations> = {
16
+ readonly kind: K;
17
+ readonly args: A;
18
+ readonly database?: DatabaseDefinition<D>;
19
+ readonly handler: (context: Omit<HandlerContext<K, A, F, D>, "input"> & {
20
+ args: StandardSchemaV1.InferOutput<A>;
21
+ }) => HandlerOutput<K, O>;
22
+ } & (R extends StandardSchemaV1 ? {
23
+ readonly result: R;
24
+ } : unknown) & (K extends "action" ? {
25
+ readonly functions: F;
26
+ } : unknown);
27
+ /** Immutable builders preserve the validated input and wire output types at every step. */
28
+ declare class FunctionBuilder<K extends FunctionKind, A extends StandardSchemaV1, R extends StandardSchemaV1 | undefined = undefined, F extends Functions = EmptyFunctions, D extends AnyRelations = EmptyRelations> {
29
+ private readonly kind;
30
+ private readonly args;
31
+ private readonly result;
32
+ private readonly calls;
33
+ private readonly databaseDefinition;
34
+ constructor(kind: K, args: A, result: R, calls: F, database?: DatabaseDefinition<D>);
35
+ input<S extends StandardSchemaV1>(schema: S): FunctionBuilder<K, S, R, F, D>;
36
+ output<S extends StandardSchemaV1>(schema: S): FunctionBuilder<K, A, S, F, D>;
37
+ functions<const G extends Functions>(this: FunctionBuilder<"action", A, R, F, D>, functions: G): FunctionBuilder<"action", A, R, G, D>;
38
+ database<const E extends AnyRelations>(this: FunctionBuilder<K, A, R, F, D> & (K extends "action" ? never : unknown), database: DatabaseDefinition<E>): FunctionBuilder<K, A, R, F, E>;
39
+ handler<O extends OutputInput<R>>(handler: (context: HandlerContext<K, A, F, D>) => HandlerOutput<K, O>): BuiltFunction<K, A, R, O, F, D>;
40
+ }
41
+ export declare const fn: Readonly<{
42
+ action: FunctionBuilder<"action", v.UndefinedSchema<undefined>, undefined, {}, EmptyRelations>;
43
+ mutation: FunctionBuilder<"mutation", v.UndefinedSchema<undefined>, undefined, {}, EmptyRelations>;
44
+ query: FunctionBuilder<"query", v.UndefinedSchema<undefined>, undefined, {}, EmptyRelations>;
45
+ }>;
46
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { AppMigration } from "#protocol";
2
+ import type { AppDefinition } from "./functions";
3
+ /** Interface between an uploaded application module and the server runtime. */
4
+ export interface RuntimeManifest {
5
+ apiVersion: number;
6
+ requires: readonly string[];
7
+ }
8
+ export interface ApplicationModule {
9
+ default: AppDefinition;
10
+ migrations: readonly AppMigration[];
11
+ runtimeManifest: RuntimeManifest;
12
+ }
@@ -0,0 +1,113 @@
1
+ import type { StandardSchemaV1 } from "@standard-schema/spec";
2
+ import type { AnyRelations, EmptyRelations } from "drizzle-orm/relations";
3
+ import type { TailorKitServerTools } from "#client/tools";
4
+ import type { DatabaseDefinition } from "#database/definition";
5
+ import type { QueryDatabase, MutationDatabase } from "#database/types";
6
+ import type { JsonValue } from "#validation";
7
+ export type EmptyFunctions = Record<never, never>;
8
+ export interface Identity {
9
+ readonly subjectId?: string;
10
+ readonly scope: {
11
+ name: string;
12
+ value: Record<string, JsonValue>;
13
+ };
14
+ readonly toolUrl: string;
15
+ readonly projectId: string;
16
+ readonly appId: string;
17
+ readonly installationId: string;
18
+ readonly deploymentId: string;
19
+ readonly expiresAt: number;
20
+ }
21
+ export type FunctionKind = "query" | "mutation" | "action";
22
+ export type FunctionResult<D> = D extends {
23
+ result: infer R extends StandardSchemaV1;
24
+ } ? StandardSchemaV1.InferOutput<R> : D extends {
25
+ handler: (context: never) => infer O;
26
+ } ? Awaited<O> : never;
27
+ export type FunctionCalls<F, K extends "query" | "mutation"> = {
28
+ readonly [N in keyof F as F[N] extends {
29
+ kind: FunctionKind;
30
+ } ? F[N] extends {
31
+ kind: K;
32
+ } ? N : never : N]: F[N] extends {
33
+ args: infer A extends StandardSchemaV1;
34
+ handler: (context: never) => infer _Output;
35
+ } ? K extends "mutation" ? (...args: undefined extends StandardSchemaV1.InferInput<A> ? [
36
+ args?: StandardSchemaV1.InferInput<A>,
37
+ options?: {
38
+ requestId?: string;
39
+ }
40
+ ] : [
41
+ args: StandardSchemaV1.InferInput<A>,
42
+ options?: {
43
+ requestId?: string;
44
+ }
45
+ ]) => Promise<FunctionResult<F[N]>> : (...args: undefined extends StandardSchemaV1.InferInput<A> ? [args?: StandardSchemaV1.InferInput<A>] : [args: StandardSchemaV1.InferInput<A>]) => Promise<FunctionResult<F[N]>> : F[N] extends Functions ? FunctionCalls<F[N], K> : never;
46
+ };
47
+ export interface ActionContext<F extends Functions = EmptyFunctions> {
48
+ readonly identity: Identity;
49
+ readonly tools: TailorKitServerTools;
50
+ readonly requestId: string;
51
+ readonly scope: Identity["scope"];
52
+ readonly signal: AbortSignal;
53
+ readonly queries: FunctionCalls<F, "query">;
54
+ readonly mutations: FunctionCalls<F, "mutation">;
55
+ }
56
+ export interface FunctionDefinition<K extends FunctionKind, A extends StandardSchemaV1, O, F extends Functions = EmptyFunctions, D extends AnyRelations = EmptyRelations> {
57
+ readonly kind: K;
58
+ readonly args: A;
59
+ readonly database?: K extends "action" ? never : DatabaseDefinition<D>;
60
+ readonly result?: StandardSchemaV1<unknown, O>;
61
+ readonly handler: (context: {
62
+ args: StandardSchemaV1.InferOutput<A>;
63
+ } & (K extends "action" ? ActionContext<F> : {
64
+ db: K extends "query" ? QueryDatabase<D> : MutationDatabase<D>;
65
+ identity: Identity;
66
+ })) => K extends "action" ? O | Promise<O> : O;
67
+ }
68
+ export declare const query: <A extends StandardSchemaV1, O, const D extends AnyRelations = EmptyRelations>(definition: Omit<FunctionDefinition<"query", A, O, EmptyFunctions, D>, "kind"> & {
69
+ handler: FunctionDefinition<"query", A, O, EmptyFunctions, D>["handler"] & ([O] extends [never] ? unknown : O extends PromiseLike<unknown> ? never : unknown);
70
+ }) => Readonly<{
71
+ args: A;
72
+ database?: DatabaseDefinition<D> | undefined;
73
+ result?: StandardSchemaV1<unknown, O> | undefined;
74
+ handler: FunctionDefinition<"query", A, O, EmptyFunctions, D>["handler"] & ([O] extends [never] ? unknown : O extends PromiseLike<unknown> ? never : unknown);
75
+ kind: "query";
76
+ }>;
77
+ export declare const mutation: <A extends StandardSchemaV1, O, const D extends AnyRelations = EmptyRelations>(definition: Omit<FunctionDefinition<"mutation", A, O, EmptyFunctions, D>, "kind"> & {
78
+ handler: FunctionDefinition<"mutation", A, O, EmptyFunctions, D>["handler"] & ([O] extends [never] ? unknown : O extends PromiseLike<unknown> ? never : unknown);
79
+ }) => Readonly<{
80
+ args: A;
81
+ database?: DatabaseDefinition<D> | undefined;
82
+ result?: StandardSchemaV1<unknown, O> | undefined;
83
+ handler: FunctionDefinition<"mutation", A, O, EmptyFunctions, D>["handler"] & ([O] extends [never] ? unknown : O extends PromiseLike<unknown> ? never : unknown);
84
+ kind: "mutation";
85
+ }>;
86
+ export declare const action: <A extends StandardSchemaV1, O, const F extends Functions = EmptyFunctions>(definition: Omit<FunctionDefinition<"action", A, O, F>, "kind"> & {
87
+ functions?: F;
88
+ }) => Readonly<{
89
+ args: A;
90
+ database?: undefined;
91
+ result?: StandardSchemaV1<unknown, O> | undefined;
92
+ handler: (context: {
93
+ args: StandardSchemaV1.InferOutput<A>;
94
+ } & ActionContext<F>) => O | Promise<O>;
95
+ functions?: F;
96
+ kind: "action";
97
+ }>;
98
+ export interface RegisteredFunction<TOutput = unknown> {
99
+ kind: FunctionKind;
100
+ args: StandardSchemaV1;
101
+ result?: StandardSchemaV1;
102
+ handler: (context: never) => TOutput;
103
+ functions?: Functions;
104
+ database?: DatabaseDefinition;
105
+ }
106
+ export interface Functions {
107
+ readonly [name: string]: RegisteredFunction | Functions;
108
+ }
109
+ export declare const isFunction: (value: RegisteredFunction | Functions) => value is RegisteredFunction;
110
+ export declare const defineServer: <const F extends Functions>(functions: F) => Readonly<{
111
+ functions: F;
112
+ }>;
113
+ export type AppDefinition = ReturnType<typeof defineServer>;
@@ -0,0 +1,17 @@
1
+ import type { StandardSchemaV1 } from "@standard-schema/spec";
2
+ import type { ViewDataFields } from "#views";
3
+ import type { AppDefinition, Identity } from "./functions";
4
+ interface InstanceResolver<TOutput = unknown> {
5
+ slot: string;
6
+ path: string;
7
+ dataSchema: StandardSchemaV1;
8
+ resolve: (context: {
9
+ context: ViewDataFields;
10
+ identity: Identity;
11
+ signal: AbortSignal;
12
+ queries: unknown;
13
+ }) => TOutput;
14
+ }
15
+ /** Build-generated actions run through the existing authenticated action runtime. */
16
+ export declare const withInstanceResolvers: (app: AppDefinition, resolvers: readonly InstanceResolver[]) => AppDefinition;
17
+ export {};
@@ -0,0 +1,11 @@
1
+ export { defineServer, query, mutation, action } from "./server/functions";
2
+ export { defineDatabase } from "./database/definition";
3
+ export type { DatabaseDefinition } from "./database/definition";
4
+ export { fn } from "./server/builder";
5
+ export { withInstanceResolvers } from "./server/instances";
6
+ export type { QueryDatabase, MutationDatabase } from "./database/types";
7
+ export type { EmptyFunctions, Identity, FunctionDefinition, AppDefinition, ActionContext, FunctionKind, } from "./server/functions";
8
+ export { table, text, integer, real, boolean, eq, ne, gt, gte, lt, lte, and, or, asc, desc, count, isNull, isNotNull, inArray, } from "./database/schema";
9
+ export { AppError } from "./errors";
10
+ export type { ErrorCode } from "./errors";
11
+ export type { ApplicationModule, RuntimeManifest } from "./server/bundle";
package/dist/server.js ADDED
@@ -0,0 +1,60 @@
1
+ import {
2
+ action,
3
+ and,
4
+ asc,
5
+ boolean,
6
+ count,
7
+ defineDatabase,
8
+ defineServer,
9
+ desc,
10
+ eq,
11
+ fn,
12
+ gt,
13
+ gte,
14
+ inArray,
15
+ integer,
16
+ isNotNull,
17
+ isNull,
18
+ lt,
19
+ lte,
20
+ mutation,
21
+ ne,
22
+ or,
23
+ query,
24
+ real,
25
+ table,
26
+ text,
27
+ withInstanceResolvers
28
+ } from "./chunk-QDZXHVTU.js";
29
+ import {
30
+ AppError
31
+ } from "./chunk-7ZQPXG7O.js";
32
+ export {
33
+ AppError,
34
+ action,
35
+ and,
36
+ asc,
37
+ boolean,
38
+ count,
39
+ defineDatabase,
40
+ defineServer,
41
+ desc,
42
+ eq,
43
+ fn,
44
+ gt,
45
+ gte,
46
+ inArray,
47
+ integer,
48
+ isNotNull,
49
+ isNull,
50
+ lt,
51
+ lte,
52
+ mutation,
53
+ ne,
54
+ or,
55
+ query,
56
+ real,
57
+ table,
58
+ text,
59
+ withInstanceResolvers
60
+ };
@@ -0,0 +1,5 @@
1
+ import * as v from "valibot";
2
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
3
+ [key: string]: JsonValue;
4
+ };
5
+ export declare const jsonValueSchema: v.GenericSchema<JsonValue>;
@@ -0,0 +1,126 @@
1
+ import type { StandardSchemaV1 } from "@standard-schema/spec";
2
+ import { h } from "preact";
3
+ import type { ComponentChild, ComponentChildren, VNode } from "preact";
4
+ import type { FunctionCalls, Identity } from "./server/functions";
5
+ export interface TailorKitViews {
6
+ }
7
+ export interface TailorKitSlots {
8
+ }
9
+ export interface TailorKitServerFunctions {
10
+ }
11
+ export type ViewDataFields = Record<string, unknown>;
12
+ export interface ViewInstance<TData = unknown> {
13
+ key: string;
14
+ metadata: ViewDataFields;
15
+ data: TData;
16
+ }
17
+ export interface InstanceResolverContext<TPath extends AppViewPath> {
18
+ context: ViewContext<TPath>;
19
+ identity: Identity;
20
+ signal: AbortSignal;
21
+ queries: FunctionCalls<TailorKitServerFunctions, "query">;
22
+ }
23
+ export interface ViewInstances<TPath extends AppViewPath, TSchema extends StandardSchemaV1> {
24
+ dataSchema: TSchema;
25
+ /** Runs on the app server. Only registered queries are available. */
26
+ resolve: (context: InstanceResolverContext<TPath>) => ViewInstance<StandardSchemaV1.InferInput<TSchema>>[] | Promise<ViewInstance<StandardSchemaV1.InferInput<TSchema>>[]>;
27
+ }
28
+ export type SlotName = keyof TailorKitSlots & string;
29
+ export type ViewPath = Extract<keyof TailorKitViews & string, `/${string}`>;
30
+ export type AppViewPath = ViewPath;
31
+ export type ViewProps<TPath extends ViewPath> = TailorKitViews[TPath] extends object ? TailorKitViews[TPath] : Record<string, never>;
32
+ export type ViewPropsForPath<TPath extends AppViewPath> = TPath extends ViewPath ? ViewProps<TPath> : never;
33
+ export type ViewContext<TPath extends AppViewPath> = ViewPropsForPath<TPath> extends {
34
+ context: infer TContext;
35
+ } ? TContext : Record<string, never>;
36
+ export type View<TProps extends object = Record<string, never>> = (props: TProps) => ComponentChild;
37
+ export type ViewRuntimeProps<TPath extends AppViewPath, TData = unknown> = {
38
+ context: ViewContext<TPath>;
39
+ view: TPath;
40
+ status: "ready";
41
+ instance?: ViewInstance<TData>;
42
+ } | {
43
+ context?: never;
44
+ view: TPath;
45
+ status: "loading";
46
+ instance?: never;
47
+ } | {
48
+ context?: never;
49
+ view: TPath;
50
+ status: "error";
51
+ instance?: never;
52
+ };
53
+ export interface ViewDefinition<TPath extends AppViewPath = AppViewPath, TData = unknown, TSlot extends SlotName = SlotName> {
54
+ component: View<ViewRuntimeProps<TPath>>;
55
+ path: TPath;
56
+ slot: TSlot;
57
+ useContext: () => ViewContext<TPath>;
58
+ /** The selected instance, with data inferred from instances.dataSchema. */
59
+ useInstance: () => ViewInstance<TData>;
60
+ /** Build-only lookup key connecting this view to its extracted server implementation. */
61
+ instances?: {
62
+ resolver: string;
63
+ };
64
+ }
65
+ export type SlotView<TSlot extends SlotName> = TailorKitSlots[TSlot] extends {
66
+ views: infer TViews;
67
+ } ? Extract<TViews, AppViewPath> : never;
68
+ type SlotInstanceDefinition<TSlot extends SlotName> = TailorKitSlots[TSlot] extends {
69
+ multiple: true;
70
+ } ? {
71
+ instances: {
72
+ resolver: string;
73
+ };
74
+ } : {
75
+ instances?: never;
76
+ };
77
+ type SlotDefinitions = {
78
+ [V in SlotName]?: Partial<{
79
+ [P in SlotView<V>]: (ViewDefinition<P, unknown, V> & SlotInstanceDefinition<V>) | false;
80
+ }>;
81
+ };
82
+ export interface TailorKitClient<TSlots extends SlotDefinitions = SlotDefinitions> {
83
+ slots: TSlots;
84
+ }
85
+ export interface TailorKitClientMeta {
86
+ preactVersion: string;
87
+ }
88
+ export interface TailorKitClientRuntime {
89
+ h: typeof h;
90
+ render: (vnode: VNode | null, parent: Element | Document | ShadowRoot | DocumentFragment) => void;
91
+ }
92
+ export type TailorKitClientWithMeta<TViews extends SlotDefinitions = SlotDefinitions> = TailorKitClient<TViews> & {
93
+ $meta: TailorKitClientMeta;
94
+ $runtime: TailorKitClientRuntime;
95
+ };
96
+ type ViewOptions<TPath extends AppViewPath, TSlot extends SlotName, TSchema extends StandardSchemaV1> = {
97
+ [S in TSlot]: {
98
+ slot: S;
99
+ view: TPath;
100
+ component: View;
101
+ } & (TPath extends SlotView<S> ? unknown : {
102
+ readonly __tailorkit_error__: "View is not supported by this slot";
103
+ }) & (TailorKitSlots[S] extends {
104
+ multiple: true;
105
+ } ? {
106
+ instances: ViewInstances<TPath, TSchema>;
107
+ } : {
108
+ instances?: never;
109
+ });
110
+ }[TSlot];
111
+ /** In .view.tsx files, the builder supplies the slot and filename-derived path.
112
+ * An explicit view must match the file path and provides precise host context typing. */
113
+ export declare function defineView<const TPath extends AppViewPath = AppViewPath, TSchema extends StandardSchemaV1 = StandardSchemaV1>(options: {
114
+ slot?: never;
115
+ view?: TPath;
116
+ component: View;
117
+ instances?: ViewInstances<TPath, TSchema>;
118
+ }): ViewDefinition<TPath, StandardSchemaV1.InferOutput<TSchema>>;
119
+ export declare function defineView<const TPath extends AppViewPath, const TSlot extends SlotName, TSchema extends StandardSchemaV1>(options: ViewOptions<TPath, TSlot, TSchema>): ViewDefinition<TPath, StandardSchemaV1.InferOutput<TSchema>, TSlot> & SlotInstanceDefinition<TSlot>;
120
+ export declare const createRemoteComponent: <TProps extends object, TChildren extends boolean = false>(name: string, options?: {
121
+ callbacks?: Record<string, number>;
122
+ children?: TChildren;
123
+ }) => View<TProps & {
124
+ children?: TChildren extends true ? ComponentChildren : never;
125
+ }>;
126
+ export {};
package/package.json CHANGED
@@ -1,56 +1,93 @@
1
1
  {
2
2
  "name": "@tailorkit/app",
3
- "version": "0.1.0-beta.8",
4
- "license": "AGPL-3.0-only",
3
+ "version": "1.0.0-beta.44",
4
+ "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/AlfieJones/tailorkit.git",
7
+ "url": "git+https://github.com/TailorKit-Labs/TailorKit.git",
8
8
  "directory": "packages/app"
9
9
  },
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
13
  "type": "module",
14
+ "imports": {
15
+ "#env": "./src/env.ts",
16
+ "#*": {
17
+ "development": [
18
+ "./src/*",
19
+ "./src/*.ts",
20
+ "./src/*.tsx",
21
+ "./src/*/index.ts",
22
+ "./src/*/index.tsx"
23
+ ],
24
+ "types": [
25
+ "./dist/*",
26
+ "./dist/*.d.ts",
27
+ "./dist/*/index.d.ts"
28
+ ],
29
+ "default": [
30
+ "./src/*",
31
+ "./src/*.ts",
32
+ "./src/*.tsx",
33
+ "./src/*/index.ts",
34
+ "./src/*/index.tsx"
35
+ ]
36
+ }
37
+ },
14
38
  "exports": {
15
39
  ".": {
16
40
  "types": "./dist/index.d.ts",
17
41
  "import": "./dist/index.js"
18
42
  },
19
- "./config": {
20
- "types": "./dist/config/index.d.ts",
21
- "import": "./dist/config.js"
43
+ "./client": {
44
+ "types": "./dist/client.d.ts",
45
+ "import": "./dist/client.js"
46
+ },
47
+ "./server": {
48
+ "types": "./dist/server.d.ts",
49
+ "import": "./dist/server.js"
22
50
  },
23
- "./config/loader": {
24
- "types": "./dist/config/loader.d.ts",
25
- "import": "./dist/config-loader.js"
51
+ "./protocol": {
52
+ "types": "./dist/protocol.d.ts",
53
+ "import": "./dist/protocol.js"
26
54
  },
27
- "./builder": {
28
- "types": "./dist/builder/index.d.ts",
29
- "import": "./dist/builder.js"
55
+ "./client/connection": {
56
+ "types": "./dist/client/connection.d.ts",
57
+ "import": "./dist/client-connection.js"
30
58
  }
31
59
  },
32
60
  "publishConfig": {
33
61
  "access": "public"
34
62
  },
35
63
  "dependencies": {
36
- "@tailorkit/core": "0.1.0-beta.8",
37
- "cosmiconfig": "^10.0.0",
38
- "vite": "^8.2.2",
39
- "zod": "^4.4.3"
64
+ "@nanostores/preact": "1.1.1",
65
+ "@orpc/client": "2.0.0-beta.40",
66
+ "@orpc/contract": "2.0.0-beta.40",
67
+ "@standard-schema/spec": "^1.1.0",
68
+ "drizzle-orm": "1.0.0-rc.4-5d5b77c",
69
+ "nanostores": "1.5.5",
70
+ "valibot": "^1.5.0"
40
71
  },
41
72
  "devDependencies": {
42
- "@tailorkit/asset-delivery": "0.0.0",
43
73
  "@tailorkit/config": "0.0.0",
44
- "@types/node": "26.2.0",
45
- "preact": "^10.29.8",
74
+ "@types/node": "26.6.4",
75
+ "happy-dom": "^20.14.6",
76
+ "preact": "^11.0.1",
46
77
  "tsup": "^8.5.1",
47
- "typescript": "^7.0.2"
78
+ "typescript": "^7.0.2",
79
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.1.0",
80
+ "vite-plus": "1.1.0",
81
+ "zod": "^4.6.5"
48
82
  },
49
83
  "peerDependencies": {
50
- "preact": "^10.0.0"
84
+ "preact": "^11.0.0"
51
85
  },
52
86
  "scripts": {
53
87
  "build": "tsup --config tsup.config.ts && tsc -p tsconfig.build.json",
54
- "check-types": "tsc --noEmit"
88
+ "check-types": "tsc --noEmit",
89
+ "test": "vp test run",
90
+ "lint": "vp lint .",
91
+ "lint:fix": "vp lint --fix ."
55
92
  }
56
93
  }