@supacloud/compiler 0.45.0 → 0.45.1

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/dist/cli.js CHANGED
@@ -22897,7 +22897,7 @@ function diagnostic2(error) {
22897
22897
  ...error.suggestion === undefined ? {} : { suggestion: error.suggestion }
22898
22898
  };
22899
22899
  }
22900
- function createDeliveryPlan(graph, input) {
22900
+ function createDeliveryPlan(graph, input, validation) {
22901
22901
  let options;
22902
22902
  try {
22903
22903
  options = parseDeliveryOptions(input);
@@ -22913,7 +22913,7 @@ function createDeliveryPlan(graph, input) {
22913
22913
  }
22914
22914
  const diagnostics = [
22915
22915
  ...(graph.diagnostics ?? []).map(diagnostic2),
22916
- ...validateGraph(graph, { strict: true }).map(diagnostic2)
22916
+ ...validateGraph(graph, validation === undefined ? { strict: true } : { ...validation, strict: true }).map(diagnostic2)
22917
22917
  ];
22918
22918
  const fail = (code, message, suggestion) => {
22919
22919
  diagnostics.push({ severity: "error", code, message, suggestion });
@@ -23110,7 +23110,7 @@ async function planDeliveryProject(options, delivery) {
23110
23110
  return createDeliveryPlan({ modules: [], externalTokens: [] }, delivery);
23111
23111
  }
23112
23112
  const checked = await checkProject(options);
23113
- return createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, delivery);
23113
+ return createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, delivery, options);
23114
23114
  }
23115
23115
  function formatDeliveryPlan(result) {
23116
23116
  const lines = result.ok ? [
@@ -23811,7 +23811,7 @@ async function buildDeliveryProject(options, delivery) {
23811
23811
  phase = "compiler-checks";
23812
23812
  const sources = await sourceInventory(sourceRoot, generatedRoot);
23813
23813
  const checked = await checkProject(options);
23814
- const planned = createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, settings);
23814
+ const planned = createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, settings, options);
23815
23815
  if (!planned.ok)
23816
23816
  return failed(planned.diagnostics);
23817
23817
  if (options.graphql && checked.mismatches.some((mismatch) => mismatch.startsWith("graphql"))) {
@@ -1,7 +1,7 @@
1
1
  import { type DeliveryPlanResult } from "./delivery-schema";
2
- import type { ApplicationGraph, CompileOptions } from "./types";
2
+ import type { ApplicationGraph, CompileOptions, ValidateOptions } from "./types";
3
3
  /** Trusted compiler graph in, validated topology preview out. No file or remote writes. */
4
- export declare function createDeliveryPlan(graph: ApplicationGraph, input?: unknown): DeliveryPlanResult;
4
+ export declare function createDeliveryPlan(graph: ApplicationGraph, input?: unknown, validation?: ValidateOptions): DeliveryPlanResult;
5
5
  /** Reuse all compiler gates without requiring generated files to already exist. */
6
6
  export declare function planDeliveryProject(options: CompileOptions, delivery?: unknown): Promise<DeliveryPlanResult>;
7
7
  export declare function formatDeliveryPlan(result: DeliveryPlanResult): string;
package/dist/index.js CHANGED
@@ -21898,7 +21898,7 @@ function diagnostic2(error) {
21898
21898
  ...error.suggestion === undefined ? {} : { suggestion: error.suggestion }
21899
21899
  };
21900
21900
  }
21901
- function createDeliveryPlan(graph, input) {
21901
+ function createDeliveryPlan(graph, input, validation) {
21902
21902
  let options;
21903
21903
  try {
21904
21904
  options = parseDeliveryOptions(input);
@@ -21914,7 +21914,7 @@ function createDeliveryPlan(graph, input) {
21914
21914
  }
21915
21915
  const diagnostics = [
21916
21916
  ...(graph.diagnostics ?? []).map(diagnostic2),
21917
- ...validateGraph(graph, { strict: true }).map(diagnostic2)
21917
+ ...validateGraph(graph, validation === undefined ? { strict: true } : { ...validation, strict: true }).map(diagnostic2)
21918
21918
  ];
21919
21919
  const fail = (code, message, suggestion) => {
21920
21920
  diagnostics.push({ severity: "error", code, message, suggestion });
@@ -22111,7 +22111,7 @@ async function planDeliveryProject(options, delivery) {
22111
22111
  return createDeliveryPlan({ modules: [], externalTokens: [] }, delivery);
22112
22112
  }
22113
22113
  const checked = await checkProject(options);
22114
- return createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, delivery);
22114
+ return createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, delivery, options);
22115
22115
  }
22116
22116
  function formatDeliveryPlan(result) {
22117
22117
  const lines = result.ok ? [
@@ -22811,7 +22811,7 @@ async function buildDeliveryProject(options, delivery) {
22811
22811
  phase = "compiler-checks";
22812
22812
  const sources = await sourceInventory(sourceRoot, generatedRoot);
22813
22813
  const checked = await checkProject(options);
22814
- const planned = createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, settings);
22814
+ const planned = createDeliveryPlan({ ...checked.graph, diagnostics: checked.diagnostics }, settings, options);
22815
22815
  if (!planned.ok)
22816
22816
  return failed(planned.diagnostics);
22817
22817
  if (options.graphql && checked.mismatches.some((mismatch) => mismatch.startsWith("graphql"))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/compiler",
3
- "version": "0.45.0",
3
+ "version": "0.45.1",
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",
@@ -75,7 +75,7 @@
75
75
  "devDependencies": {
76
76
  "@supabase/supabase-js": "2.117.3",
77
77
  "drizzle-orm": "1.0.0-rc.5-169397b",
78
- "@types/bun": "^1.4.2",
78
+ "@types/bun": "^1.4.3",
79
79
  "typescript": "^7.0.2"
80
80
  }
81
81
  }