@rotorsoft/act-diagram 1.4.0 → 1.4.1
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/.tsbuildinfo +1 -1
- package/dist/@types/cli/contract-index.d.ts +1 -1
- package/dist/@types/cli/contract-index.d.ts.map +1 -1
- package/dist/@types/cli/format.d.ts +19 -0
- package/dist/@types/cli/format.d.ts.map +1 -1
- package/dist/@types/cli/markdown.d.ts +9 -0
- package/dist/@types/cli/markdown.d.ts.map +1 -1
- package/dist/cli/act.js +13 -61
- package/dist/cli/act.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -68,12 +68,12 @@ export declare function build_contract_index(model: DomainModel): ContractIndex;
|
|
|
68
68
|
* Accepts singular and plural forms.
|
|
69
69
|
*/
|
|
70
70
|
export declare const CATEGORY_KEYWORDS: Record<string, Kind>;
|
|
71
|
-
/** Return every entry of a given kind, sorted by name. */
|
|
72
71
|
/** The action named `name`, on the state named `qualifier` when given. */
|
|
73
72
|
export declare function find_action(model: DomainModel, name: string, qualifier?: string): {
|
|
74
73
|
action?: ActionNode;
|
|
75
74
|
state_file?: string;
|
|
76
75
|
};
|
|
76
|
+
/** Return every entry of a given kind, sorted by name. */
|
|
77
77
|
export declare function list_by_kind(idx: ContractIndex, kind: Kind): IndexEntry[];
|
|
78
78
|
/**
|
|
79
79
|
* Fuzzy substring search across the index. Case-insensitive. Ranks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-index.d.ts","sourceRoot":"","sources":["../../../src/cli/contract-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAExE,MAAM,MAAM,IAAI,GACZ,OAAO,GACP,QAAQ,GACR,OAAO,GACP,YAAY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b;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,CA8EtE;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAalD,CAAC;AAEF,0EAA0E;AAC1E,wBAAgB,WAAW,CACzB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB;IAAE,MAAM,CAAC,EAAE,UAAU,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAO9C;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU,EAAE,CAIzE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,SAAK,GACT,UAAU,EAAE,CAoBd"}
|
|
@@ -5,9 +5,28 @@
|
|
|
5
5
|
* unconditionally — picocolors no-ops when stdout doesn't support color,
|
|
6
6
|
* so test snapshots can drop ANSI escapes if needed.
|
|
7
7
|
*/
|
|
8
|
+
import type { DomainModel } from "../client/types/index.js";
|
|
8
9
|
import { type ContractIndex, type IndexEntry } from "./contract-index.js";
|
|
10
|
+
export declare const loc: (file?: string, line?: number) => string;
|
|
9
11
|
/** Format a "matches" list view (multiple search results). */
|
|
10
12
|
export declare function format_matches(query: string, matches: IndexEntry[]): string;
|
|
13
|
+
export declare const find_actions_emitting: (model: DomainModel, event_name: string) => Array<{
|
|
14
|
+
state: string;
|
|
15
|
+
action: string;
|
|
16
|
+
file?: string;
|
|
17
|
+
line?: number;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const find_reactions_for: (model: DomainModel, event_name: string) => Array<{
|
|
20
|
+
slice?: string;
|
|
21
|
+
handler: string;
|
|
22
|
+
dispatches: string[];
|
|
23
|
+
file?: string;
|
|
24
|
+
line?: number;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const find_projections_for: (model: DomainModel, event_name: string) => Array<{
|
|
27
|
+
name: string;
|
|
28
|
+
file?: string;
|
|
29
|
+
}>;
|
|
11
30
|
/** Detailed event view: schema, producers, consumers, deprecation. */
|
|
12
31
|
export declare function format_event(idx: ContractIndex, entry: IndexEntry): string;
|
|
13
32
|
export declare function format_action(idx: ContractIndex, entry: IndexEntry): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/cli/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/cli/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAc5D,OAAO,EACL,KAAK,aAAa,EAIlB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,GAAG,UAAW,MAAM,SAAS,MAAM,KAAG,MAGlD,CAAC;AAYF,8DAA8D;AAC9D,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAY3E;AAED,eAAO,MAAM,qBAAqB,UACzB,WAAW,cACN,MAAM,KACjB,KAAK,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAoBA,CAAC;AAEF,eAAO,MAAM,kBAAkB,UACtB,WAAW,cACN,MAAM,KACjB,KAAK,CAAC;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAgCA,CAAC;AAEF,eAAO,MAAM,oBAAoB,UACxB,WAAW,cACN,MAAM,KACjB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAGS,CAAC;AAElD,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAoE1E;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAyB3E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CA8C1E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAkC1E;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,UAAU,GAChB,MAAM,CAWR;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAwC7E;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,MAAM,EACN,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,KAAK,MAAM,CAQlD,CAAC;AAEF,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAG3E;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAazD"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render the full contract index as a Markdown registry. One section
|
|
3
|
+
* per kind, one subsection per entity. Used by `act --markdown` for
|
|
4
|
+
* pipe-friendly output that diffs cleanly between branches.
|
|
5
|
+
*
|
|
6
|
+
* Output is plain ASCII (no ANSI escapes) regardless of `picocolors`
|
|
7
|
+
* settings — readers expect Markdown to be paste-able into a PR body
|
|
8
|
+
* or a static doc file.
|
|
9
|
+
*/
|
|
1
10
|
import { type ContractIndex } from "./contract-index.js";
|
|
2
11
|
export declare function format_markdown(idx: ContractIndex): string;
|
|
3
12
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/cli/markdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/cli/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,KAAK,aAAa,EAKnB,MAAM,qBAAqB,CAAC;AAyB7B,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA4M1D"}
|
package/dist/cli/act.js
CHANGED
|
@@ -2011,56 +2011,8 @@ async function load_project(root_dir, opts = {}) {
|
|
|
2011
2011
|
}
|
|
2012
2012
|
|
|
2013
2013
|
// src/cli/markdown.ts
|
|
2014
|
-
var loc2 = (file, line) => {
|
|
2015
|
-
if (!file) return "";
|
|
2016
|
-
return line ? `${file}:${line}` : file;
|
|
2017
|
-
};
|
|
2018
|
-
var find_actions_emitting2 = (model, event_name) => {
|
|
2019
|
-
const out = [];
|
|
2020
|
-
for (const st of model.states) {
|
|
2021
|
-
for (const act of st.actions) {
|
|
2022
|
-
if (act.emits.includes(event_name)) {
|
|
2023
|
-
out.push({
|
|
2024
|
-
state: st.name,
|
|
2025
|
-
action: act.name,
|
|
2026
|
-
file: st.file,
|
|
2027
|
-
line: act.line
|
|
2028
|
-
});
|
|
2029
|
-
}
|
|
2030
|
-
}
|
|
2031
|
-
}
|
|
2032
|
-
return out;
|
|
2033
|
-
};
|
|
2034
|
-
var find_reactions_for2 = (model, event_name) => {
|
|
2035
|
-
const out = [];
|
|
2036
|
-
for (const sl of model.slices) {
|
|
2037
|
-
for (const r2 of sl.reactions) {
|
|
2038
|
-
if (r2.event === event_name) {
|
|
2039
|
-
out.push({
|
|
2040
|
-
slice: sl.name,
|
|
2041
|
-
handler: r2.handlerName,
|
|
2042
|
-
dispatches: r2.dispatches,
|
|
2043
|
-
file: r2.file ?? sl.file,
|
|
2044
|
-
line: r2.line
|
|
2045
|
-
});
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
for (const r2 of model.reactions) {
|
|
2050
|
-
if (r2.event === event_name) {
|
|
2051
|
-
out.push({
|
|
2052
|
-
handler: r2.handlerName,
|
|
2053
|
-
dispatches: r2.dispatches,
|
|
2054
|
-
file: r2.file,
|
|
2055
|
-
line: r2.line
|
|
2056
|
-
});
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
return out;
|
|
2060
|
-
};
|
|
2061
|
-
var find_projections_for2 = (model, event_name) => model.projections.filter((p) => p.handles.includes(event_name)).map((p) => ({ name: p.name, file: p.file }));
|
|
2062
2014
|
var file_suffix = (file, line) => {
|
|
2063
|
-
const l2 =
|
|
2015
|
+
const l2 = loc(file, line);
|
|
2064
2016
|
return l2 ? ` *(${l2})*` : "";
|
|
2065
2017
|
};
|
|
2066
2018
|
var render_schema = (s) => {
|
|
@@ -2100,12 +2052,12 @@ function format_markdown(idx) {
|
|
|
2100
2052
|
const status = event_status(e.name, event_names_for(idx, owning_state));
|
|
2101
2053
|
const status_label = status.status === "active" ? "active" : `deprecated \u2014 superseded by **${status.superseded_by}**`;
|
|
2102
2054
|
lines.push(`### \`${e.name}\``);
|
|
2103
|
-
if (e.file) lines.push(`- **defined in:** \`${
|
|
2055
|
+
if (e.file) lines.push(`- **defined in:** \`${loc(e.file, e.line)}\``);
|
|
2104
2056
|
if (owning_state && owning_state !== e.name)
|
|
2105
2057
|
lines.push(`- **on state:** \`${owning_state}\``);
|
|
2106
2058
|
lines.push(`- **schema:** ${render_schema(schema)}`);
|
|
2107
2059
|
lines.push(`- **status:** ${status_label}`);
|
|
2108
|
-
const producers =
|
|
2060
|
+
const producers = find_actions_emitting(m, e.name);
|
|
2109
2061
|
if (producers.length > 0) {
|
|
2110
2062
|
lines.push("- **producers:**");
|
|
2111
2063
|
for (const p of producers)
|
|
@@ -2115,8 +2067,8 @@ function format_markdown(idx) {
|
|
|
2115
2067
|
} else {
|
|
2116
2068
|
lines.push("- **producers:** _(none)_");
|
|
2117
2069
|
}
|
|
2118
|
-
const reactions2 =
|
|
2119
|
-
const projections2 =
|
|
2070
|
+
const reactions2 = find_reactions_for(m, e.name);
|
|
2071
|
+
const projections2 = find_projections_for(m, e.name);
|
|
2120
2072
|
if (reactions2.length === 0 && projections2.length === 0) {
|
|
2121
2073
|
lines.push("- **consumers:** _(none)_");
|
|
2122
2074
|
} else {
|
|
@@ -2143,7 +2095,7 @@ function format_markdown(idx) {
|
|
|
2143
2095
|
if (a2.qualifier) lines.push(`- **on state:** \`${a2.qualifier}\``);
|
|
2144
2096
|
if (state_file)
|
|
2145
2097
|
lines.push(
|
|
2146
|
-
`- **defined in:** \`${
|
|
2098
|
+
`- **defined in:** \`${loc(state_file, action?.line ?? a2.line)}\``
|
|
2147
2099
|
);
|
|
2148
2100
|
if (action) {
|
|
2149
2101
|
const preconditions = action.preconditions ?? action.invariants;
|
|
@@ -2167,7 +2119,7 @@ function format_markdown(idx) {
|
|
|
2167
2119
|
for (const s of states) {
|
|
2168
2120
|
const st = m.states.find((x) => x.name === s.name);
|
|
2169
2121
|
lines.push(`### \`${s.name}\``);
|
|
2170
|
-
if (s.file) lines.push(`- **defined in:** \`${
|
|
2122
|
+
if (s.file) lines.push(`- **defined in:** \`${loc(s.file, s.line)}\``);
|
|
2171
2123
|
if (st) {
|
|
2172
2124
|
if (st.actions.length > 0)
|
|
2173
2125
|
lines.push(
|
|
@@ -2187,7 +2139,7 @@ function format_markdown(idx) {
|
|
|
2187
2139
|
for (const s of slices) {
|
|
2188
2140
|
const sl = m.slices.find((x) => x.name === s.name);
|
|
2189
2141
|
lines.push(`### \`${s.name}\``);
|
|
2190
|
-
if (s.file) lines.push(`- **defined in:** \`${
|
|
2142
|
+
if (s.file) lines.push(`- **defined in:** \`${loc(s.file, s.line)}\``);
|
|
2191
2143
|
if (sl) {
|
|
2192
2144
|
if (sl.error) lines.push(`- **error:** ${sl.error}`);
|
|
2193
2145
|
if (sl.states.length > 0)
|
|
@@ -2217,7 +2169,7 @@ function format_markdown(idx) {
|
|
|
2217
2169
|
for (const p of projections) {
|
|
2218
2170
|
const pr = m.projections.find((x) => x.name === p.name);
|
|
2219
2171
|
lines.push(`### \`${p.name}\``);
|
|
2220
|
-
if (pr?.file) lines.push(`- **defined in:** \`${
|
|
2172
|
+
if (pr?.file) lines.push(`- **defined in:** \`${loc(pr.file, pr.line)}\``);
|
|
2221
2173
|
if (pr && pr.handles.length > 0)
|
|
2222
2174
|
lines.push(
|
|
2223
2175
|
`- **handles:** ${pr.handles.map((x) => `\`${x}\``).join(", ")}`
|
|
@@ -2234,7 +2186,7 @@ function format_markdown(idx) {
|
|
|
2234
2186
|
if (slice_name && slice_name !== "*")
|
|
2235
2187
|
lines.push(`- **in slice:** \`${slice_name}\``);
|
|
2236
2188
|
if (event_name) lines.push(`- **on event:** \`${event_name}\``);
|
|
2237
|
-
if (r2.file) lines.push(`- **defined in:** \`${
|
|
2189
|
+
if (r2.file) lines.push(`- **defined in:** \`${loc(r2.file, r2.line)}\``);
|
|
2238
2190
|
const slice_reaction = m.slices.find((x) => x.name === slice_name)?.reactions.find(
|
|
2239
2191
|
(rr) => rr.handlerName === r2.name && rr.event === event_name
|
|
2240
2192
|
);
|
|
@@ -3274,7 +3226,7 @@ function position_at(content, index) {
|
|
|
3274
3226
|
const before = content.slice(0, index);
|
|
3275
3227
|
const line = before.split("\n").length;
|
|
3276
3228
|
const last_nl = before.lastIndexOf("\n");
|
|
3277
|
-
const col = index - (last_nl
|
|
3229
|
+
const col = index - Math.max(last_nl, 0);
|
|
3278
3230
|
return { line, col };
|
|
3279
3231
|
}
|
|
3280
3232
|
function build_patterns(esc, type) {
|
|
@@ -3594,8 +3546,8 @@ var count_by_kind = (idx, kind) => {
|
|
|
3594
3546
|
return idx.entries.filter((e) => e.kind === kind).length;
|
|
3595
3547
|
};
|
|
3596
3548
|
var label_entry = (e) => {
|
|
3597
|
-
const
|
|
3598
|
-
const where =
|
|
3549
|
+
const loc2 = e.file ? `${e.file}${e.line ? `:${e.line}` : ""}` : "";
|
|
3550
|
+
const where = loc2 ? ` ${dim(loc2)}` : "";
|
|
3599
3551
|
const qual = e.qualifier ? dim(` (${e.qualifier})`) : "";
|
|
3600
3552
|
const colored = kind_color[e.kind](e.name);
|
|
3601
3553
|
return `${colored}${qual}${where}`;
|