@mantaq/inspect 0.0.0 → 0.2.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/LICENSE +21 -0
- package/README.md +96 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +108 -0
- package/dist/drive.d.mts +7 -0
- package/dist/drive.mjs +92 -0
- package/dist/index.d.mts +152 -0
- package/dist/index.mjs +4 -0
- package/dist/inspect-DvQtAcwv.d.mts +66 -0
- package/dist/live-entry.d.mts +1 -0
- package/dist/live-entry.mjs +106 -0
- package/dist/load-DOwsxTyL.mjs +1840 -0
- package/dist/page-rr9IQ-4k.mjs +38 -0
- package/dist/run-B5huYj_r.mjs +117 -0
- package/dist/run-BLt0mwXe.d.mts +60 -0
- package/dist/vite.d.mts +11 -0
- package/dist/vite.mjs +159 -0
- package/package.json +53 -5
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { serializeViz, standaloneHtml } from "@mantaq/viz";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { build } from "vite";
|
|
5
|
+
// src/page.ts
|
|
6
|
+
/** The viewer as one classic script, built from `@mantaq/viz/standalone`, plus its stylesheets. */
|
|
7
|
+
async function viewerBundle() {
|
|
8
|
+
const entry = fileURLToPath(import.meta.resolve("@mantaq/viz/standalone"));
|
|
9
|
+
const output = await build({
|
|
10
|
+
configFile: false,
|
|
11
|
+
logLevel: "silent",
|
|
12
|
+
build: {
|
|
13
|
+
write: false,
|
|
14
|
+
minify: true,
|
|
15
|
+
cssCodeSplit: false,
|
|
16
|
+
lib: {
|
|
17
|
+
entry,
|
|
18
|
+
formats: ["iife"],
|
|
19
|
+
name: "MantaqViz",
|
|
20
|
+
fileName: () => "viz.js"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
script: (Array.isArray(output) ? output : [output]).flatMap((each) => "output" in each ? each.output : []).flatMap((file) => file.type === "chunk" ? [file.code] : []).join("\n"),
|
|
26
|
+
css: ["@mantaq/viz/viewer.css", "@mantaq/viz/page.css"].map((id) => readFileSync(fileURLToPath(import.meta.resolve(id)), "utf8")).join("\n")
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** A self-contained HTML page for `document`: open it from disk, attach it, commit it. */
|
|
30
|
+
async function htmlPage(document, title) {
|
|
31
|
+
const bundle = await viewerBundle();
|
|
32
|
+
return standaloneHtml({
|
|
33
|
+
title,
|
|
34
|
+
...bundle,
|
|
35
|
+
document: serializeViz(document)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export { htmlPage as t };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Either } from "@mantaq/utils";
|
|
2
|
+
// src/fuzz/run.ts
|
|
3
|
+
const ERROR_STATE = "__error";
|
|
4
|
+
function eventTypes(options, key) {
|
|
5
|
+
if (typeof options !== "object" || options === null) return [];
|
|
6
|
+
const list = Reflect.get(options, key);
|
|
7
|
+
if (!Array.isArray(list)) return [];
|
|
8
|
+
return list.flatMap((entry) => {
|
|
9
|
+
if (typeof entry !== "object" || entry === null) return [];
|
|
10
|
+
const type = Reflect.get(entry, "type");
|
|
11
|
+
return typeof type === "string" ? [type] : [];
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** Declared inputs and internal events, each sorted. */
|
|
15
|
+
function eventCatalog(actor) {
|
|
16
|
+
return {
|
|
17
|
+
inputs: eventTypes(actor.options, "inputs").sort(),
|
|
18
|
+
internal: eventTypes(actor.options, "internal").sort()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** onAny handlers live under this key in the dispatch map (core builder). */
|
|
22
|
+
const ANY_KEY = "Any";
|
|
23
|
+
function handles(actor, event) {
|
|
24
|
+
const transitions = actor.options?.transitions;
|
|
25
|
+
return transitions?.[actor.state.name]?.[event] !== void 0 || transitions?.[ANY_KEY]?.[event] !== void 0;
|
|
26
|
+
}
|
|
27
|
+
function toEvent(step) {
|
|
28
|
+
return step.payload === null ? { type: step.event } : {
|
|
29
|
+
type: step.event,
|
|
30
|
+
payload: step.payload
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function messageOf(error) {
|
|
34
|
+
return error instanceof Error ? `${error.name}: ${error.message}` : String(error);
|
|
35
|
+
}
|
|
36
|
+
function featuresOf(trace) {
|
|
37
|
+
const features = /* @__PURE__ */ new Set();
|
|
38
|
+
for (const state of trace.visited) features.add(`state:${state}`);
|
|
39
|
+
for (const seen of trace.observations) features.add(seen.transitioned ? `edge:${seen.from}>${seen.event}>${seen.to}` : `stay:${seen.from}>${seen.event}`);
|
|
40
|
+
for (const error of trace.errors) features.add(`error:${error.from}>${error.event}`);
|
|
41
|
+
return [...features].sort();
|
|
42
|
+
}
|
|
43
|
+
/** JSON text of the context, or null when it is not serializable (functions, cycles). */
|
|
44
|
+
function contextText(actor) {
|
|
45
|
+
const text = Either.from(() => JSON.stringify(actor.context ?? null));
|
|
46
|
+
return Either.isRight(text) ? text[1] : null;
|
|
47
|
+
}
|
|
48
|
+
function parsed(text) {
|
|
49
|
+
return text === null ? null : JSON.parse(text);
|
|
50
|
+
}
|
|
51
|
+
/** The one step function: the fuzzer and the live driver both apply steps through it. */
|
|
52
|
+
function applyStep(actor, context) {
|
|
53
|
+
const { step } = context;
|
|
54
|
+
if (step.kind === "advance") context.clock.advance(step.ms);
|
|
55
|
+
else if (context.internal.has(step.event)) {
|
|
56
|
+
if (handles(actor, step.event)) actor.inject(toEvent(step));
|
|
57
|
+
} else actor.send(toEvent(step));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Replay steps against a fresh actor. Synchronous and deterministic: effects
|
|
61
|
+
* only run via the virtual clock, and nothing here reads wall time.
|
|
62
|
+
*/
|
|
63
|
+
function execute(target, steps) {
|
|
64
|
+
const { actor, clock } = target.create();
|
|
65
|
+
const internal = new Set(eventCatalog(actor).internal);
|
|
66
|
+
const visited = [actor.state.name];
|
|
67
|
+
const observations = [];
|
|
68
|
+
const errors = [];
|
|
69
|
+
const contextSteps = [];
|
|
70
|
+
let index = 0;
|
|
71
|
+
actor.on("transition", { fn: ({ event, from, to, transitioned, effects }) => {
|
|
72
|
+
const context = parsed(contextText(actor));
|
|
73
|
+
observations.push({
|
|
74
|
+
from,
|
|
75
|
+
event: event.type,
|
|
76
|
+
to,
|
|
77
|
+
transitioned,
|
|
78
|
+
effects,
|
|
79
|
+
step: index,
|
|
80
|
+
payload: event.payload,
|
|
81
|
+
context
|
|
82
|
+
});
|
|
83
|
+
if (transitioned) visited.push(to);
|
|
84
|
+
} });
|
|
85
|
+
actor.on("error", { fn: (info) => {
|
|
86
|
+
errors.push({
|
|
87
|
+
from: info.state.name,
|
|
88
|
+
event: info.event.type,
|
|
89
|
+
message: messageOf(info.error),
|
|
90
|
+
step: index
|
|
91
|
+
});
|
|
92
|
+
} });
|
|
93
|
+
for (const step of steps) {
|
|
94
|
+
if (actor.state.name === ERROR_STATE) break;
|
|
95
|
+
const before = contextText(actor);
|
|
96
|
+
applyStep(actor, {
|
|
97
|
+
step,
|
|
98
|
+
clock,
|
|
99
|
+
internal
|
|
100
|
+
});
|
|
101
|
+
if (contextText(actor) !== before) contextSteps.push(index);
|
|
102
|
+
index += 1;
|
|
103
|
+
}
|
|
104
|
+
actor.dispose();
|
|
105
|
+
return {
|
|
106
|
+
visited,
|
|
107
|
+
observations,
|
|
108
|
+
errors,
|
|
109
|
+
contextSteps,
|
|
110
|
+
features: featuresOf({
|
|
111
|
+
visited,
|
|
112
|
+
observations,
|
|
113
|
+
errors
|
|
114
|
+
})
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export { messageOf as a, execute as i, contextText as n, parsed as o, eventCatalog as r, applyStep as t };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { VizJson, VizStep } from "@mantaq/viz";
|
|
2
|
+
import { AnyActor, VirtualClock } from "@mantaq/core";
|
|
3
|
+
/** A machine the fuzzer can drive: a fresh actor plus the virtual clock it runs on. */
|
|
4
|
+
interface FuzzTarget {
|
|
5
|
+
id: string;
|
|
6
|
+
create(): {
|
|
7
|
+
actor: AnyActor<unknown>;
|
|
8
|
+
clock: VirtualClock;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Sample payloads per event type. Payload types are erased at runtime, so
|
|
12
|
+
* the fuzzer only mutates shapes it was given. Events without samples are
|
|
13
|
+
* sent without a payload.
|
|
14
|
+
*/
|
|
15
|
+
payloads?: Readonly<Record<string, ReadonlyArray<VizJson>>>;
|
|
16
|
+
}
|
|
17
|
+
interface Observation {
|
|
18
|
+
from: string;
|
|
19
|
+
event: string;
|
|
20
|
+
to: string;
|
|
21
|
+
transitioned: boolean;
|
|
22
|
+
/** Names of the effects that ran on entry into `to`. */
|
|
23
|
+
effects: string[];
|
|
24
|
+
/** Index of the step that caused it. */
|
|
25
|
+
step: number;
|
|
26
|
+
/** Payload the handler received (for branch-distance guidance). */
|
|
27
|
+
payload: unknown;
|
|
28
|
+
/** JSON copy of the actor context right after the handler ran; null if not JSON. */
|
|
29
|
+
context: unknown;
|
|
30
|
+
}
|
|
31
|
+
interface RunError {
|
|
32
|
+
from: string;
|
|
33
|
+
event: string;
|
|
34
|
+
message: string;
|
|
35
|
+
/** Index of the step that triggered it. */
|
|
36
|
+
step: number;
|
|
37
|
+
}
|
|
38
|
+
interface Trace {
|
|
39
|
+
visited: string[];
|
|
40
|
+
observations: Observation[];
|
|
41
|
+
errors: RunError[];
|
|
42
|
+
/** Indices of steps after which the actor context differed: loop candidates. */
|
|
43
|
+
contextSteps: number[];
|
|
44
|
+
/**
|
|
45
|
+
* Coverage features, sorted: `state:x`, `edge:a>e>b` (state changed or
|
|
46
|
+
* re-entered), `stay:a>e` (handled, no change), `error:a>e` (handler threw).
|
|
47
|
+
*/
|
|
48
|
+
features: string[];
|
|
49
|
+
}
|
|
50
|
+
/** Declared inputs and internal events, each sorted. */
|
|
51
|
+
declare function eventCatalog(actor: AnyActor<unknown>): {
|
|
52
|
+
inputs: string[];
|
|
53
|
+
internal: string[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Replay steps against a fresh actor. Synchronous and deterministic: effects
|
|
57
|
+
* only run via the virtual clock, and nothing here reads wall time.
|
|
58
|
+
*/
|
|
59
|
+
declare function execute(target: FuzzTarget, steps: ReadonlyArray<VizStep>): Trace;
|
|
60
|
+
export { eventCatalog as a, Trace as i, Observation as n, execute as o, RunError as r, FuzzTarget as t };
|
package/dist/vite.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as FuzzSettings } from "./inspect-DvQtAcwv.mjs";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
export interface MantaqVizOptions {
|
|
4
|
+
/** Files that export machines: paths or globs, relative to the Vite root. */
|
|
5
|
+
machines: string | string[];
|
|
6
|
+
/** Where the page is served. Default `/__mantaq/`. */
|
|
7
|
+
base?: string;
|
|
8
|
+
/** `false` = structure only. Default: 500 iterations, so a save redraws quickly. */
|
|
9
|
+
fuzz?: false | FuzzSettings;
|
|
10
|
+
}
|
|
11
|
+
export declare function mantaqViz(options: MantaqVizOptions): Plugin[];
|
package/dist/vite.mjs
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { c as projectRoot, i as runOf, l as vizDocument, n as inspectEntry, s as machineId, t as entryId, u as analyzeModule } from "./load-DOwsxTyL.mjs";
|
|
2
|
+
import { UPDATE_EVENT, livePageHtml, serializeViz } from "@mantaq/viz";
|
|
3
|
+
import { Either } from "@mantaq/utils";
|
|
4
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
5
|
+
import { globSync, readFileSync } from "node:fs";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { searchForWorkspaceRoot } from "vite";
|
|
8
|
+
// src/vite.ts
|
|
9
|
+
/**
|
|
10
|
+
* Vite plugin: a live page of your machines on your own dev server.
|
|
11
|
+
*
|
|
12
|
+
* // vite.config.ts
|
|
13
|
+
* import { mantaqViz } from "@mantaq/inspect/vite";
|
|
14
|
+
* export default defineConfig({ plugins: [mantaqViz({ machines: "src/**\/*.machine.ts" })] });
|
|
15
|
+
*
|
|
16
|
+
* Open `/__mantaq/` while the dev server runs. Machines load through your own
|
|
17
|
+
* Vite config (aliases, tsconfig paths), are inspected on the server, and the
|
|
18
|
+
* page redraws, keeping the walk, when you save a file.
|
|
19
|
+
*/
|
|
20
|
+
const STYLESHEETS = ["@mantaq/viz/viewer.css", "@mantaq/viz/page.css"];
|
|
21
|
+
const DEV_ITERATIONS = 500;
|
|
22
|
+
const TARGETS = "virtual:mantaq/targets";
|
|
23
|
+
const TARGETS_RESOLVED = `\0${TARGETS}`;
|
|
24
|
+
function createExpression(found, index) {
|
|
25
|
+
const callee = `m${index}[${JSON.stringify(found.name)}]`;
|
|
26
|
+
const call = found.call === "clock" ? `${callee}(VirtualClock())` : found.call === "options" ? `${callee}({ clock: VirtualClock() })` : `${callee}()`;
|
|
27
|
+
return found.unwrap === "actor" ? `${call}.actor` : call;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Source of `virtual:mantaq/targets`: one factory per exported actor factory,
|
|
31
|
+
* shaped by its type (`call`, `clock`, `options`). A bare actor export cannot
|
|
32
|
+
* be recreated, so it gets none. Like the server-side inspection, plain actors
|
|
33
|
+
* are skipped when a file has factories.
|
|
34
|
+
*/
|
|
35
|
+
function targetsSource(files) {
|
|
36
|
+
const core = fileURLToPath(import.meta.resolve("@mantaq/core"));
|
|
37
|
+
const imports = [];
|
|
38
|
+
const entries = [];
|
|
39
|
+
files.forEach((file, index) => {
|
|
40
|
+
const analysis = analyzeModule({
|
|
41
|
+
file,
|
|
42
|
+
root: projectRoot(file)
|
|
43
|
+
});
|
|
44
|
+
if (Either.isLeft(analysis)) return;
|
|
45
|
+
const factories = analysis[1].machines.filter((found) => found.call !== "instance");
|
|
46
|
+
if (factories.length === 0) return;
|
|
47
|
+
imports.push(`import * as m${index} from ${JSON.stringify(file)};`);
|
|
48
|
+
for (const found of factories) entries.push(` ${JSON.stringify(machineId(found.name))}: () => { const actor = ${createExpression(found, index)}; return { actor, clock: actor.clock }; },`);
|
|
49
|
+
});
|
|
50
|
+
return [
|
|
51
|
+
`import { VirtualClock } from ${JSON.stringify(core)};`,
|
|
52
|
+
...imports,
|
|
53
|
+
"export const targets = {",
|
|
54
|
+
...entries,
|
|
55
|
+
"};"
|
|
56
|
+
].join("\n");
|
|
57
|
+
}
|
|
58
|
+
function machineFiles(root, patterns) {
|
|
59
|
+
const files = patterns.flatMap((pattern) => globSync(pattern, { cwd: root }));
|
|
60
|
+
return [...new Set(files.map((file) => isAbsolute(file) ? file : resolve(root, file)))].sort();
|
|
61
|
+
}
|
|
62
|
+
async function documentText(server, context) {
|
|
63
|
+
const results = [];
|
|
64
|
+
for (const file of context.files) {
|
|
65
|
+
const run = runOf(await server.ssrLoadModule(entryId(file)));
|
|
66
|
+
results.push(run === null ? {
|
|
67
|
+
machines: [],
|
|
68
|
+
warnings: [`${file}: could not load the inspector`]
|
|
69
|
+
} : await run({ fuzz: context.fuzz }));
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
text: serializeViz(vizDocument(results.flatMap((result) => result.machines))),
|
|
73
|
+
warnings: results.flatMap((result) => result.warnings)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function mantaqViz(options) {
|
|
77
|
+
const base = (options.base ?? "/__mantaq/").replace(/\/?$/, "/");
|
|
78
|
+
const patterns = Array.isArray(options.machines) ? options.machines : [options.machines];
|
|
79
|
+
const fuzz = options.fuzz ?? { iterations: DEV_ITERATIONS };
|
|
80
|
+
const live = fileURLToPath(import.meta.resolve(import.meta.url.endsWith(".ts") ? "./live-entry.ts" : "./live-entry.mjs"));
|
|
81
|
+
const viz = dirname(dirname(fileURLToPath(import.meta.resolve("@mantaq/viz/live"))));
|
|
82
|
+
let root = process.cwd();
|
|
83
|
+
return [
|
|
84
|
+
inspectEntry(),
|
|
85
|
+
{
|
|
86
|
+
name: "mantaq-viz-targets",
|
|
87
|
+
apply: "serve",
|
|
88
|
+
configResolved: (config) => {
|
|
89
|
+
root = config.root;
|
|
90
|
+
},
|
|
91
|
+
resolveId: (id) => id === TARGETS ? TARGETS_RESOLVED : null,
|
|
92
|
+
load: (id) => id === TARGETS_RESOLVED ? targetsSource(machineFiles(root, patterns)) : null
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "mantaq-viz",
|
|
96
|
+
apply: "serve",
|
|
97
|
+
config: (config) => ({ server: { fs: { allow: [
|
|
98
|
+
searchForWorkspaceRoot(config.root ?? process.cwd()),
|
|
99
|
+
dirname(dirname(live)),
|
|
100
|
+
viz
|
|
101
|
+
] } } }),
|
|
102
|
+
configureServer(server) {
|
|
103
|
+
let cached = null;
|
|
104
|
+
const build = async () => {
|
|
105
|
+
const { text, warnings } = await documentText(server, {
|
|
106
|
+
files: machineFiles(server.config.root, patterns),
|
|
107
|
+
fuzz
|
|
108
|
+
});
|
|
109
|
+
for (const warning of warnings) server.config.logger.warn(`[mantaq-viz] ${warning}`);
|
|
110
|
+
return text;
|
|
111
|
+
};
|
|
112
|
+
server.watcher.on("all", (_event, path) => {
|
|
113
|
+
if (!/\.[cm]?[jt]sx?$/.test(path)) return;
|
|
114
|
+
cached = null;
|
|
115
|
+
const generated = server.moduleGraph.getModuleById(TARGETS_RESOLVED);
|
|
116
|
+
if (generated !== void 0) server.moduleGraph.invalidateModule(generated);
|
|
117
|
+
server.environments.ssr.moduleGraph.invalidateAll();
|
|
118
|
+
server.ws.send({
|
|
119
|
+
type: "custom",
|
|
120
|
+
event: UPDATE_EVENT
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
server.middlewares.use((request, response, next) => {
|
|
124
|
+
const path = request.url?.split("?")[0];
|
|
125
|
+
if (path === `${base}viz.json`) {
|
|
126
|
+
cached ??= build();
|
|
127
|
+
cached.then((text) => {
|
|
128
|
+
response.setHeader("content-type", "application/json");
|
|
129
|
+
response.end(text);
|
|
130
|
+
}, (error) => {
|
|
131
|
+
cached = null;
|
|
132
|
+
response.statusCode = 500;
|
|
133
|
+
response.end(String(error));
|
|
134
|
+
});
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (path !== base && path !== base.slice(0, -1)) {
|
|
138
|
+
next();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const html = livePageHtml({
|
|
142
|
+
title: "mantaq viz",
|
|
143
|
+
source: `${base}viz.json`,
|
|
144
|
+
entry: `/@fs${live}`,
|
|
145
|
+
css: STYLESHEETS.map((id) => readFileSync(fileURLToPath(import.meta.resolve(id)), "utf8")).join("\n")
|
|
146
|
+
});
|
|
147
|
+
server.transformIndexHtml(request.url ?? base, html).then((page) => {
|
|
148
|
+
response.setHeader("content-type", "text/html");
|
|
149
|
+
response.end(page);
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
server.httpServer?.once("listening", () => {
|
|
153
|
+
server.config.logger.info(` mantaq viz: ${base}`);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
];
|
|
158
|
+
}
|
|
159
|
+
export { mantaqViz };
|
package/package.json
CHANGED
|
@@ -1,7 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantaq/inspect",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Turn a Mantaq machine into a viz document: structure, handler explanations (AST), fuzz and test coverage. CLI and Vite plugin included.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/AndersCan/mantaq",
|
|
9
|
+
"directory": "packages/inspect"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"mantaq-inspect": "./dist/cli.mjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./dist/index.mjs",
|
|
20
|
+
"./drive": "./dist/drive.mjs",
|
|
21
|
+
"./live-entry": "./dist/live-entry.mjs",
|
|
22
|
+
"./vite": "./dist/vite.mjs",
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"typescript": "6.0.3",
|
|
30
|
+
"@mantaq/core": "0.5.1",
|
|
31
|
+
"@mantaq/pbt": "0.0.3",
|
|
32
|
+
"@mantaq/traversal": "0.3.1",
|
|
33
|
+
"@mantaq/utils": "0.0.4",
|
|
34
|
+
"@mantaq/viz": "0.2.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^26.2.0",
|
|
38
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
39
|
+
"happy-dom": "^21.0.4",
|
|
40
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
|
|
41
|
+
"vite-plus": "1.4.0",
|
|
42
|
+
"@mantaq/sugar": "2.0.1"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"vite": "*"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vp pack",
|
|
49
|
+
"dev": "vp pack --watch",
|
|
50
|
+
"test": "vp test",
|
|
51
|
+
"check": "vp check",
|
|
52
|
+
"viz:export": "node src/examples-cli.ts export",
|
|
53
|
+
"viz:compare": "node src/examples-cli.ts compare"
|
|
54
|
+
}
|
|
55
|
+
}
|