@supacloud/compiler 0.55.1 → 0.56.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/DELIVERY.md +26 -0
- package/dist/cli.js +4163 -3845
- package/dist/command-boundary.d.ts +9 -0
- package/dist/delivery-render.d.ts +1 -0
- package/dist/execution-manifest.d.ts +8 -0
- package/dist/generate.d.ts +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13125 -12806
- package/dist/migration-app-version.d.ts +1 -1
- package/dist/migration-elysia-version.d.ts +1 -1
- package/dist/types.d.ts +136 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as ts from "@typescript/typescript6";
|
|
2
|
+
import type { Diagnostic } from "./types";
|
|
3
|
+
interface GovernedClass {
|
|
4
|
+
declaration: ts.ClassDeclaration;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
/** A conservative source check for typed command references, not a JavaScript sandbox. */
|
|
8
|
+
export declare function scanCommandBoundaries(source: ts.SourceFile, file: string, checker: ts.TypeChecker, commands: readonly GovernedClass[], boundRoutes: ReadonlyMap<ts.MethodDeclaration, string>): Diagnostic[];
|
|
9
|
+
export {};
|
|
@@ -5,6 +5,7 @@ import { type GenerateOptions } from "./generate";
|
|
|
5
5
|
export declare function renderDeliveryTarget(graph: ApplicationGraph, target: DeliveryTarget, options: GenerateOptions): {
|
|
6
6
|
applicationCode: string;
|
|
7
7
|
manifestJson: string;
|
|
8
|
+
executionPlan: import("./types").CompiledExecutionManifest;
|
|
8
9
|
contractsManifestJson: string;
|
|
9
10
|
clientCode?: string;
|
|
10
11
|
openApiCode?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandExecutionCapabilities, CompiledExecutionManifest, Diagnostic } from "./types";
|
|
2
|
+
/** Internal delivery error; the public validator returns structured diagnostics. */
|
|
3
|
+
export declare class ExecutionManifestValidationError extends Error {
|
|
4
|
+
readonly diagnostics: Diagnostic[];
|
|
5
|
+
constructor(diagnostics: Diagnostic[]);
|
|
6
|
+
}
|
|
7
|
+
/** Validate a compiler-produced plan against deployment declarations, never runtime attestations. */
|
|
8
|
+
export declare function validateExecutionManifest(plan: CompiledExecutionManifest, capabilities?: CommandExecutionCapabilities): Diagnostic[];
|
package/dist/generate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ApplicationGraph, OpenApiOptions } from "./types";
|
|
2
|
-
export interface GenerateOptions {
|
|
1
|
+
import type { ApplicationGraph, CompiledExecutionManifest, OpenApiOptions, ValidateOptions } from "./types";
|
|
2
|
+
export interface GenerateOptions extends Pick<ValidateOptions, "moduleBoundaryPreset" | "moduleBoundaries" | "commandCapabilities"> {
|
|
3
3
|
rootDir: string;
|
|
4
4
|
outDir: string;
|
|
5
5
|
generateClient?: boolean;
|
|
@@ -14,6 +14,7 @@ export interface GenerateOptions {
|
|
|
14
14
|
export interface RenderedArtifacts {
|
|
15
15
|
applicationCode: string;
|
|
16
16
|
manifestJson: string;
|
|
17
|
+
executionPlan: CompiledExecutionManifest;
|
|
17
18
|
contractsManifestJson: string;
|
|
18
19
|
clientCode?: string;
|
|
19
20
|
openApiCode?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { TraitCompiler } from "./traits";
|
|
|
38
38
|
export type { TraitCompilation, TraitHandler, TraitKind, TraitRecord } from "./traits";
|
|
39
39
|
export { generateApplication, renderApplication, renderClient, renderOpenApi } from "./generate";
|
|
40
40
|
export type { GenerateOptions, RenderedArtifacts } from "./generate";
|
|
41
|
+
export { validateExecutionManifest } from "./execution-manifest";
|
|
41
42
|
export { buildContractManifest } from "./contract-manifest";
|
|
42
43
|
export type { ContractManifest } from "./contract-manifest";
|
|
43
44
|
export { diffOpenApiDocuments, exportGeneratedOpenApiJson, formatOpenApiDiff, loadGeneratedOpenApiDocument, parseOpenApiDocument, readOpenApiJson, serializeOpenApiJson, writeOpenApiJson, OpenApiDocumentError, } from "./openapi-tools";
|
|
@@ -52,7 +53,7 @@ export { DEFAULT_SUPACLOUD_CONFIG, compileOptionsFromConfig, defineSupacloudConf
|
|
|
52
53
|
export type { SupaCloudConfig } from "./config";
|
|
53
54
|
export { camelName } from "./util";
|
|
54
55
|
export { ANGULAR_ENTERPRISE_RULES, CLEAN_ARCHITECTURE_RULES, MODULAR_MONOLITH_RULES, MODULE_BOUNDARY_PROFILES, getModuleBoundaryPreset, getModuleBoundaryProfile, resolveModuleBoundaries, } from "./profiles";
|
|
55
|
-
export type { ApplicationGraph, AspectRefNode, CachedModuleEntry, CheckProjectResult, CommandExecutionCapabilities, CommandNode, CompileOptions, DatabaseGovernanceOptions, CompileResult, CompileStats, ControllerNode, DependencyGraphCache, DependencyGraphIndex, Diagnostic, DiagnosticFix, EffectCompilerOptions, EffectErrorMappingNode, EffectRetryPolicy, EffectRouteNode, ModuleBoundaryPresetName, ModuleBoundaryProfile, ModuleBoundaryRule, ModuleNode, JobNode, ProviderKind, ProviderNode, QueryNode, RouteNode, Scope, TokenKind, TypeSafetyOptions, ValidateOptions, WatchEvent, WatchHandle, WatchOptions, FeatureSpecNode, FeatureTransitionNode, FeatureDatabaseSourceNode, FeaturePersistenceNode, GraphqlOptions, GraphqlContractSummary, OpenApiOptions, OpenApiSecurityScheme, OpenApiServer, } from "./types";
|
|
56
|
+
export type { ApplicationGraph, AspectRefNode, CachedModuleEntry, CheckProjectResult, CommandExecutionCapabilities, CommandNode, CompileOptions, DatabaseGovernanceOptions, CompileResult, CompileStats, CompiledExecutionManifest, ExecutionPlanCommand, ExecutionPlanJob, ExecutionPlanModule, ExecutionPlanProvider, ExecutionPlanProviderEdge, ExecutionPlanRoute, ControllerNode, DependencyGraphCache, DependencyGraphIndex, Diagnostic, DiagnosticFix, EffectCompilerOptions, EffectErrorMappingNode, EffectRetryPolicy, EffectRouteNode, ModuleBoundaryPresetName, ModuleBoundaryProfile, ModuleBoundaryRule, ModuleNode, JobNode, ProviderKind, ProviderNode, QueryNode, RouteNode, Scope, TokenKind, TypeSafetyOptions, ValidateOptions, WatchEvent, WatchHandle, WatchOptions, FeatureSpecNode, FeatureTransitionNode, FeatureDatabaseSourceNode, FeaturePersistenceNode, GraphqlOptions, GraphqlContractSummary, OpenApiOptions, OpenApiSecurityScheme, OpenApiServer, } from "./types";
|
|
56
57
|
export { inspectRouteContracts, validateRouteContracts } from "./route-contracts";
|
|
57
58
|
export { validateEffectPolicies, validateJobPolicies } from "./effect-governance";
|
|
58
59
|
export { pullGraphqlSchema } from "./graphql-schema";
|