@supacloud/compiler 0.23.0 → 0.25.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 +18 -0
- package/dist/cli.js +384 -48
- package/dist/contract-manifest.d.ts +53 -0
- package/dist/generate.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1042 -742
- package/dist/migration-assess.d.ts +62 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ApplicationGraph } from "./types";
|
|
2
|
+
export interface ContractManifest {
|
|
3
|
+
version: 1;
|
|
4
|
+
commands: Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
className: string;
|
|
7
|
+
module: string;
|
|
8
|
+
permission?: string;
|
|
9
|
+
rpc?: string;
|
|
10
|
+
transaction: "required" | "none";
|
|
11
|
+
idempotency: "required" | "none";
|
|
12
|
+
auditEvent?: string;
|
|
13
|
+
}>;
|
|
14
|
+
queries: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
className: string;
|
|
17
|
+
module: string;
|
|
18
|
+
}>;
|
|
19
|
+
routes: Array<{
|
|
20
|
+
method: string;
|
|
21
|
+
path: string;
|
|
22
|
+
module: string;
|
|
23
|
+
controller: string;
|
|
24
|
+
handler: string;
|
|
25
|
+
command?: string;
|
|
26
|
+
permission?: string;
|
|
27
|
+
requestSchemas: Partial<Record<"body" | "params" | "query" | "headers" | "cookie", string>>;
|
|
28
|
+
responseSchema?: string;
|
|
29
|
+
/** Status-aware response schemas; legacy responseSchema remains for compatibility. */
|
|
30
|
+
responseSchemas?: Record<string, string>;
|
|
31
|
+
evidence?: string;
|
|
32
|
+
}>;
|
|
33
|
+
permissions: string[];
|
|
34
|
+
rpc: Array<{
|
|
35
|
+
command: string;
|
|
36
|
+
adapter: string;
|
|
37
|
+
}>;
|
|
38
|
+
events: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
source: string;
|
|
41
|
+
command: string;
|
|
42
|
+
}>;
|
|
43
|
+
fixtures: string[];
|
|
44
|
+
artifacts: {
|
|
45
|
+
client: boolean;
|
|
46
|
+
openapi: boolean;
|
|
47
|
+
permissions: boolean;
|
|
48
|
+
sdk: "generated-client";
|
|
49
|
+
openapiDocument: "generated";
|
|
50
|
+
permissionManifest: "generated";
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export declare function buildContractManifest(graph: ApplicationGraph, artifacts: Pick<ContractManifest["artifacts"], "client" | "openapi" | "permissions">): ContractManifest;
|
package/dist/generate.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export type { AppliedDiagnosticFix, ApplyDiagnosticFixOptions } from "./fixes";
|
|
|
11
11
|
export { checkProject, compileProject } from "./compile";
|
|
12
12
|
export { watchProject } from "./watch";
|
|
13
13
|
export { migrateProject, SUPACLOUD_MIGRATIONS, migrateRouteResponse } from "./migrations";
|
|
14
|
+
export { assessMigration, formatMigrationAssessment } from "./migration-assess";
|
|
15
|
+
export type { MigrationAssessmentFinding, MigrationAssessmentOptions, MigrationAssessmentResult, MigrationAssessmentStatus, MigrationRenderMode, } from "./migration-assess";
|
|
14
16
|
export { createContextPack, createExecutionPlans, doctorProject, explainGraph, formatGraph, exportGraphDot, exportGraphMermaid, } from "./inspect";
|
|
15
17
|
export { createIncrementalCompiler } from "./incremental";
|
|
16
18
|
export { createDependencyGraphCache } from "./incremental";
|
|
@@ -22,6 +24,8 @@ export { TraitCompiler } from "./traits";
|
|
|
22
24
|
export type { TraitCompilation, TraitHandler, TraitKind, TraitRecord } from "./traits";
|
|
23
25
|
export { generateApplication, renderApplication, renderClient, renderOpenApi } from "./generate";
|
|
24
26
|
export type { GenerateOptions, RenderedArtifacts } from "./generate";
|
|
27
|
+
export { buildContractManifest } from "./contract-manifest";
|
|
28
|
+
export type { ContractManifest } from "./contract-manifest";
|
|
25
29
|
export { diffOpenApiDocuments, exportGeneratedOpenApiJson, formatOpenApiDiff, loadGeneratedOpenApiDocument, parseOpenApiDocument, readOpenApiJson, serializeOpenApiJson, writeOpenApiJson, OpenApiDocumentError, } from "./openapi-tools";
|
|
26
30
|
export type { OpenApiDiffChange, OpenApiDiffResult, OpenApiDocument, OpenApiExportOptions, OpenApiJsonWriteResult, OpenApiObject, } from "./openapi-tools";
|
|
27
31
|
export type { ContextPack, DoctorResult, ExecutionPlan } from "./inspect";
|