@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.
- package/CHANGELOG.md +41 -1
- package/akanContext.ts +1 -3
- package/akanMcpContract.ts +4 -3
- package/artifact/storeBootstrap.ts +3 -2
- package/codeAgent/skills/akan-scaffold/SKILL.md +2 -1
- package/commandDecorators/command.ts +35 -18
- package/commandDecorators/commandDecorators.test.ts +75 -3
- package/commandDecorators/targetMeta.ts +2 -0
- package/constantFieldNames.test.ts +34 -0
- package/constantFieldNames.ts +18 -0
- package/createTunnel.test.ts +12 -2
- package/frontendBuild/buildRouteClient.test.ts +43 -0
- package/frontendBuild/clientEntryDiscovery.test.ts +22 -0
- package/frontendBuild/clientEntryDiscovery.ts +28 -3
- package/frontendBuild/csrArtifactBuilder.test.ts +48 -0
- package/frontendBuild/csrArtifactBuilder.ts +9 -3
- package/frontendBuild/csrDevBundler.ts +12 -2
- package/frontendBuild/csrDevModuleCompiler.test.ts +97 -0
- package/frontendBuild/csrDevModuleCompiler.ts +37 -8
- package/frontendBuild/csrDevPatcher.test.ts +89 -2
- package/frontendBuild/csrDevPatcher.ts +47 -7
- package/frontendBuild/csrDevTypes.ts +16 -0
- package/frontendBuild/cssCompiler.test.ts +63 -1
- package/frontendBuild/devBarrelImports.ts +132 -0
- package/frontendBuild/devRegistryBundler.ts +19 -4
- package/frontendBuild/mcpAppViewBuilder.test.ts +67 -0
- package/frontendBuild/ssrDevBundler.ts +13 -2
- package/package.json +3 -3
- package/preview/PreviewChrome.ts +3 -3
- package/preview/PreviewView.ts +26 -8
- package/preview/previewView.test.ts +87 -3
- package/transforms/barrelAnalyzer.ts +46 -1
- package/transforms/barrelImportsPlugin.ts +61 -45
- package/transforms/transforms.test.ts +67 -1
- package/workflow/artifacts.ts +17 -0
- package/workflow/plan.ts +54 -14
- package/workspaceGraph.test.ts +116 -3
- 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
|
-
|
|
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 &&
|
|
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
|
|
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
|
],
|