@supacloud/compiler 0.27.4 → 0.29.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/NOTICE CHANGED
@@ -1,22 +1,17 @@
1
1
  SupaCloud
2
2
  Copyright 2025 SupaCloud Contributors
3
3
 
4
- SupaCloud project-owned code in this revision is licensed under the GNU
5
- Affero General Public License, version 3 only (AGPL-3.0-only). The complete
6
- license is provided in LICENSE. This is not an "or later" grant.
4
+ SupaCloud project-owned code in this revision is licensed under the Apache
5
+ License, Version 2.0 (Apache-2.0). The complete license is provided in
6
+ LICENSE.
7
7
 
8
8
  This program is distributed without any warranty; without even the implied
9
9
  warranty of merchantability or fitness for a particular purpose.
10
10
 
11
11
  Third-party components, incorporated upstream code, and their copyright,
12
- license and attribution notices retain their original terms. This notice
13
- does not replace those terms or claim ownership of third-party work.
12
+ license and attribution notices retain their original terms. This notice does
13
+ not replace those terms or claim ownership of third-party work.
14
14
 
15
- Earlier SupaCloud code was distributed under Apache-2.0 or MIT as indicated
16
- in its original files and package metadata. Previously granted permissions
17
- are not revoked by this change. The historical Apache-2.0 text is preserved
18
- in LICENSE-APACHE-2.0.txt. Retain any applicable upstream MIT notices as well.
19
-
20
- Before publishing this licensing change, maintainers must confirm authority
21
- to license the affected contributions and compatibility of incorporated
22
- third-party code. This notice is not evidence of contributor consent.
15
+ Previously released SupaCloud versions retain the permissions granted with
16
+ those versions. See the historical license files and release notices where
17
+ applicable.
package/README.md CHANGED
@@ -747,4 +747,4 @@ metadata, not an authorization boundary.
747
747
 
748
748
  ## License
749
749
 
750
- AGPL-3.0-only. See the repository root `LICENSE` and `NOTICE` files.
750
+ Apache-2.0. See the repository root `LICENSE` and `NOTICE` files.
@@ -0,0 +1,11 @@
1
+ import * as ts from "@typescript/typescript6";
2
+ export interface ApiOrigin {
3
+ module: string;
4
+ name: string;
5
+ }
6
+ /** Bind one source for lexical identity only. Never load dependencies or execute application code. */
7
+ export declare function bindApiSource(source: ts.SourceFile): {
8
+ source: ts.SourceFile;
9
+ checker: ts.TypeChecker;
10
+ };
11
+ export declare function apiOrigin(expression: ts.Expression, checker: ts.TypeChecker, seen?: Set<ts.Node>): ApiOrigin | undefined;
@@ -0,0 +1,124 @@
1
+ import type { ApplicationGraph } from "./types";
2
+ import { type ExecutionPlan } from "./inspect";
3
+ /**
4
+ * A stable, read-only projection of the current application graph for developer
5
+ * tooling. Never exports expressions, diagnostic messages, repair replacement
6
+ * values, credentials or business payloads. Readers share the delivery contract.
7
+ */
8
+ export declare const APPLICATION_DEVELOPMENT_LIMITS: {
9
+ readonly outputBytes: number;
10
+ readonly modules: number;
11
+ readonly providers: number;
12
+ readonly routes: number;
13
+ readonly commands: number;
14
+ readonly jobs: number;
15
+ readonly resources: number;
16
+ readonly resourceUses: number;
17
+ readonly plans: number;
18
+ readonly diagnostics: number;
19
+ };
20
+ /** Shared formatted UTF-8 byte budget for archive writers and readers (including the final newline). */
21
+ export declare const APPLICATION_DEVELOPMENT_ARCHIVE_MAX_BYTES = 524288;
22
+ export declare const APPLICATION_DEVELOPMENT_SCHEMA = "supacloud.application-development.v1";
23
+ export type DevelopmentSchemaKind = "opaque" | "declared";
24
+ export interface ApplicationDevelopmentModule {
25
+ name: string;
26
+ className: string;
27
+ file?: string;
28
+ tags?: string[];
29
+ providers: string[];
30
+ controllers: string[];
31
+ commands: string[];
32
+ jobs: string[];
33
+ queries: string[];
34
+ resources: string[];
35
+ }
36
+ export interface ApplicationDevelopmentRoute {
37
+ module: string;
38
+ method: string;
39
+ path: string;
40
+ controller: string;
41
+ handler: string;
42
+ command?: string;
43
+ aspects: string[];
44
+ schemaKinds?: Record<string, DevelopmentSchemaKind>;
45
+ }
46
+ export interface ApplicationDevelopmentResourceUse {
47
+ resource: string;
48
+ operations: string[];
49
+ }
50
+ export interface ApplicationDevelopmentCommand {
51
+ module: string;
52
+ name: string;
53
+ permission?: string;
54
+ transaction: "required" | "none";
55
+ idempotency: "required" | "none";
56
+ audit?: string;
57
+ resources: ApplicationDevelopmentResourceUse[];
58
+ }
59
+ export interface ApplicationDevelopmentJob {
60
+ module: string;
61
+ name: string;
62
+ mode?: string;
63
+ resources: ApplicationDevelopmentResourceUse[];
64
+ }
65
+ export interface ApplicationDevelopmentResource {
66
+ name: string;
67
+ kind: string;
68
+ }
69
+ export interface ApplicationDevelopmentResourceUseEntry {
70
+ module: string;
71
+ owner: string;
72
+ ownerKind: "command" | "job";
73
+ resource: string;
74
+ operations: string[];
75
+ }
76
+ export interface ApplicationDevelopmentDiagnostic {
77
+ code: string;
78
+ severity: "error" | "warn";
79
+ file?: string;
80
+ line?: number;
81
+ repair?: {
82
+ type: string;
83
+ readiness: "preview" | "input-required" | "manual";
84
+ };
85
+ }
86
+ export interface ApplicationDevelopmentContext {
87
+ schema: typeof APPLICATION_DEVELOPMENT_SCHEMA;
88
+ source: "current-graph";
89
+ deploymentVerified: false;
90
+ modules: ApplicationDevelopmentModule[];
91
+ routes: ApplicationDevelopmentRoute[];
92
+ commands: ApplicationDevelopmentCommand[];
93
+ jobs: ApplicationDevelopmentJob[];
94
+ resources: ApplicationDevelopmentResource[];
95
+ resourceUses: ApplicationDevelopmentResourceUseEntry[];
96
+ executionPlans: ExecutionPlan[];
97
+ diagnostics: ApplicationDevelopmentDiagnostic[];
98
+ omitted: {
99
+ modules: number;
100
+ providers: number;
101
+ routes: number;
102
+ commands: number;
103
+ jobs: number;
104
+ resources: number;
105
+ resourceUses: number;
106
+ plans: number;
107
+ diagnostics: number;
108
+ };
109
+ limits: typeof APPLICATION_DEVELOPMENT_LIMITS;
110
+ }
111
+ export declare class ApplicationDevelopmentError extends Error {
112
+ readonly code: "APPLICATION_DEVELOPMENT_TOO_LARGE" | "APPLICATION_DEVELOPMENT_INVALID";
113
+ constructor(code: "APPLICATION_DEVELOPMENT_TOO_LARGE" | "APPLICATION_DEVELOPMENT_INVALID");
114
+ }
115
+ /** Keep the compiler API and error identity stable while sharing the wire parser. */
116
+ export declare function parseApplicationDevelopmentContext(input: unknown): ApplicationDevelopmentContext;
117
+ /** Deterministic projection of the current graph into the versioned contract. */
118
+ export interface ApplicationDevelopmentOptions {
119
+ /** Interactive output defaults to 64 KiB; delivery archives allow 512 KiB. Neither mode is unbounded. */
120
+ byteBudget?: "interactive" | "archive";
121
+ }
122
+ export declare function createApplicationDevelopmentContext(graph: ApplicationGraph, options?: ApplicationDevelopmentOptions): ApplicationDevelopmentContext;
123
+ /** Compact human-readable rendering, used by the `dev-context` CLI command. */
124
+ export declare function formatApplicationDevelopmentContext(context: ApplicationDevelopmentContext): string;