@enhance-eng/archangel 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/index.d.ts +37 -31
  2. package/package.json +8 -8
package/index.d.ts CHANGED
@@ -428,46 +428,52 @@ export interface RuleBuilders<
428
428
  X extends string = string,
429
429
  > {
430
430
  /** Each listed element may import only itself and later listed elements. */
431
- layers<const N extends string = string>(
431
+ readonly layers: <const N extends string = string>(
432
432
  order: readonly NoInfer<ElementName<E>>[],
433
433
  options?: RuleOptions & Named<N, X>,
434
- ): Rule<E, S, P>;
434
+ ) => Rule<E, S, P>;
435
435
  /** The instances of the element may not import each other. */
436
- isolate<const N extends string = string>(
436
+ readonly isolate: <const N extends string = string>(
437
437
  element: NoInfer<CapturedElement<E>>,
438
438
  options?: RuleOptions & Named<N, X>,
439
- ): Rule<E, S, P>;
439
+ ) => Rule<E, S, P>;
440
440
  /** Code outside an instance of the element may import it only through these files. */
441
- entry<const N extends string = string>(
441
+ readonly entry: <const N extends string = string>(
442
442
  element: NoInfer<ElementName<E>>,
443
443
  files: string | readonly string[],
444
444
  options?: RuleOptions & Named<N, X>,
445
- ): Rule<E, S, P>;
446
- /** A table of what each row may import, whose rows are kinds of file, parts or groups. */
447
- mayImport<const T extends string, const R extends TableRows>(
448
- name: TableName<T>,
449
- rows: R & CheckedRows<R, string, DeclaredName<E, S>>,
450
- options: TableOptions<E, S, Extract<keyof R, string>> & {
451
- /** The pattern that gives a file its kind, such as `**\/*.{kind}.ts`. */
452
- readonly kinds: string;
453
- },
454
- ): Rule<E, S, P>;
455
- /** A table whose rows are all parts or groups. */
456
- mayImport<const T extends string, const R extends TableRows>(
457
- name: TableName<T>,
458
- rows: R & CheckedRows<R, RowName<E, S>, DeclaredName<E, S>>,
459
- options?: TableOptions<E, S, Extract<keyof R, string>> & { readonly kinds?: never },
460
- ): Rule<E, S, P>;
461
- /** A rule with its name first: `files`, or `folders`, and exactly one condition. */
462
- rule<const N extends string = string>(
463
- name: OwnRuleName<N, X>,
464
- sentence: Body<Sentence<E, S> | FolderSentence | SeveralSentences<E, S> | PluginRule<E, S, P>>,
465
- ): Rule<E, S, P>;
466
- /** A rule as a sentence: `files`, or `folders`, and exactly one condition or plugin condition. */
467
- rule<const N extends string = string>(
468
- sentence: (Sentence<E, S> | FolderSentence | SeveralSentences<E, S> | PluginRule<E, S, P>) &
469
- Named<N, X>,
470
- ): Rule<E, S, P>;
445
+ ) => Rule<E, S, P>;
446
+ /** A table, written in one of two forms. */
447
+ readonly mayImport: {
448
+ /** A table of what each row may import, whose rows are kinds of file, parts or groups. */
449
+ <const T extends string, const R extends TableRows>(
450
+ name: TableName<T>,
451
+ rows: R & CheckedRows<R, string, DeclaredName<E, S>>,
452
+ options: TableOptions<E, S, Extract<keyof R, string>> & {
453
+ /** The pattern that gives a file its kind, such as `**\/*.{kind}.ts`. */
454
+ readonly kinds: string;
455
+ },
456
+ ): Rule<E, S, P>;
457
+ /** A table whose rows are all parts or groups. */
458
+ <const T extends string, const R extends TableRows>(
459
+ name: TableName<T>,
460
+ rows: R & CheckedRows<R, RowName<E, S>, DeclaredName<E, S>>,
461
+ options?: TableOptions<E, S, Extract<keyof R, string>> & { readonly kinds?: never },
462
+ ): Rule<E, S, P>;
463
+ };
464
+ /** A rule, written in one of two forms. */
465
+ readonly rule: {
466
+ /** A rule with its name first: `files`, or `folders`, and exactly one condition. */
467
+ <const N extends string = string>(
468
+ name: OwnRuleName<N, X>,
469
+ sentence: Body<Sentence<E, S> | FolderSentence | SeveralSentences<E, S> | PluginRule<E, S, P>>,
470
+ ): Rule<E, S, P>;
471
+ /** A rule as a sentence: `files`, or `folders`, and exactly one condition or plugin condition. */
472
+ <const N extends string = string>(
473
+ sentence: (Sentence<E, S> | FolderSentence | SeveralSentences<E, S> | PluginRule<E, S, P>) &
474
+ Named<N, X>,
475
+ ): Rule<E, S, P>;
476
+ };
471
477
  }
472
478
 
473
479
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enhance-eng/archangel",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Make architecture verifiable. Architecture tests for TypeScript, checked in milliseconds: imports, cycles, names, folder structure and exports.",
5
5
  "keywords": [
6
6
  "architecture",
@@ -53,13 +53,13 @@
53
53
  "pluralize": "8.0.0"
54
54
  },
55
55
  "optionalDependencies": {
56
- "@enhance-eng/archangel-darwin-arm64": "0.3.0",
57
- "@enhance-eng/archangel-darwin-x64": "0.3.0",
58
- "@enhance-eng/archangel-linux-arm64-gnu": "0.3.0",
59
- "@enhance-eng/archangel-linux-arm64-musl": "0.3.0",
60
- "@enhance-eng/archangel-linux-x64-gnu": "0.3.0",
61
- "@enhance-eng/archangel-linux-x64-musl": "0.3.0",
62
- "@enhance-eng/archangel-win32-x64": "0.3.0"
56
+ "@enhance-eng/archangel-darwin-arm64": "0.3.2",
57
+ "@enhance-eng/archangel-darwin-x64": "0.3.2",
58
+ "@enhance-eng/archangel-linux-arm64-gnu": "0.3.2",
59
+ "@enhance-eng/archangel-linux-arm64-musl": "0.3.2",
60
+ "@enhance-eng/archangel-linux-x64-gnu": "0.3.2",
61
+ "@enhance-eng/archangel-linux-x64-musl": "0.3.2",
62
+ "@enhance-eng/archangel-win32-x64": "0.3.2"
63
63
  },
64
64
  "tsd": {
65
65
  "compilerOptions": {