waygraph 0.7.14 → 0.7.15
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/graph.js +12 -5
- package/package.json +1 -1
- package/templates/quickstart/package.json +1 -1
package/dist/graph.js
CHANGED
|
@@ -98,7 +98,7 @@ export async function findOrphanBlocks(projectDir) {
|
|
|
98
98
|
const exportName = m[1];
|
|
99
99
|
if (referenced.has(exportName))
|
|
100
100
|
continue;
|
|
101
|
-
if (!/defineBlock|defineNavBlock/.test(src))
|
|
101
|
+
if (!/defineBlock|defineEffectBlock|defineMemEffectBlock|defineNavBlock|defineMemNavBlock/.test(src))
|
|
102
102
|
continue;
|
|
103
103
|
let block = exportNameToBlockName(exportName);
|
|
104
104
|
try {
|
|
@@ -234,14 +234,17 @@ function resolveGenericArg(blockFilePath, arg) {
|
|
|
234
234
|
return [inline[1]];
|
|
235
235
|
return resolveTypeToTags(blockFilePath, arg);
|
|
236
236
|
}
|
|
237
|
-
/** Every `defineBlock
|
|
237
|
+
/** Every `defineBlock` / `defineEffectBlock` / `defineMemEffectBlock` `<In, Out>` call site. */
|
|
238
238
|
function extractDefineBlockGenerics(src) {
|
|
239
239
|
// Each argument is either a plain identifier or an inline `Checkpoint<...>`
|
|
240
|
-
// (its own angle brackets, so the outer
|
|
240
|
+
// (its own angle brackets, so the outer defineX<...> pair alone won't
|
|
241
241
|
// balance correctly against a naive greedy match) - captured as a single
|
|
242
242
|
// alternation so both shapes come out of the same two capture groups.
|
|
243
|
+
// Effect helpers are TypeScript salt over defineBlock - same In/Out edges.
|
|
243
244
|
const arg = String.raw `(Checkpoint<[^>]*>|[A-Za-z_$][\w]*)`;
|
|
244
|
-
const re = new RegExp(String.raw `
|
|
245
|
+
const re = new RegExp(String.raw `define(?:Mem)?(?:Effect)?Block<\s*${arg}\s*,\s*${arg}\s*>`, "g");
|
|
246
|
+
// Matches: defineBlock | defineEffectBlock | defineMemEffectBlock
|
|
247
|
+
// (defineMemBlock alone is not a real helper - Mem* only prefixes Effect.)
|
|
245
248
|
const calls = [];
|
|
246
249
|
let m;
|
|
247
250
|
while ((m = re.exec(src)) !== null) {
|
|
@@ -301,7 +304,11 @@ export async function discoverGraph(projectDir) {
|
|
|
301
304
|
}
|
|
302
305
|
const call = calls[callIndex++];
|
|
303
306
|
if (!call) {
|
|
304
|
-
skipped.push({
|
|
307
|
+
skipped.push({
|
|
308
|
+
block: blockName,
|
|
309
|
+
file: relFile,
|
|
310
|
+
reason: "no defineBlock/defineEffectBlock<In, Out> generic call found",
|
|
311
|
+
});
|
|
305
312
|
continue;
|
|
306
313
|
}
|
|
307
314
|
const fromTags = resolveGenericArg(file, call.in);
|
package/package.json
CHANGED