@akanjs/devkit 3.2.0-rc.0 → 3.2.0-rc.2

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/akanContext.ts +1 -3
  3. package/akanMcpContract.ts +4 -3
  4. package/artifact/storeBootstrap.ts +3 -2
  5. package/codeAgent/skills/akan-scaffold/SKILL.md +2 -1
  6. package/commandDecorators/command.ts +35 -18
  7. package/commandDecorators/commandDecorators.test.ts +75 -3
  8. package/commandDecorators/targetMeta.ts +2 -0
  9. package/constantFieldNames.test.ts +34 -0
  10. package/constantFieldNames.ts +18 -0
  11. package/createTunnel.test.ts +12 -2
  12. package/frontendBuild/buildRouteClient.test.ts +43 -0
  13. package/frontendBuild/clientEntryDiscovery.test.ts +22 -0
  14. package/frontendBuild/clientEntryDiscovery.ts +28 -3
  15. package/frontendBuild/csrArtifactBuilder.test.ts +48 -0
  16. package/frontendBuild/csrArtifactBuilder.ts +9 -3
  17. package/frontendBuild/csrDevBundler.ts +12 -2
  18. package/frontendBuild/csrDevModuleCompiler.test.ts +97 -0
  19. package/frontendBuild/csrDevModuleCompiler.ts +37 -8
  20. package/frontendBuild/csrDevPatcher.test.ts +89 -2
  21. package/frontendBuild/csrDevPatcher.ts +47 -7
  22. package/frontendBuild/csrDevTypes.ts +16 -0
  23. package/frontendBuild/cssCompiler.test.ts +63 -1
  24. package/frontendBuild/devBarrelImports.ts +132 -0
  25. package/frontendBuild/devRegistryBundler.ts +19 -4
  26. package/frontendBuild/mcpAppViewBuilder.test.ts +67 -0
  27. package/frontendBuild/ssrDevBundler.ts +13 -2
  28. package/package.json +3 -3
  29. package/preview/PreviewChrome.ts +3 -3
  30. package/preview/PreviewView.ts +26 -8
  31. package/preview/previewView.test.ts +87 -3
  32. package/transforms/barrelAnalyzer.ts +46 -1
  33. package/transforms/barrelImportsPlugin.ts +61 -45
  34. package/transforms/transforms.test.ts +67 -1
  35. package/workflow/artifacts.ts +17 -0
  36. package/workflow/plan.ts +54 -14
  37. package/workspaceGraph.test.ts +116 -3
  38. package/workspaceGraph.ts +6 -3
package/workspaceGraph.ts CHANGED
@@ -64,12 +64,14 @@ export class WorkspaceGraph {
64
64
  .filter((node) => node.change)
65
65
  .flatMap((node) => [
66
66
  node.at?.file,
67
+ ...(node.sources ?? []),
67
68
  ...(node.fields ?? []).filter((field) => field.change).map(({ at }) => at.file),
68
69
  ]),
69
70
  ...changes.edges.filter((edge) => edge.change).map((edge) => edge.at?.file),
70
71
  ]);
71
72
  const unmapped = files.filter(({ file }) => !mapped.has(file) && !hiddenPath.test(file));
72
- return { ...changes, since: sha.slice(0, 12), unmapped };
73
+ const nodes = changes.nodes.map(({ sources: _sources, ...node }) => node);
74
+ return { ...changes, nodes, since: sha.slice(0, 12), unmapped };
73
75
  }
74
76
 
75
77
  static #baseAt(root: string, sha: string) {
@@ -188,15 +190,16 @@ export class WorkspaceGraph {
188
190
  if (scope.app || scope.module || graph.nodes.length <= unscopedNodeLimit) return WorkspaceGraph.scope(graph, scope);
189
191
  const unscoped = WorkspaceGraph.#withoutPages(graph);
190
192
  if (unscoped.nodes.length <= unscopedNodeLimit) return unscoped;
193
+ const kept = new Set(unscoped.nodes.map((node) => node.id));
191
194
  const owners = new Map<string, number>();
192
195
  for (const node of counted)
193
- if (node.owner && !pageKinds.has(node.kind)) owners.set(node.owner, (owners.get(node.owner) ?? 0) + 1);
196
+ if (node.owner && kept.has(node.id)) owners.set(node.owner, (owners.get(node.owner) ?? 0) + 1);
194
197
  return {
195
198
  diagnostics: [
196
199
  {
197
200
  severity: "error",
198
201
  code: "graph-scope-required",
199
- message: `The graph has ${unscoped.nodes.length} nodes besides its pages. Pass app, module or both to scope it.`,
202
+ message: `The graph has ${unscoped.nodes.length} nodes once unchanged pages are set aside. Pass app, module or both to scope it.`,
200
203
  input: "app",
201
204
  },
202
205
  ],