@supacloud/compiler 0.40.1 → 0.42.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.
@@ -1 +1 @@
1
- export declare const MIGRATION_APP_VERSION = "0.23.0";
1
+ export declare const MIGRATION_APP_VERSION = "0.24.0";
@@ -1 +1 @@
1
- export declare const MIGRATION_ELYSIA_VERSION = "0.27.1";
1
+ export declare const MIGRATION_ELYSIA_VERSION = "0.29.0";
package/dist/types.d.ts CHANGED
@@ -185,6 +185,21 @@ export interface HandlerParamNode {
185
185
  transform?: "number" | "boolean" | "string";
186
186
  default?: unknown;
187
187
  }
188
+ export type EffectRetryPolicy = "none" | "explicit";
189
+ export interface EffectErrorMappingNode {
190
+ tag: string;
191
+ status: number;
192
+ code: string;
193
+ message?: string;
194
+ }
195
+ export interface EffectRouteNode {
196
+ required: true;
197
+ errors?: EffectErrorMappingNode[];
198
+ dependencies?: string[];
199
+ retry?: EffectRetryPolicy;
200
+ maxAttempts?: number;
201
+ timeoutMs?: number;
202
+ }
188
203
  export interface RouteNode {
189
204
  parse?: "none";
190
205
  allowDeleteBody?: true;
@@ -205,6 +220,8 @@ export interface RouteNode {
205
220
  cookie?: string;
206
221
  response?: string;
207
222
  responses?: Record<string, string>;
223
+ /** Static Effect execution contract for this route. */
224
+ effect?: EffectRouteNode;
208
225
  /** @Command-decorated class explicitly bound by the route. */
209
226
  command?: string;
210
227
  /** Route guards executed before handler (Angular CanActivateFn style). */
@@ -429,6 +446,26 @@ export interface CompileOptions {
429
446
  changedPaths?: string[];
430
447
  /** Type-safety gates for generated artifacts and production source. */
431
448
  typeSafety?: TypeSafetyOptions;
449
+ /** Compile-time Effect governance for routes and command handlers. */
450
+ effect?: EffectCompilerOptions;
451
+ }
452
+ export interface EffectCompilerOptions {
453
+ /** Require every discovered route to declare an Effect contract. */
454
+ requireRouteEffects?: boolean;
455
+ /** Require explicit public mappings for Effect failures. */
456
+ requireErrorMappings?: boolean;
457
+ /** Require an explicit dependency list for Effect environments. */
458
+ requireDependencies?: boolean;
459
+ /** Reject unknown/any failures and require a tagged failure union. */
460
+ requireTaggedErrorTypes?: boolean;
461
+ /** Require effect.dependencies to exactly match the Effect environment type. */
462
+ requireExactDependencyTypes?: boolean;
463
+ /** Require a timeout whenever the route declares Effect dependencies. */
464
+ requireTimeoutForDependencies?: boolean;
465
+ /** Reject direct Effect.run* calls inside governed route handlers. */
466
+ forbidDirectRuntimeExecution?: boolean;
467
+ /** Reject direct throw statements inside governed route handlers. */
468
+ forbidDirectThrows?: boolean;
432
469
  }
433
470
  export interface GraphqlOptions {
434
471
  /** Additionally emit standard TypedDocumentNode artifacts for GraphQL ecosystem clients. */
@@ -527,6 +564,7 @@ export interface ValidateOptions {
527
564
  disallowControllerDirectDb?: boolean;
528
565
  /** Detect modules declared in the project that are unreachable from any root module. */
529
566
  detectOrphanModules?: boolean;
567
+ effect?: EffectCompilerOptions;
530
568
  }
531
569
  /** Runtime capabilities declared by the Command executor. */
532
570
  export interface CommandExecutionCapabilities {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/compiler",
3
- "version": "0.40.1",
3
+ "version": "0.42.0",
4
4
  "description": "Static compiler for @supacloud/app metadata: builds the application graph from AST, validates it, and generates reflection-free factory code",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",