@mmapp/react-compiler 0.1.0-alpha.3 → 0.1.0-alpha.4
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/auth-3UK75242.mjs +17 -0
- package/dist/babel/index.d.mts +2 -2
- package/dist/babel/index.d.ts +2 -2
- package/dist/babel/index.js +2736 -306
- package/dist/babel/index.mjs +1 -1
- package/dist/chunk-52XHYD2V.mjs +214 -0
- package/dist/chunk-5FTDWKHH.mjs +244 -0
- package/dist/chunk-5GUFFFGL.mjs +148 -0
- package/dist/chunk-7JRAEFRB.mjs +7510 -0
- package/dist/chunk-7T6Q5KAA.mjs +7506 -0
- package/dist/chunk-ABYPKRSB.mjs +215 -0
- package/dist/chunk-BZEXUPDH.mjs +175 -0
- package/dist/chunk-EO6SYNCG.mjs +175 -0
- package/dist/chunk-HRYR54PT.mjs +175 -0
- package/dist/chunk-J3M4GUS7.mjs +161 -0
- package/dist/chunk-J7JUAHS4.mjs +186 -0
- package/dist/chunk-JRGFBWTN.mjs +2918 -0
- package/dist/chunk-NTB7OEX2.mjs +2918 -0
- package/dist/chunk-O4AUS7EU.mjs +148 -0
- package/dist/chunk-OPJKP747.mjs +7506 -0
- package/dist/chunk-R2DD5GTY.mjs +186 -0
- package/dist/chunk-THFYE5ZX.mjs +244 -0
- package/dist/chunk-UDDTWG5J.mjs +734 -0
- package/dist/chunk-VLTKQDJ3.mjs +244 -0
- package/dist/chunk-WBYMW4NQ.mjs +3450 -0
- package/dist/chunk-WVYY32LD.mjs +939 -0
- package/dist/chunk-XDVM4YHX.mjs +3450 -0
- package/dist/chunk-Z2G5RZ4H.mjs +186 -0
- package/dist/chunk-ZE3KCHBM.mjs +2918 -0
- package/dist/cli/index.js +10378 -4107
- package/dist/cli/index.mjs +224 -183
- package/dist/codemod/cli.js +1 -1
- package/dist/codemod/cli.mjs +1 -1
- package/dist/codemod/index.d.mts +3 -3
- package/dist/codemod/index.d.ts +3 -3
- package/dist/codemod/index.js +1 -1
- package/dist/codemod/index.mjs +1 -1
- package/dist/config-PL24KEWL.mjs +219 -0
- package/dist/deploy-YAJGW6II.mjs +9 -0
- package/dist/dev-server-CrQ041KP.d.mts +79 -0
- package/dist/dev-server-CrQ041KP.d.ts +79 -0
- package/dist/dev-server.d.mts +2 -2
- package/dist/dev-server.d.ts +2 -2
- package/dist/dev-server.js +4319 -421
- package/dist/dev-server.mjs +4 -4
- package/dist/envelope-ChEkuHij.d.mts +265 -0
- package/dist/envelope-ChEkuHij.d.ts +265 -0
- package/dist/envelope.d.mts +2 -2
- package/dist/envelope.d.ts +2 -2
- package/dist/envelope.js +2734 -304
- package/dist/envelope.mjs +2 -2
- package/dist/index-CEKyyazf.d.mts +104 -0
- package/dist/index-CEKyyazf.d.ts +104 -0
- package/dist/index.d.mts +164 -9
- package/dist/index.d.ts +164 -9
- package/dist/index.js +4730 -734
- package/dist/index.mjs +216 -8
- package/dist/init-7FJENUDK.mjs +407 -0
- package/dist/init-DQDX3QK6.mjs +369 -0
- package/dist/project-compiler-NNK32MPG.mjs +10 -0
- package/dist/project-compiler-OP2VVGJQ.mjs +10 -0
- package/dist/project-compiler-ZB4RUYVL.mjs +10 -0
- package/dist/project-decompiler-U55HQUHW.mjs +7 -0
- package/dist/project-decompiler-US7GAVIC.mjs +7 -0
- package/dist/pull-KOL2QAYQ.mjs +109 -0
- package/dist/pull-P44LDRWB.mjs +109 -0
- package/dist/seed-KOGEPGOJ.mjs +154 -0
- package/dist/server-VW6UPCHO.mjs +277 -0
- package/dist/testing/index.d.mts +8 -8
- package/dist/testing/index.d.ts +8 -8
- package/dist/testing/index.js +2744 -314
- package/dist/testing/index.mjs +1 -1
- package/dist/verify-BYHUKARQ.mjs +1833 -0
- package/dist/verify-OQDEQYMS.mjs +1833 -0
- package/dist/verify-SEIXUGN4.mjs +1833 -0
- package/dist/vite/index.d.mts +1 -1
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +2735 -305
- package/dist/vite/index.mjs +2 -2
- package/examples/authentication/main.workflow.tsx +1 -1
- package/examples/authentication/mm.config.ts +1 -1
- package/examples/authentication/pages/LoginPage.tsx +2 -2
- package/examples/authentication/pages/SignupPage.tsx +2 -2
- package/examples/counter.workflow.tsx +1 -1
- package/examples/dashboard.workflow.tsx +1 -1
- package/examples/invoice-approval/actions/invoice.server.ts +1 -1
- package/examples/invoice-approval/main.workflow.tsx +1 -1
- package/examples/invoice-approval/mm.config.ts +1 -1
- package/examples/invoice-approval/pages/InvoiceDetailPage.tsx +1 -1
- package/examples/invoice-approval/pages/InvoiceFormPage.tsx +1 -1
- package/examples/invoice-approval/pages/InvoiceListPage.tsx +1 -1
- package/examples/todo-app.workflow.tsx +1 -1
- package/examples/uber-app/actions/matching.server.ts +1 -1
- package/examples/uber-app/actions/notifications.server.ts +1 -1
- package/examples/uber-app/actions/payments.server.ts +1 -1
- package/examples/uber-app/actions/pricing.server.ts +1 -1
- package/examples/uber-app/app/admin/analytics.tsx +2 -2
- package/examples/uber-app/app/admin/fleet.tsx +2 -2
- package/examples/uber-app/app/admin/surge-pricing.tsx +2 -2
- package/examples/uber-app/app/driver/dashboard.tsx +2 -2
- package/examples/uber-app/app/driver/earnings.tsx +2 -2
- package/examples/uber-app/app/driver/navigation.tsx +2 -2
- package/examples/uber-app/app/driver/ride-acceptance.tsx +2 -2
- package/examples/uber-app/app/rider/home.tsx +2 -2
- package/examples/uber-app/app/rider/payment-methods.tsx +2 -2
- package/examples/uber-app/app/rider/ride-history.tsx +2 -2
- package/examples/uber-app/app/rider/ride-tracking.tsx +2 -2
- package/examples/uber-app/components/DriverCard.tsx +1 -1
- package/examples/uber-app/components/MapView.tsx +3 -3
- package/examples/uber-app/components/RatingStars.tsx +2 -2
- package/examples/uber-app/components/RideCard.tsx +1 -1
- package/examples/uber-app/mm.config.ts +1 -1
- package/examples/uber-app/workflows/dispute-resolution.workflow.tsx +2 -2
- package/examples/uber-app/workflows/driver-onboarding.workflow.tsx +2 -2
- package/examples/uber-app/workflows/payment-processing.workflow.tsx +2 -2
- package/examples/uber-app/workflows/ride-request.workflow.tsx +2 -2
- package/package.json +8 -3
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import "./chunk-CIESM3BP.mjs";
|
|
2
|
+
|
|
3
|
+
// src/cli/config.ts
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
5
|
+
import { resolve, join } from "path";
|
|
6
|
+
var DEFAULT_CONFIG = {
|
|
7
|
+
dev: {
|
|
8
|
+
port: 5199,
|
|
9
|
+
apiPort: 4200,
|
|
10
|
+
db: "sqlite://mm-dev.db",
|
|
11
|
+
redis: "",
|
|
12
|
+
api: "http://localhost:4200/api/v1",
|
|
13
|
+
seed: false,
|
|
14
|
+
open: false
|
|
15
|
+
},
|
|
16
|
+
build: {
|
|
17
|
+
mode: "infer",
|
|
18
|
+
outDir: "dist/workflows",
|
|
19
|
+
skipTypeCheck: false
|
|
20
|
+
},
|
|
21
|
+
test: {
|
|
22
|
+
minCoverage: 80,
|
|
23
|
+
minMutationScore: 60,
|
|
24
|
+
integration: false
|
|
25
|
+
},
|
|
26
|
+
environments: {
|
|
27
|
+
local: { apiUrl: "http://localhost:4200/api/v1" },
|
|
28
|
+
dev: { apiUrl: "https://dev.mindmatrix.club/api/v1" }
|
|
29
|
+
},
|
|
30
|
+
defaultTarget: "dev"
|
|
31
|
+
};
|
|
32
|
+
function isPlainObject(val) {
|
|
33
|
+
return typeof val === "object" && val !== null && !Array.isArray(val);
|
|
34
|
+
}
|
|
35
|
+
function deepMerge(target, source) {
|
|
36
|
+
const result = { ...target };
|
|
37
|
+
for (const key of Object.keys(source)) {
|
|
38
|
+
const srcVal = source[key];
|
|
39
|
+
const tgtVal = target[key];
|
|
40
|
+
if (isPlainObject(srcVal) && isPlainObject(tgtVal)) {
|
|
41
|
+
result[key] = deepMerge(tgtVal, srcVal);
|
|
42
|
+
} else if (srcVal !== void 0) {
|
|
43
|
+
result[key] = srcVal;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
function findConfigPath(startDir) {
|
|
49
|
+
let dir = startDir ?? process.cwd();
|
|
50
|
+
const root = resolve("/");
|
|
51
|
+
while (true) {
|
|
52
|
+
for (const name of ["mmrc.config.ts", "mmrc.config.json"]) {
|
|
53
|
+
const candidate = join(dir, name);
|
|
54
|
+
if (existsSync(candidate)) return candidate;
|
|
55
|
+
}
|
|
56
|
+
const parent = resolve(dir, "..");
|
|
57
|
+
if (parent === dir || parent === root) break;
|
|
58
|
+
dir = parent;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
function loadConfigFromFile(configPath) {
|
|
63
|
+
const content = readFileSync(configPath, "utf-8");
|
|
64
|
+
if (configPath.endsWith(".json")) {
|
|
65
|
+
try {
|
|
66
|
+
return JSON.parse(content);
|
|
67
|
+
} catch {
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
let js = content.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(?<![:'"])\/\/.*$/gm, "").replace(/^import\s+.*$/gm, "").replace(/^export\s+default\s+/m, "module.exports = ").replace(/^export\s+/gm, "").replace(/:\s*MmrcConfig/g, "").replace(/as\s+const/g, "").replace(/satisfies\s+\w+/g, "");
|
|
72
|
+
js = `function defineMmrc(c) { return c; }
|
|
73
|
+
${js}`;
|
|
74
|
+
try {
|
|
75
|
+
const m = {};
|
|
76
|
+
const fn = new Function("module", "exports", "require", js);
|
|
77
|
+
fn(m, m, () => ({}));
|
|
78
|
+
const exported = m.exports ?? m;
|
|
79
|
+
return isPlainObject(exported) ? exported : {};
|
|
80
|
+
} catch {
|
|
81
|
+
return {};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function getConfig(startDir) {
|
|
85
|
+
const configPath = findConfigPath(startDir);
|
|
86
|
+
if (!configPath) return { ...DEFAULT_CONFIG };
|
|
87
|
+
const userConfig = loadConfigFromFile(configPath);
|
|
88
|
+
return deepMerge(DEFAULT_CONFIG, userConfig);
|
|
89
|
+
}
|
|
90
|
+
function getConfigValue(config, key) {
|
|
91
|
+
const parts = key.split(".");
|
|
92
|
+
let current = config;
|
|
93
|
+
for (const part of parts) {
|
|
94
|
+
if (!isPlainObject(current)) return void 0;
|
|
95
|
+
current = current[part];
|
|
96
|
+
}
|
|
97
|
+
return current;
|
|
98
|
+
}
|
|
99
|
+
function setConfigValue(config, key, value) {
|
|
100
|
+
const parts = key.split(".");
|
|
101
|
+
let current = config;
|
|
102
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
103
|
+
const part = parts[i];
|
|
104
|
+
if (!isPlainObject(current[part])) {
|
|
105
|
+
current[part] = {};
|
|
106
|
+
}
|
|
107
|
+
current = current[part];
|
|
108
|
+
}
|
|
109
|
+
const last = parts[parts.length - 1];
|
|
110
|
+
if (value === "true") current[last] = true;
|
|
111
|
+
else if (value === "false") current[last] = false;
|
|
112
|
+
else if (/^\d+$/.test(value)) current[last] = parseInt(value, 10);
|
|
113
|
+
else current[last] = value;
|
|
114
|
+
}
|
|
115
|
+
function flattenConfig(obj, prefix = "") {
|
|
116
|
+
const entries = [];
|
|
117
|
+
if (!isPlainObject(obj)) {
|
|
118
|
+
entries.push([prefix, String(obj)]);
|
|
119
|
+
return entries;
|
|
120
|
+
}
|
|
121
|
+
for (const [key, val] of Object.entries(obj)) {
|
|
122
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
123
|
+
if (isPlainObject(val)) {
|
|
124
|
+
entries.push(...flattenConfig(val, fullKey));
|
|
125
|
+
} else {
|
|
126
|
+
entries.push([fullKey, String(val)]);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return entries;
|
|
130
|
+
}
|
|
131
|
+
function writeConfigFile(configPath, config) {
|
|
132
|
+
const json = JSON.stringify(config, null, 2);
|
|
133
|
+
const content = `/**
|
|
134
|
+
* mmrc.config.ts \u2014 MindMatrix React Compiler configuration.
|
|
135
|
+
*
|
|
136
|
+
* Configures the mmrc CLI for local dev, builds, tests, and deploy targets.
|
|
137
|
+
* Edit directly or run \`mmrc config set <key> <value>\`.
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
const config = ${json};
|
|
141
|
+
|
|
142
|
+
export default config;
|
|
143
|
+
`;
|
|
144
|
+
writeFileSync(configPath, content, "utf-8");
|
|
145
|
+
}
|
|
146
|
+
function resolveTarget(targetName, config, fallbackApiUrl) {
|
|
147
|
+
if (!config || !config.environments) {
|
|
148
|
+
return { name: targetName ?? "default", apiUrl: fallbackApiUrl, token: null };
|
|
149
|
+
}
|
|
150
|
+
const name = targetName ?? config.defaultTarget ?? "local";
|
|
151
|
+
const env = config.environments[name];
|
|
152
|
+
if (!env) {
|
|
153
|
+
const available = Object.keys(config.environments).join(", ");
|
|
154
|
+
throw new Error(`Unknown target "${name}". Available environments: ${available}`);
|
|
155
|
+
}
|
|
156
|
+
return { name, apiUrl: env.apiUrl, token: env.token ?? null };
|
|
157
|
+
}
|
|
158
|
+
function generateMmrcConfig() {
|
|
159
|
+
return `/**
|
|
160
|
+
* mmrc.config.ts \u2014 MindMatrix React Compiler configuration.
|
|
161
|
+
*
|
|
162
|
+
* Configures the mmrc CLI for local dev, builds, tests, and deploy targets.
|
|
163
|
+
* Edit directly or run \`mmrc config set <key> <value>\`.
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
const config = {
|
|
167
|
+
dev: {
|
|
168
|
+
port: 5199,
|
|
169
|
+
apiPort: 4200,
|
|
170
|
+
db: 'sqlite://mm-dev.db',
|
|
171
|
+
redis: '',
|
|
172
|
+
api: 'https://dev.mindmatrix.club/api/v1',
|
|
173
|
+
seed: false,
|
|
174
|
+
open: false,
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
build: {
|
|
178
|
+
mode: 'infer',
|
|
179
|
+
outDir: 'dist/workflows',
|
|
180
|
+
skipTypeCheck: false,
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
test: {
|
|
184
|
+
minCoverage: 80,
|
|
185
|
+
minMutationScore: 60,
|
|
186
|
+
integration: false,
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
environments: {
|
|
190
|
+
local: { apiUrl: 'http://localhost:4200/api/v1' },
|
|
191
|
+
dev: { apiUrl: 'https://dev.mindmatrix.club/api/v1' },
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
defaultTarget: 'dev',
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export default config;
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
function loadMmrcConfig(dir) {
|
|
201
|
+
const path = findConfigPath(dir);
|
|
202
|
+
if (!path) return null;
|
|
203
|
+
const partial = loadConfigFromFile(path);
|
|
204
|
+
return deepMerge(DEFAULT_CONFIG, partial);
|
|
205
|
+
}
|
|
206
|
+
export {
|
|
207
|
+
DEFAULT_CONFIG,
|
|
208
|
+
deepMerge,
|
|
209
|
+
findConfigPath,
|
|
210
|
+
flattenConfig,
|
|
211
|
+
generateMmrcConfig,
|
|
212
|
+
getConfig,
|
|
213
|
+
getConfigValue,
|
|
214
|
+
loadConfigFromFile,
|
|
215
|
+
loadMmrcConfig,
|
|
216
|
+
resolveTarget,
|
|
217
|
+
setConfigValue,
|
|
218
|
+
writeConfigFile
|
|
219
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ViteDevServer } from 'vite';
|
|
2
|
+
import { IRWorkflowDefinition } from '@mmapp/player-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CLI Build Command — compiles workflow files to Pure Form JSON.
|
|
6
|
+
*
|
|
7
|
+
* Supports three file types:
|
|
8
|
+
* - *.workflow.tsx — React workflow components
|
|
9
|
+
* - models/*.ts — TypeScript model files
|
|
10
|
+
* - *.server.ts — Server action files
|
|
11
|
+
*
|
|
12
|
+
* Produces:
|
|
13
|
+
* - *.workflow.json — IR (Pure Form)
|
|
14
|
+
* - *.json — Engine-compatible definition
|
|
15
|
+
* - envelope.json — Source envelope with file manifest
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
interface BuildOptions {
|
|
19
|
+
src?: string;
|
|
20
|
+
outDir?: string;
|
|
21
|
+
mode?: 'strict' | 'infer';
|
|
22
|
+
/** Generate source envelope. */
|
|
23
|
+
envelope?: boolean;
|
|
24
|
+
/** Blueprint slug for envelope. */
|
|
25
|
+
slug?: string;
|
|
26
|
+
/** Blueprint version for envelope. */
|
|
27
|
+
version?: string;
|
|
28
|
+
/** Skip TypeScript type checking (not recommended). */
|
|
29
|
+
skipTypeCheck?: boolean;
|
|
30
|
+
/** Watch mode: auto-recompile on file changes. */
|
|
31
|
+
watch?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface BuildResult {
|
|
34
|
+
compiled: number;
|
|
35
|
+
errors: number;
|
|
36
|
+
warnings: number;
|
|
37
|
+
definitions: IRWorkflowDefinition[];
|
|
38
|
+
errorDetails: {
|
|
39
|
+
file: string;
|
|
40
|
+
message: string;
|
|
41
|
+
line?: number;
|
|
42
|
+
}[];
|
|
43
|
+
}
|
|
44
|
+
declare function build(options?: BuildOptions): Promise<BuildResult>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Dev Server -- Vite dev server for MindMatrix React workflows.
|
|
48
|
+
*
|
|
49
|
+
* Design 39 Phase 2 + ISS-083 (error overlay) + ISS-084 (auto-seed).
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
interface WsClient {
|
|
53
|
+
readyState: number;
|
|
54
|
+
send(data: string): void;
|
|
55
|
+
close(): void;
|
|
56
|
+
on(event: string, listener: (...args: unknown[]) => void): void;
|
|
57
|
+
}
|
|
58
|
+
interface DevServerOptions {
|
|
59
|
+
port?: number;
|
|
60
|
+
src?: string;
|
|
61
|
+
mode?: 'strict' | 'infer';
|
|
62
|
+
include?: string[];
|
|
63
|
+
outDir?: string;
|
|
64
|
+
seed?: boolean;
|
|
65
|
+
apiUrl?: string;
|
|
66
|
+
authToken?: string;
|
|
67
|
+
ws?: boolean;
|
|
68
|
+
open?: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface DevServerInstance {
|
|
71
|
+
vite: ViteDevServer;
|
|
72
|
+
port: number;
|
|
73
|
+
clients: Set<WsClient>;
|
|
74
|
+
rebuild: () => Promise<BuildResult>;
|
|
75
|
+
close: () => Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
declare function createDevServer(options?: DevServerOptions): Promise<DevServerInstance>;
|
|
78
|
+
|
|
79
|
+
export { type BuildOptions as B, type DevServerOptions as D, type DevServerInstance as a, build as b, createDevServer as c, type BuildResult as d };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ViteDevServer } from 'vite';
|
|
2
|
+
import { IRWorkflowDefinition } from '@mmapp/player-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CLI Build Command — compiles workflow files to Pure Form JSON.
|
|
6
|
+
*
|
|
7
|
+
* Supports three file types:
|
|
8
|
+
* - *.workflow.tsx — React workflow components
|
|
9
|
+
* - models/*.ts — TypeScript model files
|
|
10
|
+
* - *.server.ts — Server action files
|
|
11
|
+
*
|
|
12
|
+
* Produces:
|
|
13
|
+
* - *.workflow.json — IR (Pure Form)
|
|
14
|
+
* - *.json — Engine-compatible definition
|
|
15
|
+
* - envelope.json — Source envelope with file manifest
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
interface BuildOptions {
|
|
19
|
+
src?: string;
|
|
20
|
+
outDir?: string;
|
|
21
|
+
mode?: 'strict' | 'infer';
|
|
22
|
+
/** Generate source envelope. */
|
|
23
|
+
envelope?: boolean;
|
|
24
|
+
/** Blueprint slug for envelope. */
|
|
25
|
+
slug?: string;
|
|
26
|
+
/** Blueprint version for envelope. */
|
|
27
|
+
version?: string;
|
|
28
|
+
/** Skip TypeScript type checking (not recommended). */
|
|
29
|
+
skipTypeCheck?: boolean;
|
|
30
|
+
/** Watch mode: auto-recompile on file changes. */
|
|
31
|
+
watch?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface BuildResult {
|
|
34
|
+
compiled: number;
|
|
35
|
+
errors: number;
|
|
36
|
+
warnings: number;
|
|
37
|
+
definitions: IRWorkflowDefinition[];
|
|
38
|
+
errorDetails: {
|
|
39
|
+
file: string;
|
|
40
|
+
message: string;
|
|
41
|
+
line?: number;
|
|
42
|
+
}[];
|
|
43
|
+
}
|
|
44
|
+
declare function build(options?: BuildOptions): Promise<BuildResult>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Dev Server -- Vite dev server for MindMatrix React workflows.
|
|
48
|
+
*
|
|
49
|
+
* Design 39 Phase 2 + ISS-083 (error overlay) + ISS-084 (auto-seed).
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
interface WsClient {
|
|
53
|
+
readyState: number;
|
|
54
|
+
send(data: string): void;
|
|
55
|
+
close(): void;
|
|
56
|
+
on(event: string, listener: (...args: unknown[]) => void): void;
|
|
57
|
+
}
|
|
58
|
+
interface DevServerOptions {
|
|
59
|
+
port?: number;
|
|
60
|
+
src?: string;
|
|
61
|
+
mode?: 'strict' | 'infer';
|
|
62
|
+
include?: string[];
|
|
63
|
+
outDir?: string;
|
|
64
|
+
seed?: boolean;
|
|
65
|
+
apiUrl?: string;
|
|
66
|
+
authToken?: string;
|
|
67
|
+
ws?: boolean;
|
|
68
|
+
open?: boolean;
|
|
69
|
+
}
|
|
70
|
+
interface DevServerInstance {
|
|
71
|
+
vite: ViteDevServer;
|
|
72
|
+
port: number;
|
|
73
|
+
clients: Set<WsClient>;
|
|
74
|
+
rebuild: () => Promise<BuildResult>;
|
|
75
|
+
close: () => Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
declare function createDevServer(options?: DevServerOptions): Promise<DevServerInstance>;
|
|
78
|
+
|
|
79
|
+
export { type BuildOptions as B, type DevServerOptions as D, type DevServerInstance as a, build as b, createDevServer as c, type BuildResult as d };
|
package/dist/dev-server.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vite';
|
|
2
|
-
export { a as DevServerInstance, D as DevServerOptions, c as createDevServer } from './dev-server-
|
|
3
|
-
import '@
|
|
2
|
+
export { a as DevServerInstance, D as DevServerOptions, c as createDevServer } from './dev-server-CrQ041KP.mjs';
|
|
3
|
+
import '@mmapp/player-core';
|
package/dist/dev-server.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vite';
|
|
2
|
-
export { a as DevServerInstance, D as DevServerOptions, c as createDevServer } from './dev-server-
|
|
3
|
-
import '@
|
|
2
|
+
export { a as DevServerInstance, D as DevServerOptions, c as createDevServer } from './dev-server-CrQ041KP.js';
|
|
3
|
+
import '@mmapp/player-core';
|