@supacloud/elysia 0.36.2 → 0.37.0

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.
package/README.md CHANGED
@@ -11,8 +11,8 @@ is a separately authorized business command, never an assumed rollback.
11
11
  The Elysia peer and development dependency are pinned to `2.0.0-rc.0`.
12
12
  The runtime adapter pins Effect `4.0.5` and consumes its `Exit`-based
13
13
  execution boundary.
14
- `compatibility.json` records the acceptance target: Bun 1.4.3, Elysia
15
- 2.0.0-rc.0, Effect 4.0.5, `typebox` 1.4.2, `exact-mirror` 1.2.6,
14
+ `compatibility.json` records the acceptance target: Bun 1.4.4, Elysia
15
+ 2.0.0-rc.0, Effect 4.0.5, `typebox` 1.4.3, `exact-mirror` 1.2.6,
16
16
  TypeScript CLI 7.0.2 and the compiler's separate TypeScript 6 semantic API 6.0.2.
17
17
  The matrix is a
18
18
  required target, not proof of an execution. See the dated, commit-specific
@@ -1,10 +1,10 @@
1
1
  {
2
- "bun": "1.4.3",
2
+ "bun": "1.4.4",
3
3
  "packages": {
4
4
  "elysia": "2.0.0-rc.0",
5
5
  "effect": "4.0.5",
6
6
  "typescript": "7.0.2",
7
- "typebox": "1.4.2",
7
+ "typebox": "1.4.3",
8
8
  "exact-mirror": "1.2.6",
9
9
  "@typescript/typescript6": "6.0.2"
10
10
  }
@@ -41,11 +41,6 @@ export declare function createCatalogApplication(ports: CatalogPorts): import("e
41
41
  response: {};
42
42
  error: [];
43
43
  }, "get", "/health", import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, {}, "/health">, import("elysia/types").MergeScopedSchemas<{}, {}, {}>>, {}, ({ clock }: {
44
- body: unknown;
45
- query: Record<string, string | undefined>;
46
- params: {};
47
- headers: Record<string, string | undefined>;
48
- cookie: Record<string, import("elysia").Cookie<unknown>>;
49
44
  server: import("elysia").Server | null;
50
45
  redirect: import("elysia").redirect;
51
46
  set: {
@@ -66,10 +61,15 @@ export declare function createCatalogApplication(ports: CatalogPorts): import("e
66
61
  derive: {};
67
62
  }>>) => import("elysia/types").MaybePromise<void>;
68
63
  readonly path: string;
69
- route?: string | undefined;
70
- rid?: string | undefined;
64
+ route?: string;
65
+ rid?: string;
71
66
  request: Request;
72
67
  store: {};
68
+ body: unknown;
69
+ query: Record<string, string | undefined>;
70
+ params: {};
71
+ headers: Record<string, string | undefined>;
72
+ cookie: Record<string, import("elysia").Cookie<unknown>>;
73
73
  clock: () => number;
74
74
  }) => {
75
75
  ok: boolean;
@@ -18,7 +18,7 @@ export interface SupaCloudFrameworkOptions<Http extends AnyElysia = Elysia, Requ
18
18
  }
19
19
  export declare function createSupaCloudFramework<const Http extends AnyElysia = Elysia, RequestContext = unknown>(options: SupaCloudFrameworkOptions<Http, RequestContext>): Elysia<"", "local", {
20
20
  decorator: {} & Http["~Singleton"]["decorator"];
21
- store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
21
+ store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
22
22
  derive: {} & Http["~Singleton"]["derive"] & Http["~Ephemeral"]["derive"];
23
23
  }, {
24
24
  typebox: {} & Http["~Definitions"]["typebox"];
package/dist/index.d.ts CHANGED
@@ -305,7 +305,7 @@ export interface ApplicationOptions<Http extends AnyElysia = Elysia, RequestCont
305
305
  /** Native plugin. Use scoped/global derive/resolve hooks to extend compiled routes. */
306
306
  http?: Http;
307
307
  /** Startup-compiled policies selected by route.data.httpPolicies, in declaration order. */
308
- httpPolicies?: HttpPolicyRegistry<Http>;
308
+ httpPolicies?: HttpPolicyRegistry<NoInfer<Http>>;
309
309
  /** Runs after validation and HTTP resolvers, with the validated native context. */
310
310
  requestContext?: HttpRequestContextFactory<Http, RequestContext>;
311
311
  /** Enforces permission/audit/idempotency policy for command-bound routes. */
@@ -409,7 +409,7 @@ interface HttpContext {
409
409
  */
410
410
  export declare function createModulePlugin<const Services extends Record<string, unknown>, const Http extends AnyElysia = Elysia>(compiled: CompiledModule, services: Services, ctxFactory?: HttpRequestContextFactory<Http>, options?: Pick<ApplicationOptions<Http>, "http" | "httpPolicies" | "commandGovernance" | "commandExecutor" | "errorMapper" | "effectRuntime" | "onExecution" | "normalize">, imported?: Record<string, Record<string, unknown>>, pendingWork?: PendingWorkRegistry): import("elysia/types").LocalHookReturn<"", "local", {
411
411
  decorator: {} & Http["~Singleton"]["decorator"];
412
- store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
412
+ store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
413
413
  derive: {} & Http["~Singleton"]["derive"];
414
414
  }, {
415
415
  typebox: {} & Http["~Definitions"]["typebox"];
@@ -442,7 +442,7 @@ export declare function defaultErrorResponse(error: unknown, frameworkCode?: str
442
442
  */
443
443
  export declare function createApplication<const Http extends AnyElysia = Elysia>(options: ApplicationOptions<Http>): Elysia<"", "local", {
444
444
  decorator: {} & Http["~Singleton"]["decorator"];
445
- store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
445
+ store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
446
446
  derive: {} & Http["~Singleton"]["derive"] & Http["~Ephemeral"]["derive"];
447
447
  }, {
448
448
  typebox: {} & Http["~Definitions"]["typebox"];
@@ -464,7 +464,7 @@ export declare function createApplication<const Http extends AnyElysia = Elysia>
464
464
  /** Semantic alias of createApplication for readable tests. */
465
465
  export declare function createTestApp<const Http extends AnyElysia = Elysia>(options: ApplicationOptions<Http>): Elysia<"", "local", {
466
466
  decorator: {} & Http["~Singleton"]["decorator"];
467
- store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
467
+ store: ({} & Http["~Singleton"]["store"] extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never) extends infer T ? { [K in keyof T]: T[K]; } : never;
468
468
  derive: {} & Http["~Singleton"]["derive"] & Http["~Ephemeral"]["derive"];
469
469
  }, {
470
470
  typebox: {} & Http["~Definitions"]["typebox"];
@@ -14,7 +14,7 @@ export declare function createPersistentCommandAdapter<Result>(command: Persiste
14
14
  audit: boolean;
15
15
  idempotency: boolean;
16
16
  transaction: boolean;
17
- boundary: "external" | "database";
17
+ boundary: "database" | "external";
18
18
  };
19
19
  execute(invocation: CommandInvocation): Promise<DurableCommandReceipt<Result>>;
20
20
  };
@@ -179,6 +179,8 @@ export declare function defineJsonContract<const Input extends TSchema, const Re
179
179
  url: string;
180
180
  body?: unknown;
181
181
  }, options?: SchemaDecoderOptions): Readonly<{
182
+ body: Input;
183
+ response: Result;
182
184
  input: (value: unknown) => import("typebox").StaticType<[], "Decode", {}, {}, Input>;
183
185
  result: (value: unknown) => import("typebox").StaticType<[], "Decode", {}, {}, Result>;
184
186
  request: (input: NoInfer<UnwrapSchema<Input>>) => {
@@ -186,7 +188,5 @@ export declare function defineJsonContract<const Input extends TSchema, const Re
186
188
  url: string;
187
189
  body?: unknown;
188
190
  };
189
- body: Input;
190
- response: Result;
191
191
  }>;
192
192
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/elysia",
3
- "version": "0.36.2",
3
+ "version": "0.37.0",
4
4
  "description": "Elysia runtime adapter for SupaCloud compiled modules: application/request scopes, route registration and validation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,28 +49,28 @@
49
49
  "directory": "packages/elysia"
50
50
  },
51
51
  "dependencies": {
52
- "@supacloud/app": "0.33.0",
53
- "@supacloud/commands": "0.11.1",
54
- "@supacloud/contracts": "0.15.1",
52
+ "@supacloud/app": "0.35.0",
53
+ "@supacloud/commands": "0.11.2",
54
+ "@supacloud/contracts": "0.15.2",
55
55
  "effect": "4.0.5",
56
56
  "exact-mirror": "1.2.6",
57
57
  "jose": "^6.2.13",
58
- "typebox": "1.4.2"
58
+ "typebox": "1.4.3"
59
59
  },
60
60
  "overrides": {
61
- "@supacloud/delivery": "0.21.1",
62
- "@supacloud/contracts": "0.15.1",
63
- "@supacloud/commands": "0.11.1",
61
+ "@supacloud/delivery": "0.23.1",
62
+ "@supacloud/contracts": "0.15.2",
63
+ "@supacloud/commands": "0.11.2",
64
64
  "@graphql-tools/utils": "^12.0.4"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "elysia": "2.0.0-rc.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@supacloud/compiler": "0.51.1",
71
- "@supacloud/delivery": "0.21.1",
72
- "@supacloud/db": "0.20.1",
73
- "@types/bun": "^1.4.3",
70
+ "@supacloud/compiler": "0.52.2",
71
+ "@supacloud/delivery": "0.23.1",
72
+ "@supacloud/db": "0.20.3",
73
+ "@types/bun": "^1.4.4",
74
74
  "elysia": "2.0.0-rc.0",
75
75
  "typescript": "^7.0.2"
76
76
  }