@akanjs/language 3.1.2-rc.4 → 3.2.0-rc.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/akanGraph.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { AkanGraph } from "akanjs/common/akanGraph.ts";
2
2
  import type * as TS from "typescript";
3
3
  import type { Ts } from "./ast";
4
- import type { FileFacts } from "./moduleFacts";
4
+ import { type AkanFactReader, type FileFacts } from "./moduleFacts";
5
5
  import type { AkanTarget } from "./nameTable";
6
6
  export interface AkanGraphSource {
7
7
  ts: Ts;
@@ -12,6 +12,7 @@ export interface AkanGraphSource {
12
12
  resolve: (fileName: string, identifier: TS.Identifier) => AkanTarget[];
13
13
  relative: (fileName: string) => string;
14
14
  ownerOf: (fileName: string) => string | null;
15
+ reader: AkanFactReader;
15
16
  digests?: boolean;
16
17
  }
17
18
  export declare class GraphBuilder {
@@ -0,0 +1,16 @@
1
+ import type { FrameworkChannel } from "akanjs/common/frameworkMap.ts";
2
+ import type * as TS from "typescript";
3
+ import type { Ts } from "./ast";
4
+ export interface FrameworkChannelSpec {
5
+ file: string;
6
+ union: string;
7
+ label: string;
8
+ /** Classes that route the channel's messages by `type` on their way to the handlers, who sit beyond the reader. */
9
+ relays?: string[];
10
+ }
11
+ export declare class FrameworkChannelReader {
12
+ #private;
13
+ constructor(ts: Ts, specs: FrameworkChannelSpec[], sources: Map<string, TS.SourceFile>);
14
+ get missing(): string[];
15
+ channels(): FrameworkChannel[];
16
+ }
@@ -0,0 +1,20 @@
1
+ import type { FrameworkMap } from "akanjs/common/frameworkMap.ts";
2
+ import type { Ts } from "./ast";
3
+ import { type FrameworkChannelSpec } from "./frameworkChannelReader";
4
+ export interface FrameworkSourcePackage {
5
+ name: string;
6
+ root: string;
7
+ split: boolean;
8
+ }
9
+ export interface FrameworkMapSource {
10
+ ts: Ts;
11
+ packages: FrameworkSourcePackage[];
12
+ files: [file: string, text: string][];
13
+ channels: FrameworkChannelSpec[];
14
+ }
15
+ export declare class FrameworkMapBuilder {
16
+ #private;
17
+ constructor(source: FrameworkMapSource);
18
+ static isSourcePath(file: string): boolean;
19
+ build(): FrameworkMap;
20
+ }
@@ -0,0 +1,10 @@
1
+ import type { FrameworkMap } from "akanjs/common/frameworkMap.ts";
2
+ export declare class FrameworkMapDoc {
3
+ #private;
4
+ static readonly regenerate = "bun run akan sync-architecture";
5
+ static render(map: FrameworkMap, docDir: string): string;
6
+ static generatedOf(markdown: string): string | null;
7
+ static splice(markdown: string, generated: string): string;
8
+ static citedClasses(markdown: string): string[];
9
+ static unknownClasses(markdown: string, map: FrameworkMap): string[];
10
+ }