@supacloud/compiler 0.52.0 → 0.52.2

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
@@ -12089,12 +12089,18 @@ var init_time = __esm(() => {
12089
12089
 
12090
12090
  // node_modules/typebox/build/format/date_time.mjs
12091
12091
  function IsDateTime(value) {
12092
- const dateTime = value.split(/T/i);
12093
- return dateTime.length === 2 && IsDate2(dateTime[0]) && IsTime(dateTime[1]);
12092
+ const index = value.indexOf("[");
12093
+ const datetime = index === -1 ? value : value.slice(0, index);
12094
+ if (index !== -1 && !DATE_TIME_SUFFIX.test(value.slice(index)))
12095
+ return false;
12096
+ const split = datetime.split(/T/i);
12097
+ return split.length === 2 && IsDate2(split[0]) && IsTime(split[1]);
12094
12098
  }
12099
+ var DATE_TIME_SUFFIX;
12095
12100
  var init_date_time = __esm(() => {
12096
12101
  init_date();
12097
12102
  init_time();
12103
+ DATE_TIME_SUFFIX = /^(?:\[!?(?:(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13}(?:\/(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13})*|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])\](?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*|(?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*)$/;
12098
12104
  });
12099
12105
 
12100
12106
  // node_modules/typebox/build/format/duration.mjs
@@ -17979,6 +17985,19 @@ var init_delivery_migration_archive = __esm(() => {
17979
17985
  // node_modules/@supacloud/delivery/src/delivery-migration-plan.ts
17980
17986
  var init_delivery_migration_plan = () => {};
17981
17987
 
17988
+ // node_modules/@supacloud/delivery/src/release-contract.ts
17989
+ var ALLOWED_PHASE_TRANSITIONS;
17990
+ var init_release_contract = __esm(() => {
17991
+ ALLOWED_PHASE_TRANSITIONS = new Map([
17992
+ ["planned", ["mutating", "rollback-required"]],
17993
+ ["mutating", ["applied", "rollback-required"]],
17994
+ ["applied", ["reconciled", "rollback-required"]],
17995
+ ["reconciled", []],
17996
+ ["rollback-required", ["rolled-back", "reconciled"]],
17997
+ ["rolled-back", []]
17998
+ ]);
17999
+ });
18000
+
17982
18001
  // node_modules/@supacloud/delivery/src/index.ts
17983
18002
  var init_src = __esm(() => {
17984
18003
  init_delivery_artifact();
@@ -18002,6 +18021,7 @@ var init_src = __esm(() => {
18002
18021
  init_delivery_build_schema();
18003
18022
  init_delivery_migration_archive();
18004
18023
  init_delivery_migration_plan();
18024
+ init_release_contract();
18005
18025
  });
18006
18026
 
18007
18027
  // src/delivery-migration-archive.ts
@@ -25280,10 +25300,10 @@ import { readFileSync as readFileSync4 } from "node:fs";
25280
25300
  import { resolve as resolve18 } from "node:path";
25281
25301
 
25282
25302
  // src/migration-app-version.ts
25283
- var MIGRATION_APP_VERSION = "0.34.0";
25303
+ var MIGRATION_APP_VERSION = "0.35.0";
25284
25304
 
25285
25305
  // src/migration-elysia-version.ts
25286
- var MIGRATION_ELYSIA_VERSION = "0.36.2";
25306
+ var MIGRATION_ELYSIA_VERSION = "0.37.0";
25287
25307
 
25288
25308
  // src/migration-policy.ts
25289
25309
  var cachedCompilerVersion;
@@ -1573,12 +1573,18 @@ var init_time = __esm(() => {
1573
1573
 
1574
1574
  // node_modules/typebox/build/format/date_time.mjs
1575
1575
  function IsDateTime(value) {
1576
- const dateTime = value.split(/T/i);
1577
- return dateTime.length === 2 && IsDate2(dateTime[0]) && IsTime(dateTime[1]);
1576
+ const index = value.indexOf("[");
1577
+ const datetime = index === -1 ? value : value.slice(0, index);
1578
+ if (index !== -1 && !DATE_TIME_SUFFIX.test(value.slice(index)))
1579
+ return false;
1580
+ const split = datetime.split(/T/i);
1581
+ return split.length === 2 && IsDate2(split[0]) && IsTime(split[1]);
1578
1582
  }
1583
+ var DATE_TIME_SUFFIX;
1579
1584
  var init_date_time = __esm(() => {
1580
1585
  init_date();
1581
1586
  init_time();
1587
+ DATE_TIME_SUFFIX = /^(?:\[!?(?:(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13}(?:\/(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13})*|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])\](?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*|(?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*)$/;
1582
1588
  });
1583
1589
 
1584
1590
  // node_modules/typebox/build/format/duration.mjs
@@ -3,12 +3,12 @@ import type { DeliveryTarget } from "./delivery-schema";
3
3
  import { type GenerateOptions } from "./generate";
4
4
  /** Keep conservative service factories while restricting exposed route/job descriptors. */
5
5
  export declare function renderDeliveryTarget(graph: ApplicationGraph, target: DeliveryTarget, options: GenerateOptions): {
6
- executionSnapshot: string;
7
- applicationDevelopment: string;
8
6
  applicationCode: string;
9
7
  manifestJson: string;
10
8
  contractsManifestJson: string;
11
9
  clientCode?: string;
12
10
  openApiCode?: string;
13
11
  permissionsCode?: string;
12
+ executionSnapshot: string;
13
+ applicationDevelopment: string;
14
14
  };
@@ -13,16 +13,6 @@ export interface DiagnosticReport {
13
13
  export declare function createDiagnosticReport(diagnostics: readonly Diagnostic[]): DiagnosticReport;
14
14
  /** LSP-shaped data only. It neither starts a language server nor applies unreviewed edits. */
15
15
  export declare function toEditorDiagnostics(diagnostics: readonly Diagnostic[]): {
16
- message: string;
17
- data: {
18
- diagnostic: Diagnostic;
19
- repair?: DiagnosticRepair;
20
- guidance?: string;
21
- format: 1;
22
- };
23
- codeDescription?: {
24
- href: string;
25
- } | undefined;
26
16
  range: {
27
17
  start: {
28
18
  line: number;
@@ -36,6 +26,16 @@ export declare function toEditorDiagnostics(diagnostics: readonly Diagnostic[]):
36
26
  severity: 1 | 2;
37
27
  source: string;
38
28
  code: string;
29
+ codeDescription?: {
30
+ href: string;
31
+ } | undefined;
32
+ message: string;
33
+ data: {
34
+ diagnostic: Diagnostic;
35
+ repair?: DiagnosticRepair;
36
+ guidance?: string;
37
+ format: 1;
38
+ };
39
39
  }[];
40
40
  /** Semantic editor commands are emitted only after a successful read-only preview.
41
41
  * Consumers execute the command through applyDiagnosticFix with expectedSourceHash;
package/dist/index.js CHANGED
@@ -11741,12 +11741,18 @@ var init_time = __esm(() => {
11741
11741
 
11742
11742
  // node_modules/typebox/build/format/date_time.mjs
11743
11743
  function IsDateTime(value) {
11744
- const dateTime = value.split(/T/i);
11745
- return dateTime.length === 2 && IsDate2(dateTime[0]) && IsTime(dateTime[1]);
11744
+ const index = value.indexOf("[");
11745
+ const datetime = index === -1 ? value : value.slice(0, index);
11746
+ if (index !== -1 && !DATE_TIME_SUFFIX.test(value.slice(index)))
11747
+ return false;
11748
+ const split = datetime.split(/T/i);
11749
+ return split.length === 2 && IsDate2(split[0]) && IsTime(split[1]);
11746
11750
  }
11751
+ var DATE_TIME_SUFFIX;
11747
11752
  var init_date_time = __esm(() => {
11748
11753
  init_date();
11749
11754
  init_time();
11755
+ DATE_TIME_SUFFIX = /^(?:\[!?(?:(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13}(?:\/(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13})*|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])\](?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*|(?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*)$/;
11750
11756
  });
11751
11757
 
11752
11758
  // node_modules/typebox/build/format/duration.mjs
@@ -17397,6 +17403,19 @@ var init_delivery_migration_archive = __esm(() => {
17397
17403
  // node_modules/@supacloud/delivery/src/delivery-migration-plan.ts
17398
17404
  var init_delivery_migration_plan = () => {};
17399
17405
 
17406
+ // node_modules/@supacloud/delivery/src/release-contract.ts
17407
+ var ALLOWED_PHASE_TRANSITIONS;
17408
+ var init_release_contract = __esm(() => {
17409
+ ALLOWED_PHASE_TRANSITIONS = new Map([
17410
+ ["planned", ["mutating", "rollback-required"]],
17411
+ ["mutating", ["applied", "rollback-required"]],
17412
+ ["applied", ["reconciled", "rollback-required"]],
17413
+ ["reconciled", []],
17414
+ ["rollback-required", ["rolled-back", "reconciled"]],
17415
+ ["rolled-back", []]
17416
+ ]);
17417
+ });
17418
+
17400
17419
  // node_modules/@supacloud/delivery/src/index.ts
17401
17420
  var init_src = __esm(() => {
17402
17421
  init_delivery_artifact();
@@ -17420,6 +17439,7 @@ var init_src = __esm(() => {
17420
17439
  init_delivery_build_schema();
17421
17440
  init_delivery_migration_archive();
17422
17441
  init_delivery_migration_plan();
17442
+ init_release_contract();
17423
17443
  });
17424
17444
 
17425
17445
  // src/delivery-migration-archive.ts
@@ -24962,10 +24982,10 @@ import { readFileSync as readFileSync4 } from "node:fs";
24962
24982
  import { resolve as resolve17 } from "node:path";
24963
24983
 
24964
24984
  // src/migration-app-version.ts
24965
- var MIGRATION_APP_VERSION = "0.34.0";
24985
+ var MIGRATION_APP_VERSION = "0.35.0";
24966
24986
 
24967
24987
  // src/migration-elysia-version.ts
24968
- var MIGRATION_ELYSIA_VERSION = "0.36.2";
24988
+ var MIGRATION_ELYSIA_VERSION = "0.37.0";
24969
24989
 
24970
24990
  // src/migration-policy.ts
24971
24991
  var cachedCompilerVersion;
@@ -1 +1 @@
1
- export declare const MIGRATION_APP_VERSION = "0.34.0";
1
+ export declare const MIGRATION_APP_VERSION = "0.35.0";
@@ -1 +1 @@
1
- export declare const MIGRATION_ELYSIA_VERSION = "0.36.2";
1
+ export declare const MIGRATION_ELYSIA_VERSION = "0.37.0";
@@ -4,14 +4,14 @@ export declare function inspectRouteContracts(graph: ApplicationGraph): {
4
4
  module: string;
5
5
  controller: string;
6
6
  handler: string;
7
- method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
7
+ method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
8
8
  path: string;
9
9
  file: string;
10
- missing: ("query" | "body" | "headers" | "cookie" | "params" | "response")[];
10
+ missing: ("body" | "cookie" | "headers" | "params" | "query" | "response")[];
11
11
  validation: {
12
12
  body: string;
13
13
  response: string;
14
- schemas: Partial<Record<"query" | "body" | "headers" | "cookie" | "params" | "response", "opaque" | "declared">>;
14
+ schemas: Partial<Record<"body" | "cookie" | "headers" | "params" | "query" | "response", "declared" | "opaque">>;
15
15
  evidence: string | null;
16
16
  verified: false;
17
17
  obligations: string[];
@@ -1,5 +1,29 @@
1
1
  import type { Diagnostic, TypeSafetyOptions } from "./types";
2
2
  export declare const TYPE_SAFETY_DIAGNOSTIC_CODES: {
3
+ readonly "sql-result-assertion": {
4
+ readonly errorCode: "SC6007";
5
+ readonly docsUrl: "https://supacloud.dev/errors/SC6007";
6
+ };
7
+ readonly "sql-raw-dynamic": {
8
+ readonly errorCode: "SC6008";
9
+ readonly docsUrl: "https://supacloud.dev/errors/SC6008";
10
+ };
11
+ readonly "source-unsafe-any": {
12
+ readonly errorCode: "SC6009";
13
+ readonly docsUrl: "https://supacloud.dev/errors/SC6009";
14
+ };
15
+ readonly "source-floating-promise": {
16
+ readonly errorCode: "SC6010";
17
+ readonly docsUrl: "https://supacloud.dev/errors/SC6010";
18
+ };
19
+ readonly "source-non-exhaustive-switch": {
20
+ readonly errorCode: "SC6011";
21
+ readonly docsUrl: "https://supacloud.dev/errors/SC6011";
22
+ };
23
+ readonly "source-alternative-library": {
24
+ readonly errorCode: "SC6012";
25
+ readonly docsUrl: "https://supacloud.dev/errors/SC6012";
26
+ };
3
27
  readonly "generated-any": {
4
28
  readonly errorCode: "SC6001";
5
29
  readonly docsUrl: "https://supacloud.dev/errors/SC6001";
@@ -24,30 +48,6 @@ export declare const TYPE_SAFETY_DIAGNOSTIC_CODES: {
24
48
  readonly errorCode: "SC6006";
25
49
  readonly docsUrl: "https://supacloud.dev/errors/SC6006";
26
50
  };
27
- readonly "source-unsafe-any": {
28
- readonly errorCode: "SC6009";
29
- readonly docsUrl: "https://supacloud.dev/errors/SC6009";
30
- };
31
- readonly "source-floating-promise": {
32
- readonly errorCode: "SC6010";
33
- readonly docsUrl: "https://supacloud.dev/errors/SC6010";
34
- };
35
- readonly "source-non-exhaustive-switch": {
36
- readonly errorCode: "SC6011";
37
- readonly docsUrl: "https://supacloud.dev/errors/SC6011";
38
- };
39
- readonly "source-alternative-library": {
40
- readonly errorCode: "SC6012";
41
- readonly docsUrl: "https://supacloud.dev/errors/SC6012";
42
- };
43
- readonly "sql-result-assertion": {
44
- readonly errorCode: "SC6007";
45
- readonly docsUrl: "https://supacloud.dev/errors/SC6007";
46
- };
47
- readonly "sql-raw-dynamic": {
48
- readonly errorCode: "SC6008";
49
- readonly docsUrl: "https://supacloud.dev/errors/SC6008";
50
- };
51
51
  };
52
52
  export interface TypeSafetyScanOptions extends TypeSafetyOptions {
53
53
  rootDir: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/compiler",
3
- "version": "0.52.0",
3
+ "version": "0.52.2",
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",
@@ -57,9 +57,9 @@
57
57
  "directory": "packages/compiler"
58
58
  },
59
59
  "dependencies": {
60
- "@supacloud/db": "0.20.1",
61
- "@supacloud/delivery": "0.22.0",
62
- "typebox": "1.4.2",
60
+ "@supacloud/db": "0.20.3",
61
+ "@supacloud/delivery": "0.23.1",
62
+ "typebox": "1.4.3",
63
63
  "@graphql-codegen/core": "^6.2.2",
64
64
  "@graphql-codegen/typed-document-node": "^7.2.0",
65
65
  "@graphql-codegen/typescript-operations": "^6.1.10",
@@ -68,14 +68,14 @@
68
68
  "graphql": "^16"
69
69
  },
70
70
  "overrides": {
71
- "@supacloud/contracts": "0.15.1",
71
+ "@supacloud/contracts": "0.15.2",
72
72
  "@graphql-tools/utils": "^12.0.4",
73
73
  "@whatwg-node/promise-helpers": "2.0.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@supabase/supabase-js": "2.118.0",
77
77
  "drizzle-orm": "1.0.0-rc.5-5935859",
78
- "@types/bun": "^1.4.3",
78
+ "@types/bun": "^1.4.4",
79
79
  "typescript": "^7.0.2"
80
80
  }
81
81
  }