@zenstackhq/language 3.9.0 → 3.9.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/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_ast = require("./ast-DSXl7TDv.cjs");
3
3
  const require_ast$1 = require("./ast.cjs");
4
- const require_utils = require("./utils-BvdQdCtT.cjs");
4
+ const require_utils = require("./utils-DSpz4Ig6.cjs");
5
5
  let _zenstackhq_common_helpers = require("@zenstackhq/common-helpers");
6
6
  let langium = require("langium");
7
7
  let node_fs = require("node:fs");
@@ -4345,6 +4345,9 @@ var AttributeApplicationValidator = class {
4345
4345
  if (!found) accept("error", `Schema "${schemaName}" is not defined in the datasource`, { node: attr });
4346
4346
  }
4347
4347
  }
4348
+ _checkStrict(attr, accept) {
4349
+ if (!require_ast.isTypeDef(attr.$container)) accept("error", `attribute "@@strict" can only be used on type definitions`, { node: attr });
4350
+ }
4348
4351
  validatePolicyKinds(kind, candidates, attr, accept) {
4349
4352
  const items = kind.split(",").map((x) => x.trim());
4350
4353
  items.forEach((item) => {
@@ -4405,6 +4408,12 @@ __decorate([
4405
4408
  __decorateMetadata("design:paramtypes", [Object, Object]),
4406
4409
  __decorateMetadata("design:returntype", void 0)
4407
4410
  ], AttributeApplicationValidator.prototype, "_checkSchema", null);
4411
+ __decorate([
4412
+ check("@@strict"),
4413
+ __decorateMetadata("design:type", Function),
4414
+ __decorateMetadata("design:paramtypes", [Object, Object]),
4415
+ __decorateMetadata("design:returntype", void 0)
4416
+ ], AttributeApplicationValidator.prototype, "_checkStrict", null);
4408
4417
  function assignableToAttributeParam(arg, param, attr) {
4409
4418
  const genericError = {
4410
4419
  result: false,