@supacloud/compiler 0.27.4 → 0.28.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,2 @@
1
+ /** This artifact-only entry never loads source, project configuration or credentials. */
2
+ export declare function runReleaseEvidenceCommand(args: readonly string[]): Promise<void>;
@@ -0,0 +1,54 @@
1
+ import type { DeliveryObject } from "./delivery-build-schema";
2
+ /** Build evidence only; this does not attest deployment, health or rollback safety. */
3
+ export declare const RELEASE_EVIDENCE_SCHEMA = "supacloud.release-evidence.v1";
4
+ export type ReleaseEvidenceErrorCode = "RELEASE_EVIDENCE_INVALID" | "RELEASE_EVIDENCE_TARGET_NOT_FOUND";
5
+ export declare class ReleaseEvidenceError extends Error {
6
+ readonly code: ReleaseEvidenceErrorCode;
7
+ constructor(code: ReleaseEvidenceErrorCode);
8
+ }
9
+ export interface ReleaseEvidence {
10
+ schema: typeof RELEASE_EVIDENCE_SCHEMA;
11
+ correlation: "verified-build-snapshot";
12
+ deploymentVerified: false;
13
+ target: string;
14
+ build: {
15
+ producer: string;
16
+ deploymentReady: false;
17
+ manifestSha256: string;
18
+ objectId: string;
19
+ entryKind: DeliveryObject["entryKind"];
20
+ entrypoint: "bundle/index.js";
21
+ files: number;
22
+ bytes: number;
23
+ };
24
+ contract: {
25
+ status: "present" | "absent";
26
+ schema: string | null;
27
+ resources: number;
28
+ diagnostics: {
29
+ errors: number;
30
+ warnings: number;
31
+ };
32
+ };
33
+ migrations: {
34
+ status: "present" | "absent";
35
+ count: number;
36
+ latestVersion: string | null;
37
+ executionPerformed: false;
38
+ compatibility: "not-proven";
39
+ dataRecovery: "separate-required";
40
+ };
41
+ rollback: {
42
+ application: string;
43
+ database: string;
44
+ storage: string;
45
+ };
46
+ notes: string[];
47
+ }
48
+ /**
49
+ * Read one bounded manifest, verify its selected object, and correlate every
50
+ * secondary reader to that exact object. Missing optional metadata is different
51
+ * from invalid metadata: any integrity, schema, UTF-8 or target failure is fatal.
52
+ */
53
+ export declare function createReleaseEvidence(manifestPath: string, target: string): Promise<ReleaseEvidence>;
54
+ export declare function formatReleaseEvidence(evidence: ReleaseEvidence): string;
package/dist/types.d.ts CHANGED
@@ -9,6 +9,37 @@ export type JobIdempotency = "required" | "none";
9
9
  export type JobSchemaKind = "opaque" | "declared";
10
10
  export type ProviderKind = "class" | "value" | "factory" | "existing";
11
11
  export type TokenKind = "injection-token" | "class";
12
+ export type InfraResourceKind = "database" | "bucket" | "queue" | "config" | "secret";
13
+ export type InfraResourceOperation = "read" | "write" | "publish" | "consume";
14
+ /**
15
+ * A logical infrastructure resource declared with `@InfraResource`. It carries
16
+ * no credentials and is never provisioned by the compiler; it only names what
17
+ * the application requires. Environment bindings resolve the name per target.
18
+ */
19
+ export interface InfraResourceNode {
20
+ /** Stable logical name shared across environments. */
21
+ name: string;
22
+ kind: InfraResourceKind;
23
+ className: string;
24
+ file: string;
25
+ line: number;
26
+ /** Relative module path of the declaring class (for import generation). */
27
+ importPath: string;
28
+ }
29
+ export interface InfraResourceUseRef {
30
+ /** Logical resource name. */
31
+ resource: string;
32
+ operations: InfraResourceOperation[];
33
+ }
34
+ /** One module/command/job resource use, kept for inspection and validation. */
35
+ export interface ResourceUseNode extends InfraResourceUseRef {
36
+ module: string;
37
+ /** Command name when the use is declared on a command. */
38
+ command?: string;
39
+ /** Job name when the use is declared on a Job. */
40
+ job?: string;
41
+ resourceClass: string;
42
+ }
12
43
  export interface FunctionalInjectNode {
13
44
  /** Logical token name used by the application graph. */
14
45
  token: string;
@@ -240,6 +271,8 @@ export interface CommandNode {
240
271
  idempotency: "required" | "none";
241
272
  /** Automatically registered without manual module declaration. */
242
273
  standalone?: boolean;
274
+ /** Infrastructure resources this command uses, with the declared operations. */
275
+ uses?: InfraResourceUseRef[];
243
276
  /** Explicit aspects applied around this command. */
244
277
  aspects?: AspectRefNode[];
245
278
  }
@@ -264,6 +297,8 @@ export interface JobNode {
264
297
  maxAttempts?: number;
265
298
  /** Adapter-owned idempotency requirement. */
266
299
  idempotency?: JobIdempotency;
300
+ /** Infrastructure resources this job uses, with the declared operations. */
301
+ uses?: InfraResourceUseRef[];
267
302
  aspects?: AspectRefNode[];
268
303
  }
269
304
  export interface QueryNode {
@@ -303,6 +338,8 @@ export interface ModuleNode {
303
338
  commands: CommandNode[];
304
339
  jobs?: JobNode[];
305
340
  queries: QueryNode[];
341
+ /** Logical infrastructure resource names this module requires. */
342
+ resources?: string[];
306
343
  /** Explicit aspects applied to all routes and commands in this module. */
307
344
  aspects?: AspectRefNode[];
308
345
  /** Exported token names. */
@@ -312,6 +349,10 @@ export interface ModuleNode {
312
349
  export interface ApplicationGraph {
313
350
  /** Handler declaration files by module, for inspection only; omitted from app.manifest.json. */
314
351
  moduleHandlerFiles?: Record<string, string[]>;
352
+ /** Declared logical infrastructure resources, deduplicated by name. */
353
+ resources?: InfraResourceNode[];
354
+ /** Module/command/job resource uses, sorted deterministically. */
355
+ resourceUses?: ResourceUseNode[];
315
356
  /** Offline query inventory for AI context. Kept in graphql.manifest.json, not app.manifest.json. */
316
357
  graphql?: GraphqlContractSummary;
317
358
  modules: ModuleNode[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/compiler",
3
- "version": "0.27.4",
3
+ "version": "0.28.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",
@@ -49,7 +49,7 @@
49
49
  "directory": "packages/compiler"
50
50
  },
51
51
  "dependencies": {
52
- "@supacloud/delivery": "0.2.1",
52
+ "@supacloud/delivery": "0.3.0",
53
53
  "typebox": "1.3.34",
54
54
  "@graphql-codegen/core": "^6.2.0",
55
55
  "@graphql-codegen/typed-document-node": "^7.1.0",