@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.
@@ -0,0 +1,62 @@
1
+ import { type OpenApiDiffResult } from "./openapi-tools";
2
+ import type { CompileOptions, Diagnostic } from "./types";
3
+ export type MigrationAssessmentStatus = "compatible" | "needs-review" | "breaking" | "unsupported" | "not-proven";
4
+ export type MigrationRenderMode = "unspecified" | "browser" | "ssr" | "edge" | "trusted-server";
5
+ export interface MigrationAssessmentFinding {
6
+ code: string;
7
+ status: MigrationAssessmentStatus;
8
+ message: string;
9
+ evidence?: string;
10
+ remediation?: string;
11
+ }
12
+ export interface MigrationAssessmentOptions {
13
+ projectDir: string;
14
+ compile: CompileOptions;
15
+ baselineOpenApiPath?: string;
16
+ currentOpenApiPath?: string;
17
+ renderMode?: MigrationRenderMode;
18
+ }
19
+ export interface MigrationAssessmentResult {
20
+ version: 1;
21
+ ok: boolean;
22
+ status: MigrationAssessmentStatus;
23
+ readOnly: true;
24
+ writesPerformed: false;
25
+ rendering: {
26
+ selected: MigrationRenderMode;
27
+ ssrRequired: false;
28
+ supportedModes: readonly ["browser", "ssr", "edge", "trusted-server"];
29
+ guidance: string;
30
+ };
31
+ dependencies: {
32
+ expected: Readonly<Record<string, string>>;
33
+ problems: string[];
34
+ };
35
+ compiler: {
36
+ upToDate: boolean;
37
+ diagnostics: Diagnostic[];
38
+ mismatches: string[];
39
+ };
40
+ artifacts: {
41
+ contractsManifest: {
42
+ path: string;
43
+ present: boolean;
44
+ sha256?: string;
45
+ version?: number;
46
+ commands?: number;
47
+ routes?: number;
48
+ permissions?: number;
49
+ };
50
+ openApi?: {
51
+ baselinePath: string;
52
+ baselineSha256: string;
53
+ currentPath: string;
54
+ currentSha256: string;
55
+ diff: OpenApiDiffResult;
56
+ };
57
+ };
58
+ findings: MigrationAssessmentFinding[];
59
+ }
60
+ /** Build a local, read-only migration report. It never requires or enables SSR. */
61
+ export declare function assessMigration(options: MigrationAssessmentOptions): Promise<MigrationAssessmentResult>;
62
+ export declare function formatMigrationAssessment(result: MigrationAssessmentResult): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/compiler",
3
- "version": "0.23.0",
3
+ "version": "0.25.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",