@buka/nestjs-kit 4.1.9 → 4.3.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.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.mts +100 -66
- package/dist/index.d.ts +100 -66
- package/dist/index.js +177 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +171 -66
- package/dist/index.mjs.map +1 -1
- package/docs/core/index.md +1 -1
- package/docs/core/urn.md +93 -99
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -364,114 +364,181 @@ function IsScalarDictionary(ctor, validationOptions) {
|
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/modules/core/models/urn.ts
|
|
366
366
|
const URN_PREFIX = "urn:buka:";
|
|
367
|
-
const URN_PATTERN = /^urn:buka:([a-z][a-z0-9-]*)(?::([a-z][a-z0-9-]*)(?::(.+))?)?$/;
|
|
368
367
|
/**
|
|
369
368
|
* 统一资源名称(URN)
|
|
370
369
|
*
|
|
371
|
-
* 格式: urn:buka:<
|
|
370
|
+
* 格式: urn:buka:<domain>:<resource-type>[:<resource-id>]
|
|
372
371
|
*
|
|
373
372
|
* 支持三种粒度:
|
|
374
|
-
* -
|
|
373
|
+
* - 概念域级: urn:buka:galaxy
|
|
375
374
|
* - 资源类型级: urn:buka:galaxy:principal
|
|
376
375
|
* - 实例级: urn:buka:galaxy:principal:550e8400-e29b-41d4-a716-446655440000
|
|
377
376
|
*
|
|
378
|
-
*
|
|
377
|
+
* domain 划分原则:按资源类型的定义权归属划分,非按部署单元。
|
|
378
|
+
* resource-type 第一级推荐用于 env(环境),这是一个语义约定,不强制。
|
|
379
379
|
*
|
|
380
380
|
* 推荐通过静态工厂方法或派生方法构建层级 URN:
|
|
381
381
|
* ```ts
|
|
382
|
-
* Urn.of('galaxy') // →
|
|
383
|
-
* Urn.of('galaxy', 'principal') // →
|
|
384
|
-
* Urn.of('galaxy', 'principal', '550e8400-...') // →
|
|
382
|
+
* Urn.of('galaxy') // → DomainUrn
|
|
383
|
+
* Urn.of('galaxy', 'principal') // → ResourceTypeUrn
|
|
384
|
+
* Urn.of('galaxy', 'principal', '550e8400-...') // → ResourceIdUrn
|
|
385
385
|
*
|
|
386
386
|
* // 或通过派生方法逐层构建
|
|
387
387
|
* Urn.of('galaxy')
|
|
388
|
-
* .
|
|
389
|
-
* .
|
|
388
|
+
* .withResourceType('principal') // → ResourceTypeUrn
|
|
389
|
+
* .withResourceId('550e8400-...') // → ResourceIdUrn
|
|
390
390
|
* ```
|
|
391
391
|
*/
|
|
392
392
|
var Urn = class Urn {
|
|
393
|
-
constructor(
|
|
394
|
-
this.
|
|
395
|
-
this.
|
|
396
|
-
this.
|
|
393
|
+
constructor(domain, resourceType, resourceId) {
|
|
394
|
+
this.domain = domain;
|
|
395
|
+
this.resourceType = resourceType;
|
|
396
|
+
this.resourceId = resourceId;
|
|
397
|
+
if (!/^(?:\*|[a-z][a-z0-9-]*)$/.test(domain)) throw new Error(`Invalid domain: ${domain}`);
|
|
398
|
+
if (resourceType !== void 0) {
|
|
399
|
+
for (const seg of resourceType.split(":")) if (!/^(?:\*|[a-z][a-z0-9-]*)$/.test(seg)) throw new Error(`Invalid resourceType segment: '${seg}' in '${resourceType}'`);
|
|
400
|
+
}
|
|
401
|
+
if (resourceId !== void 0 && !/^(?:\*{1,2}|[a-z0-9][a-z0-9-]*)$/.test(resourceId)) throw new Error(`Invalid resourceId: ${resourceId}`);
|
|
397
402
|
}
|
|
398
403
|
/**
|
|
399
404
|
* 序列化为 URN 字符串
|
|
400
405
|
*/
|
|
401
406
|
toString() {
|
|
402
|
-
let urn = `${URN_PREFIX}${this.
|
|
403
|
-
if (this.
|
|
404
|
-
if (this.
|
|
407
|
+
let urn = `${URN_PREFIX}${this.domain}`;
|
|
408
|
+
if (this.resourceType) urn += `:${this.resourceType}`;
|
|
409
|
+
if (this.resourceId) urn += `:${this.resourceId}`;
|
|
405
410
|
return urn;
|
|
406
411
|
}
|
|
407
412
|
/**
|
|
413
|
+
* 返回 resourceType 按 `:` 拆分后的层级数组
|
|
414
|
+
*/
|
|
415
|
+
get resourceTypeSegments() {
|
|
416
|
+
return this.resourceType ? this.resourceType.split(":") : [];
|
|
417
|
+
}
|
|
418
|
+
toSegments() {
|
|
419
|
+
const segments = [this.domain];
|
|
420
|
+
if (this.resourceType) segments.push(...this.resourceType.split(":"));
|
|
421
|
+
if (this.resourceId) segments.push(this.resourceId);
|
|
422
|
+
return segments;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
408
425
|
* 衍生出资源类型级 URN
|
|
409
426
|
*
|
|
410
|
-
* @throws Error 当前 URN 已有
|
|
427
|
+
* @throws Error 当前 URN 已有 resourceType 时抛出
|
|
411
428
|
*/
|
|
412
|
-
|
|
413
|
-
if (this.
|
|
414
|
-
return new Urn(this.
|
|
429
|
+
withResourceType(resourceType) {
|
|
430
|
+
if (this.resourceType !== void 0) throw new Error(`Cannot derive ResourceTypeUrn from a URN that already has a resourceType: ${this.toString()}`);
|
|
431
|
+
return new Urn(this.domain, resourceType);
|
|
415
432
|
}
|
|
416
433
|
/**
|
|
417
434
|
* 衍生出实例级 URN
|
|
418
435
|
*
|
|
419
|
-
* @throws Error 当前 URN 无
|
|
436
|
+
* @throws Error 当前 URN 无 resourceType 或已有 resourceId 时抛出
|
|
420
437
|
*/
|
|
421
|
-
|
|
422
|
-
if (this.
|
|
423
|
-
if (this.
|
|
424
|
-
return new Urn(this.
|
|
438
|
+
withResourceId(resourceId) {
|
|
439
|
+
if (this.resourceType === void 0) throw new Error(`Cannot derive ResourceIdUrn from a URN without a resourceType: ${this.toString()}`);
|
|
440
|
+
if (this.resourceId !== void 0) throw new Error(`Cannot derive ResourceIdUrn from a URN that already has a resourceId: ${this.toString()}`);
|
|
441
|
+
return new Urn(this.domain, this.resourceType, resourceId);
|
|
425
442
|
}
|
|
426
443
|
/**
|
|
427
|
-
*
|
|
444
|
+
* 类型守卫:判断是否为概念域级 URN
|
|
428
445
|
*/
|
|
429
|
-
|
|
430
|
-
return this.
|
|
446
|
+
isDomainUrn() {
|
|
447
|
+
return this.resourceType === void 0;
|
|
431
448
|
}
|
|
432
449
|
/**
|
|
433
450
|
* 类型守卫:判断是否为资源类型级 URN
|
|
434
451
|
*/
|
|
435
|
-
|
|
436
|
-
return this.
|
|
452
|
+
isResourceTypeUrn() {
|
|
453
|
+
return this.resourceType !== void 0 && this.resourceId === void 0;
|
|
437
454
|
}
|
|
438
455
|
/**
|
|
439
456
|
* 类型守卫:判断是否为实例级 URN
|
|
440
457
|
*/
|
|
441
|
-
|
|
442
|
-
return this.
|
|
458
|
+
isResourceIdUrn() {
|
|
459
|
+
return this.resourceType !== void 0 && this.resourceId !== void 0;
|
|
443
460
|
}
|
|
444
|
-
static of(
|
|
445
|
-
return new Urn(
|
|
461
|
+
static of(domain, resourceType, resourceId) {
|
|
462
|
+
return new Urn(domain, resourceType, resourceId);
|
|
446
463
|
}
|
|
447
464
|
/**
|
|
448
|
-
* 从 URN
|
|
465
|
+
* 从 URN 字符串解析,支持通配符 `*` 和 `**`
|
|
466
|
+
*
|
|
467
|
+
* - `*` 匹配恰好一个段
|
|
468
|
+
* - `**` 匹配零个或多个尾部段(仅允许出现在末尾)
|
|
449
469
|
*
|
|
450
470
|
* @throws Error URN 格式不合法时抛出
|
|
451
471
|
*/
|
|
452
472
|
static parse(urn) {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
473
|
+
if (!urn.startsWith(URN_PREFIX)) throw new Error(`Invalid URN: ${urn}`);
|
|
474
|
+
const parts = urn.slice(9).split(":");
|
|
475
|
+
if (parts.length === 0 || parts[0] === "") throw new Error(`Invalid URN: ${urn}`);
|
|
476
|
+
const segments = [];
|
|
477
|
+
for (let i = 0; i < parts.length; i++) {
|
|
478
|
+
const part = parts[i];
|
|
479
|
+
if (part === "**") {
|
|
480
|
+
if (i !== parts.length - 1) throw new Error(`Invalid URN: '**' is only allowed at the end: ${urn}`);
|
|
481
|
+
segments.push(part);
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
if (part === "*" || /^[a-z0-9][a-z0-9-]*$/.test(part)) segments.push(part);
|
|
485
|
+
else throw new Error(`Invalid URN segment: '${part}' in ${urn}`);
|
|
486
|
+
}
|
|
487
|
+
if (segments.length === 0) throw new Error(`Invalid URN: ${urn}`);
|
|
488
|
+
const domain = segments[0];
|
|
489
|
+
let resourceType;
|
|
490
|
+
let resourceId;
|
|
491
|
+
if (segments[segments.length - 1] === "**") {
|
|
492
|
+
if (segments.length === 1) {} else if (segments.length === 2) resourceType = segments[1] !== "**" ? segments[1] : void 0;
|
|
493
|
+
else resourceType = segments.slice(1, -1).join(":");
|
|
494
|
+
resourceId = "**";
|
|
495
|
+
} else if (segments.length === 2) resourceType = segments[1];
|
|
496
|
+
else if (segments.length >= 3) {
|
|
497
|
+
resourceType = segments.slice(1, -1).join(":");
|
|
498
|
+
resourceId = segments[segments.length - 1];
|
|
499
|
+
}
|
|
500
|
+
return new Urn(domain, resourceType, resourceId);
|
|
456
501
|
}
|
|
457
502
|
/**
|
|
458
|
-
* 判断是否匹配指定的
|
|
503
|
+
* 判断是否匹配指定的 domain、resourceType 和 resourceId
|
|
459
504
|
*
|
|
460
505
|
* 仅比较传入的参数,未传入的参数不参与比较。
|
|
461
506
|
*/
|
|
462
|
-
is(
|
|
463
|
-
if (this.
|
|
464
|
-
if (
|
|
465
|
-
if (
|
|
507
|
+
is(domain, resourceType, resourceId) {
|
|
508
|
+
if (this.domain !== domain) return false;
|
|
509
|
+
if (resourceType !== void 0 && this.resourceType !== resourceType) return false;
|
|
510
|
+
if (resourceId !== void 0 && this.resourceId !== resourceId) return false;
|
|
511
|
+
return true;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* 判断当前 URN 是否包含另一个 URN
|
|
515
|
+
*
|
|
516
|
+
* 当前 URN 含通配符(`*` 或 `**`)时,作为集合模式判断:
|
|
517
|
+
* - `*` 匹配恰好一个段
|
|
518
|
+
* - `**` 匹配零个或多个尾部段(仅末尾有效)
|
|
519
|
+
*
|
|
520
|
+
* 当前 URN 为具体 URN(无通配符)时,仅包含自身(严格相等)。
|
|
521
|
+
*/
|
|
522
|
+
contains(other) {
|
|
523
|
+
const thisSegs = this.toSegments();
|
|
524
|
+
const otherSegs = other.toSegments();
|
|
525
|
+
if (thisSegs.length > 0 && thisSegs[thisSegs.length - 1] === "**") {
|
|
526
|
+
const fixedSegs = thisSegs.slice(0, -1);
|
|
527
|
+
if (otherSegs.length < fixedSegs.length) return false;
|
|
528
|
+
for (let i = 0; i < fixedSegs.length; i++) if (fixedSegs[i] !== "*" && fixedSegs[i] !== otherSegs[i]) return false;
|
|
529
|
+
return true;
|
|
530
|
+
}
|
|
531
|
+
if (thisSegs.length !== otherSegs.length) return false;
|
|
532
|
+
for (let i = 0; i < thisSegs.length; i++) if (thisSegs[i] !== "*" && thisSegs[i] !== otherSegs[i]) return false;
|
|
466
533
|
return true;
|
|
467
534
|
}
|
|
468
535
|
};
|
|
469
536
|
//#endregion
|
|
470
537
|
//#region src/modules/core/decorators/class-validator/is-urn.ts
|
|
471
538
|
const IS_URN = "isUrn";
|
|
472
|
-
const
|
|
473
|
-
const
|
|
474
|
-
const
|
|
539
|
+
const IS_DOMAIN_URN = "isDomainUrn";
|
|
540
|
+
const IS_RESOURCE_TYPE_URN = "isResourceTypeUrn";
|
|
541
|
+
const IS_RESOURCE_ID_URN = "isResourceIdUrn";
|
|
475
542
|
/**
|
|
476
543
|
* 验证字符串是否为合法的 URN(任意层级)。
|
|
477
544
|
*
|
|
@@ -501,27 +568,27 @@ function IsUrn(validationOptions) {
|
|
|
501
568
|
}
|
|
502
569
|
},
|
|
503
570
|
defaultMessage() {
|
|
504
|
-
return "$property must be a valid URN (urn:buka:<
|
|
571
|
+
return "$property must be a valid URN (urn:buka:<domain>[:<resource-type>[:<resource-id>]])";
|
|
505
572
|
}
|
|
506
573
|
}
|
|
507
574
|
});
|
|
508
575
|
};
|
|
509
576
|
}
|
|
510
577
|
/**
|
|
511
|
-
*
|
|
578
|
+
* 验证字符串是否为概念域级 URN(仅含 domain,无 resourceType 和 resourceId)。
|
|
512
579
|
*
|
|
513
580
|
* @example
|
|
514
581
|
* ```typescript
|
|
515
582
|
* class TokenPayloadDTO {
|
|
516
|
-
* @
|
|
583
|
+
* @IsDomainUrn()
|
|
517
584
|
* aud: string
|
|
518
585
|
* }
|
|
519
586
|
* ```
|
|
520
587
|
*/
|
|
521
|
-
function
|
|
588
|
+
function IsDomainUrn(validationOptions) {
|
|
522
589
|
return function(object, propertyName) {
|
|
523
590
|
(0, class_validator.registerDecorator)({
|
|
524
|
-
name:
|
|
591
|
+
name: IS_DOMAIN_URN,
|
|
525
592
|
target: object.constructor,
|
|
526
593
|
propertyName,
|
|
527
594
|
options: validationOptions,
|
|
@@ -529,33 +596,33 @@ function IsNamespaceUrn(validationOptions) {
|
|
|
529
596
|
validate(value) {
|
|
530
597
|
if (typeof value !== "string") return false;
|
|
531
598
|
try {
|
|
532
|
-
return Urn.parse(value).
|
|
599
|
+
return Urn.parse(value).isDomainUrn();
|
|
533
600
|
} catch {
|
|
534
601
|
return false;
|
|
535
602
|
}
|
|
536
603
|
},
|
|
537
604
|
defaultMessage() {
|
|
538
|
-
return "$property must be a
|
|
605
|
+
return "$property must be a domain-level URN (urn:buka:<domain>)";
|
|
539
606
|
}
|
|
540
607
|
}
|
|
541
608
|
});
|
|
542
609
|
};
|
|
543
610
|
}
|
|
544
611
|
/**
|
|
545
|
-
* 验证字符串是否为资源类型级 URN(含
|
|
612
|
+
* 验证字符串是否为资源类型级 URN(含 domain 和 resourceType,无 resourceId)。
|
|
546
613
|
*
|
|
547
614
|
* @example
|
|
548
615
|
* ```typescript
|
|
549
616
|
* class ResourceDTO {
|
|
550
|
-
* @
|
|
617
|
+
* @IsResourceTypeUrn()
|
|
551
618
|
* resourceType: string
|
|
552
619
|
* }
|
|
553
620
|
* ```
|
|
554
621
|
*/
|
|
555
|
-
function
|
|
622
|
+
function IsResourceTypeUrn(validationOptions) {
|
|
556
623
|
return function(object, propertyName) {
|
|
557
624
|
(0, class_validator.registerDecorator)({
|
|
558
|
-
name:
|
|
625
|
+
name: IS_RESOURCE_TYPE_URN,
|
|
559
626
|
target: object.constructor,
|
|
560
627
|
propertyName,
|
|
561
628
|
options: validationOptions,
|
|
@@ -563,33 +630,70 @@ function IsResourceUrn(validationOptions) {
|
|
|
563
630
|
validate(value) {
|
|
564
631
|
if (typeof value !== "string") return false;
|
|
565
632
|
try {
|
|
566
|
-
return Urn.parse(value).
|
|
633
|
+
return Urn.parse(value).isResourceTypeUrn();
|
|
567
634
|
} catch {
|
|
568
635
|
return false;
|
|
569
636
|
}
|
|
570
637
|
},
|
|
571
638
|
defaultMessage() {
|
|
572
|
-
return "$property must be a resource-level URN (urn:buka:<
|
|
639
|
+
return "$property must be a resource-type-level URN (urn:buka:<domain>:<resource-type>)";
|
|
573
640
|
}
|
|
574
641
|
}
|
|
575
642
|
});
|
|
576
643
|
};
|
|
577
644
|
}
|
|
578
645
|
/**
|
|
579
|
-
* 验证字符串是否为实例级 URN(含完整三段:
|
|
646
|
+
* 验证字符串是否为实例级 URN(含完整三段:domain、resourceType 和 resourceId)。
|
|
580
647
|
*
|
|
581
648
|
* @example
|
|
582
649
|
* ```typescript
|
|
583
650
|
* class TokenPayloadDTO {
|
|
584
|
-
* @
|
|
651
|
+
* @IsResourceIdUrn()
|
|
585
652
|
* sub: string
|
|
586
653
|
* }
|
|
587
654
|
* ```
|
|
588
655
|
*/
|
|
589
|
-
function
|
|
656
|
+
function IsResourceIdUrn(validationOptions) {
|
|
657
|
+
return function(object, propertyName) {
|
|
658
|
+
(0, class_validator.registerDecorator)({
|
|
659
|
+
name: IS_RESOURCE_ID_URN,
|
|
660
|
+
target: object.constructor,
|
|
661
|
+
propertyName,
|
|
662
|
+
options: validationOptions,
|
|
663
|
+
validator: {
|
|
664
|
+
validate(value) {
|
|
665
|
+
if (typeof value !== "string") return false;
|
|
666
|
+
try {
|
|
667
|
+
return Urn.parse(value).isResourceIdUrn();
|
|
668
|
+
} catch {
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
defaultMessage() {
|
|
673
|
+
return "$property must be a resource-id-level URN (urn:buka:<domain>:<resource-type>:<resource-id>)";
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* 验证字符串是否匹配指定的 URN 模式(支持通配符 `*` 和 `**`)。
|
|
681
|
+
*
|
|
682
|
+
* - `*` 匹配恰好一个段
|
|
683
|
+
* - `**` 匹配零个或多个尾部段
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* ```typescript
|
|
687
|
+
* class CreateClientDTO {
|
|
688
|
+
* @MatchesUrn('urn:buka:galaxy:client:*')
|
|
689
|
+
* clientUrn: string
|
|
690
|
+
* }
|
|
691
|
+
* ```
|
|
692
|
+
*/
|
|
693
|
+
function MatchesUrn(pattern, validationOptions) {
|
|
590
694
|
return function(object, propertyName) {
|
|
591
695
|
(0, class_validator.registerDecorator)({
|
|
592
|
-
name:
|
|
696
|
+
name: "matchesUrn",
|
|
593
697
|
target: object.constructor,
|
|
594
698
|
propertyName,
|
|
595
699
|
options: validationOptions,
|
|
@@ -597,13 +701,14 @@ function IsIdentifierUrn(validationOptions) {
|
|
|
597
701
|
validate(value) {
|
|
598
702
|
if (typeof value !== "string") return false;
|
|
599
703
|
try {
|
|
600
|
-
|
|
704
|
+
const urn = Urn.parse(value);
|
|
705
|
+
return Urn.parse(pattern).contains(urn);
|
|
601
706
|
} catch {
|
|
602
707
|
return false;
|
|
603
708
|
}
|
|
604
709
|
},
|
|
605
710
|
defaultMessage() {
|
|
606
|
-
return
|
|
711
|
+
return `$property must match URN pattern ${pattern}`;
|
|
607
712
|
}
|
|
608
713
|
}
|
|
609
714
|
});
|
|
@@ -10091,17 +10196,17 @@ exports.HAS_ANY_KEY = HAS_ANY_KEY;
|
|
|
10091
10196
|
exports.HasAnyKey = HasAnyKey;
|
|
10092
10197
|
exports.HttpException = HttpException;
|
|
10093
10198
|
exports.IS_CROCKFORD_BASE32 = IS_CROCKFORD_BASE32;
|
|
10094
|
-
exports.
|
|
10095
|
-
exports.
|
|
10096
|
-
exports.
|
|
10199
|
+
exports.IS_DOMAIN_URN = IS_DOMAIN_URN;
|
|
10200
|
+
exports.IS_RESOURCE_ID_URN = IS_RESOURCE_ID_URN;
|
|
10201
|
+
exports.IS_RESOURCE_TYPE_URN = IS_RESOURCE_TYPE_URN;
|
|
10097
10202
|
exports.IS_SCALAR_DICTIONARY = IS_SCALAR_DICTIONARY;
|
|
10098
10203
|
exports.IS_URN = IS_URN;
|
|
10099
10204
|
exports.InjectLogger = InjectLogger;
|
|
10100
10205
|
exports.IsBrowserRequest = IsBrowserRequest;
|
|
10101
10206
|
exports.IsCrockfordBase32 = IsCrockfordBase32;
|
|
10102
|
-
exports.
|
|
10103
|
-
exports.
|
|
10104
|
-
exports.
|
|
10207
|
+
exports.IsDomainUrn = IsDomainUrn;
|
|
10208
|
+
exports.IsResourceIdUrn = IsResourceIdUrn;
|
|
10209
|
+
exports.IsResourceTypeUrn = IsResourceTypeUrn;
|
|
10105
10210
|
exports.IsScalar = IsScalar;
|
|
10106
10211
|
exports.IsScalarDictionary = IsScalarDictionary;
|
|
10107
10212
|
exports.IsUrn = IsUrn;
|
|
@@ -10137,6 +10242,7 @@ Object.defineProperty(exports, "LoggerModule", {
|
|
|
10137
10242
|
exports.MATCH_JSON_SCHEMA = MATCH_JSON_SCHEMA;
|
|
10138
10243
|
exports.MODULE_OPTIONS_TOKEN = MODULE_OPTIONS_TOKEN;
|
|
10139
10244
|
exports.MatchJsonSchema = MatchJsonSchema;
|
|
10245
|
+
exports.MatchesUrn = MatchesUrn;
|
|
10140
10246
|
exports.Model = Model;
|
|
10141
10247
|
exports.ModelRegister = ModelRegister;
|
|
10142
10248
|
exports.ModuleExceptions = ModuleExceptions;
|