toilscript 0.1.54 → 0.1.56

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "imports": {
3
- "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.54/dist/toilscript.js",
4
- "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.54/dist/cli.js",
3
+ "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.56/dist/toilscript.js",
4
+ "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.56/dist/cli.js",
5
5
  "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
6
6
  "long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
7
7
  }
@@ -4523,6 +4523,7 @@ declare module "types:toilscript/src/dbcatalog" {
4523
4523
  name: string;
4524
4524
  typeName: string;
4525
4525
  isArray: boolean;
4526
+ unique: boolean;
4526
4527
  }
4527
4528
  /**
4528
4529
  * `schema_version`: a hash over the ORDERED field layout (name, type, is_array),
@@ -4596,6 +4597,13 @@ declare module "types:toilscript/src/dbcatalog" {
4596
4597
  * no `@database`.
4597
4598
  */
4598
4599
  export function buildToilDbCatalog(program: Program): Uint8Array | null;
4600
+ /** Validate every `@unique` field decorator (spec: field-level uniqueness). It is
4601
+ * only meaningful on a `string`/`Uint8Array` field of a `@data`/`@user` class -
4602
+ * exactly the shapes the edge's uniqueness walker can extract and claim. Anything
4603
+ * else (a scalar, an `Array<T>`, a nested `@data`, or a field on a non-data class)
4604
+ * is a compile error, so a misuse fails loudly at build time instead of at the
4605
+ * first write. */
4606
+ export function validateUniqueDecorators(program: Program): void;
4599
4607
  export function buildToilDbTypes(program: Program): Uint8Array | null;
4600
4608
  /** Build the `toildb.route_kinds` section bytes, or `null` when no route needs
4601
4609
  * an extra runtime DB-policy clamp. The edge already derives the default kind
@@ -8332,14 +8340,15 @@ declare module "types:toilscript/src/ast" {
8332
8340
  Job = 35,
8333
8341
  Derive = 36,
8334
8342
  Migrate = 37,
8335
- Admin = 38,
8336
- Daemon = 39,// @daemon class decorator (L4 entry; at most one per project)
8337
- Scheduled = 40,// @scheduled(spec) method decorator inside a @daemon class
8338
- Stream = 41,// @stream class decorator (L2/L3 stream protocol handler)
8339
- Connect = 42,// @connect method in a @stream class (lifecycle hook)
8340
- Message = 43,// @message method in a @stream class (lifecycle hook)
8341
- Close = 44,// @close method in a @stream class (lifecycle hook)
8342
- Disconnect = 45
8343
+ Unique = 38,
8344
+ Admin = 39,
8345
+ Daemon = 40,// @daemon class decorator (L4 entry; at most one per project)
8346
+ Scheduled = 41,// @scheduled(spec) method decorator inside a @daemon class
8347
+ Stream = 42,// @stream class decorator (L2/L3 stream protocol handler)
8348
+ Connect = 43,// @connect method in a @stream class (lifecycle hook)
8349
+ Message = 44,// @message method in a @stream class (lifecycle hook)
8350
+ Close = 45,// @close method in a @stream class (lifecycle hook)
8351
+ Disconnect = 46
8343
8352
  }
8344
8353
  export namespace DecoratorKind {
8345
8354
  /** Returns the kind of the specified decorator name node. Defaults to {@link DecoratorKind.CUSTOM}. */