@akanjs/devkit 3.2.0-rc.14 → 3.2.0-rc.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/CHANGELOG.md +13 -1
- package/README.ko.md +3 -2
- package/README.md +4 -2
- package/akanApp/BackendImportGraph.test.ts +1 -1
- package/akanApp/akanApp.host.test.ts +1 -1
- package/akanApp/akanApp.host.ts +1 -1
- package/akanConfig/akanConfig.test.ts +1 -1
- package/akanConfig/akanConfig.ts +1 -1
- package/akanConfig/akanWorkspaceConfig.ts +1 -1
- package/akanConfig/productionLockfile.ts +1 -1
- package/apiReport/apiReport.test.ts +1 -1
- package/{applicationBuildRunner.test.ts → app/applicationBuildRunner.test.ts} +8 -8
- package/{applicationBuildRunner.ts → app/applicationBuildRunner.ts} +14 -14
- package/{applicationTestPreload.ts → app/applicationTestPreload.ts} +1 -1
- package/{routeJsBudget.test.ts → app/routeJsBudget.test.ts} +1 -1
- package/{routeJsBudget.ts → app/routeJsBudget.ts} +2 -2
- package/artifact/implicitRootLayout.test.ts +1 -1
- package/cloud/cloudApi.test.ts +1 -1
- package/cloud/configLock.test.ts +1 -1
- package/cloud/globalConfig.test.ts +1 -1
- package/cloud/globalConfig.ts +1 -1
- package/cloud/updatePackUpload.test.ts +1 -1
- package/codeAgent/agent/AkanCodeEnv.ts +1 -1
- package/codeAgent/agent/akanCodePaths.ts +1 -1
- package/codeAgent/agent/codeAgent.test.ts +1 -1
- package/codeAgent/skills/akan-debug/SKILL.md +8 -5
- package/codeAgent/tools/AkanCli.ts +1 -1
- package/codeAgent/tools/AkanToolPack.ts +1 -1
- package/codeAgent/tools/akanCodePlugins.test.ts +1 -1
- package/commandDecorators/command.ts +3 -3
- package/commandDecorators/commandDecorators.test.ts +1 -1
- package/commandDecorators/workspaceVersionCheck.test.ts +1 -1
- package/commandDecorators/workspaceVersionCheck.ts +1 -1
- package/{akanContext.ts → context/akanContext.ts} +8 -8
- package/{akanMcpContract.test.ts → context/akanMcpContract.test.ts} +1 -1
- package/{akanMcpContract.ts → context/akanMcpContract.ts} +5 -5
- package/{recipeScanner.test.ts → context/recipeScanner.test.ts} +1 -1
- package/devkitUtils.test.ts +5 -5
- package/{apiReference.test.ts → docs/apiReference.test.ts} +4 -4
- package/{apiReference.ts → docs/apiReference.ts} +2 -2
- package/{errorCodeReference.test.ts → docs/errorCodeReference.test.ts} +4 -4
- package/{errorCodeReference.ts → docs/errorCodeReference.ts} +2 -2
- package/{errorCodeScan.ts → docs/errorCodeScan.ts} +1 -1
- package/{frameworkGraph.test.ts → docs/frameworkGraph.test.ts} +1 -1
- package/executors/appExecutor.ts +5 -5
- package/executors/executor.ts +9 -9
- package/{executors.linkFallback.test.ts → executors/executors.linkFallback.test.ts} +1 -1
- package/{executors.test.ts → executors/executors.test.ts} +11 -18
- package/executors/index.ts +8 -0
- package/executors/pkgExecutor.ts +2 -2
- package/executors/sysExecutor.ts +8 -8
- package/executors/workspaceExecutor.ts +4 -4
- package/frontendBuild/allRoutesBuilder.test.ts +1 -1
- package/frontendBuild/autoImportSync.test.ts +1 -1
- package/frontendBuild/autoImportSync.ts +1 -1
- package/frontendBuild/buildRouteClient.test.ts +1 -1
- package/frontendBuild/clientEntriesBundler.test.ts +1 -1
- package/frontendBuild/csrArtifactBuilder.test.ts +1 -1
- package/frontendBuild/csrDevArtifactWriter.ts +1 -1
- package/frontendBuild/cssCompiler.test.ts +1 -1
- package/frontendBuild/devGeneratedIndexSync.test.ts +1 -1
- package/frontendBuild/devGeneratedIndexSync.ts +1 -1
- package/frontendBuild/dictionaryAssetBuilder.test.ts +1 -1
- package/frontendBuild/fontOptimizer.test.ts +1 -1
- package/frontendBuild/fontPruner.test.ts +1 -1
- package/frontendBuild/frontendBuild.test.ts +1 -1
- package/frontendBuild/hmrWatcher.test.ts +1 -1
- package/frontendBuild/mcpAppViewBuilder.test.ts +1 -1
- package/frontendBuild/mcpAppViewBuilder.ts +1 -1
- package/frontendBuild/nativeCore.test.ts +1 -1
- package/frontendBuild/optionalPeers.test.ts +1 -1
- package/frontendBuild/precompressArtifacts.test.ts +1 -1
- package/frontendBuild/serverGraphFile.ts +1 -1
- package/frontendBuild/sourceMtimeIndex.test.ts +1 -1
- package/frontendBuild/ssrDevBundler.test.ts +1 -1
- package/frontendBuild/vendorImportScanner.test.ts +1 -1
- package/frontendBuild/vendorNarrowing.test.ts +1 -1
- package/frontendBuild/watchRootResolver.test.ts +1 -1
- package/{agentAssets.test.ts → guideline/agentAssets.test.ts} +1 -1
- package/{agentAssets.ts → guideline/agentAssets.ts} +1 -1
- package/{agentsIndex.test.ts → guideline/agentsIndex.test.ts} +2 -2
- package/{agentsIndex.ts → guideline/agentsIndex.ts} +12 -9
- package/{conventionSet.test.ts → guideline/conventionSet.test.ts} +3 -3
- package/{prompter.ts → guideline/prompter.ts} +2 -3
- package/incrementalBuilder/buildBatch.proc.ts +1 -1
- package/incrementalBuilder/buildBatchRunner.test.ts +1 -1
- package/incrementalBuilder/builderChannel.test.ts +1 -1
- package/incrementalBuilder/builderGraphPayloads.ts +3 -3
- package/incrementalBuilder/incrementalBuilder.proc.test.ts +1 -1
- package/incrementalBuilder/incrementalBuilder.proc.ts +2 -2
- package/index.ts +22 -22
- package/integration/devStabilityHarness.test.ts +1 -1
- package/{biomeBase.test.ts → lint/biomeBase.test.ts} +1 -1
- package/lint/gritRules.test.ts +1 -1
- package/{linter.test.ts → lint/linter.test.ts} +1 -1
- package/mobile/desktopBin.test.ts +1 -1
- package/mobile/desktopRelease.test.ts +1 -1
- package/mobile/desktopServerStage.test.ts +2 -2
- package/mobile/desktopServerStage.ts +1 -1
- package/mobile/nativeApi.test.ts +1 -1
- package/mobile/nativeApp.test.ts +1 -1
- package/mobile/nativeConfig.test.ts +1 -1
- package/mobile/nativePluginFolders.test.ts +1 -1
- package/mobile/nativePublicEnv.test.ts +1 -1
- package/mobile/nativeWebDir.test.ts +1 -1
- package/mobile/serverBundleSecrets.test.ts +1 -1
- package/mobile/tarWriter.test.ts +1 -1
- package/mobile/updatePackFolder.test.ts +1 -1
- package/package.json +167 -3
- package/packageExports.test.ts +20 -2
- package/piDependencyPins.test.ts +1 -1
- package/pipeline/PipelineDefinition.ts +1 -1
- package/platformTest/IdleWatchedProcess.test.ts +1 -1
- package/platformTest/PlatformTestRun.test.ts +1 -1
- package/platformTest/TestSnapshot.test.ts +1 -1
- package/{abstractDoc.test.ts → quality/abstractDoc.test.ts} +2 -2
- package/{abstractDoc.ts → quality/abstractDoc.ts} +1 -1
- package/{maintainabilityBaseline.test.ts → quality/maintainabilityBaseline.test.ts} +24 -0
- package/{maintainabilityBaseline.ts → quality/maintainabilityBaseline.ts} +24 -1
- package/{maintainabilityContract.test.ts → quality/maintainabilityContract.test.ts} +82 -2
- package/{maintainabilityContract.ts → quality/maintainabilityContract.ts} +65 -8
- package/{maintainabilityExceptionScanner.test.ts → quality/maintainabilityExceptionScanner.test.ts} +1 -1
- package/{qualityScanner.test.ts → quality/qualityScanner.test.ts} +1 -1
- package/{qualityScanner.ts → quality/qualityScanner.ts} +8 -8
- package/{subspace.test.ts → subspace/subspace.test.ts} +3 -3
- package/{subspace.ts → subspace/subspace.ts} +4 -4
- package/{subspaceClone.ts → subspace/subspaceClone.ts} +5 -5
- package/{subspaceConfig.ts → subspace/subspaceConfig.ts} +1 -1
- package/{testHelpers.ts → test/testHelpers.ts} +1 -1
- package/transforms/browserDirnamePlugin.test.ts +1 -1
- package/transforms/externalizeFrameworkPlugin.test.ts +1 -1
- package/transforms/mcpAppPageTrimmer.test.ts +1 -1
- package/transforms/pureLazyMarker.test.ts +1 -1
- package/transforms/serverEnvPlugin.test.ts +1 -1
- package/transforms/serverEnvProfile.test.ts +1 -1
- package/transforms/sideEffectImportOrder.test.ts +1 -1
- package/transforms/transforms.test.ts +2 -2
- package/transforms/tsconfigPackageResolver.test.ts +1 -1
- package/{createTunnel.test.ts → tunnel/createTunnel.test.ts} +1 -1
- package/{createTunnel.ts → tunnel/createTunnel.ts} +2 -2
- package/{sshHostKeys.ts → tunnel/sshHostKeys.ts} +2 -2
- package/typecheck/projectTypecheck.test.ts +1 -1
- package/typecheck/projectTypecheck.ts +1 -1
- package/{typeChecker.test.ts → typecheck/typeChecker.test.ts} +1 -1
- package/{typeChecker.ts → typecheck/typeChecker.ts} +1 -1
- package/typecheck/typecheck.proc.ts +1 -1
- package/typecheck/typecheckFailure.ts +1 -1
- package/{jsonFormatter.test.ts → util/jsonFormatter.test.ts} +1 -1
- package/workflow/executor.ts +1 -1
- package/workflow/guardCatalog.test.ts +1 -1
- package/workflow/moduleIndex.test.ts +2 -2
- package/workflow/moduleIndex.ts +1 -1
- package/workflow/rolloutGate.test.ts +1 -1
- package/workflow/rolloutGate.ts +1 -1
- package/{appSelectionMemory.ts → workspace/appSelectionMemory.ts} +1 -1
- package/{codegenLock.test.ts → workspace/codegenLock.test.ts} +1 -1
- package/{dependencyScanner.test.ts → workspace/dependencyScanner.test.ts} +1 -1
- package/{dependencyScanner.ts → workspace/dependencyScanner.ts} +2 -2
- package/{envSeed.test.ts → workspace/envSeed.test.ts} +2 -2
- package/{envSeed.ts → workspace/envSeed.ts} +1 -1
- package/{libSource.test.ts → workspace/libSource.test.ts} +2 -2
- package/{libSource.ts → workspace/libSource.ts} +1 -1
- package/{scanInfo.ts → workspace/scanInfo.ts} +7 -7
- package/{slicePlanner.test.ts → workspace/slicePlanner.test.ts} +2 -2
- package/{slicePlanner.ts → workspace/slicePlanner.ts} +1 -1
- package/{workspaceGraph.test.ts → workspace/workspaceGraph.test.ts} +1 -1
- package/{workspaceGraph.ts → workspace/workspaceGraph.ts} +1 -1
- package/{workspaceLayout.test.ts → workspace/workspaceLayout.test.ts} +1 -1
- package/executors.ts +0 -8
- /package/{applicationBuildReporter.test.ts → app/applicationBuildReporter.test.ts} +0 -0
- /package/{applicationBuildReporter.ts → app/applicationBuildReporter.ts} +0 -0
- /package/{routeSourceValidator.test.ts → app/routeSourceValidator.test.ts} +0 -0
- /package/{routeSourceValidator.ts → app/routeSourceValidator.ts} +0 -0
- /package/{akanMcpToolError.ts → context/akanMcpToolError.ts} +0 -0
- /package/{moduleFieldNames.test.ts → context/moduleFieldNames.test.ts} +0 -0
- /package/{moduleFieldNames.ts → context/moduleFieldNames.ts} +0 -0
- /package/{recipeScanner.ts → context/recipeScanner.ts} +0 -0
- /package/{declarationReader.ts → docs/declarationReader.ts} +0 -0
- /package/{frameworkGraph.ts → docs/frameworkGraph.ts} +0 -0
- /package/{conventionSet.ts → guideline/conventionSet.ts} +0 -0
- /package/{biomeBase.ts → lint/biomeBase.ts} +0 -0
- /package/{linter.ts → lint/linter.ts} +0 -0
- /package/{bareErrorScanner.ts → quality/bareErrorScanner.ts} +0 -0
- /package/{commentDensityScanner.test.ts → quality/commentDensityScanner.test.ts} +0 -0
- /package/{commentDensityScanner.ts → quality/commentDensityScanner.ts} +0 -0
- /package/{componentSizeScanner.test.ts → quality/componentSizeScanner.test.ts} +0 -0
- /package/{componentSizeScanner.ts → quality/componentSizeScanner.ts} +0 -0
- /package/{componentWriteChainScanner.test.ts → quality/componentWriteChainScanner.test.ts} +0 -0
- /package/{componentWriteChainScanner.ts → quality/componentWriteChainScanner.ts} +0 -0
- /package/{deprecatedCommentScanner.test.ts → quality/deprecatedCommentScanner.test.ts} +0 -0
- /package/{deprecatedCommentScanner.ts → quality/deprecatedCommentScanner.ts} +0 -0
- /package/{endpointReach.test.ts → quality/endpointReach.test.ts} +0 -0
- /package/{endpointReach.ts → quality/endpointReach.ts} +0 -0
- /package/{formSetterScanner.test.ts → quality/formSetterScanner.test.ts} +0 -0
- /package/{formSetterScanner.ts → quality/formSetterScanner.ts} +0 -0
- /package/{kindBranchScanner.test.ts → quality/kindBranchScanner.test.ts} +0 -0
- /package/{kindBranchScanner.ts → quality/kindBranchScanner.ts} +0 -0
- /package/{maintainabilityExceptionScanner.ts → quality/maintainabilityExceptionScanner.ts} +0 -0
- /package/{maintainabilityLimits.ts → quality/maintainabilityLimits.ts} +0 -0
- /package/{maintainabilityReport.test.ts → quality/maintainabilityReport.test.ts} +0 -0
- /package/{maintainabilityReport.ts → quality/maintainabilityReport.ts} +0 -0
- /package/{renderMutationScanner.test.ts → quality/renderMutationScanner.test.ts} +0 -0
- /package/{renderMutationScanner.ts → quality/renderMutationScanner.ts} +0 -0
- /package/{serviceLoopCallScanner.test.ts → quality/serviceLoopCallScanner.test.ts} +0 -0
- /package/{serviceLoopCallScanner.ts → quality/serviceLoopCallScanner.ts} +0 -0
- /package/{signalMutationIndex.test.ts → quality/signalMutationIndex.test.ts} +0 -0
- /package/{signalMutationIndex.ts → quality/signalMutationIndex.ts} +0 -0
- /package/{sourceComments.test.ts → quality/sourceComments.test.ts} +0 -0
- /package/{sourceComments.ts → quality/sourceComments.ts} +0 -0
- /package/{ssrScanner.test.ts → quality/ssrScanner.test.ts} +0 -0
- /package/{ssrScanner.ts → quality/ssrScanner.ts} +0 -0
- /package/{storeAccessScanner.test.ts → quality/storeAccessScanner.test.ts} +0 -0
- /package/{storeAccessScanner.ts → quality/storeAccessScanner.ts} +0 -0
- /package/{storeSource.ts → quality/storeSource.ts} +0 -0
- /package/{storeWriteScanner.test.ts → quality/storeWriteScanner.test.ts} +0 -0
- /package/{storeWriteScanner.ts → quality/storeWriteScanner.ts} +0 -0
- /package/{structureScanner.test.ts → quality/structureScanner.test.ts} +0 -0
- /package/{structureScanner.ts → quality/structureScanner.ts} +0 -0
- /package/{testOnlyExportScanner.test.ts → quality/testOnlyExportScanner.test.ts} +0 -0
- /package/{testOnlyExportScanner.ts → quality/testOnlyExportScanner.ts} +0 -0
- /package/{writePath.test.ts → quality/writePath.test.ts} +0 -0
- /package/{writePath.ts → quality/writePath.ts} +0 -0
- /package/{writePlacementScanner.test.ts → quality/writePlacementScanner.test.ts} +0 -0
- /package/{writePlacementScanner.ts → quality/writePlacementScanner.ts} +0 -0
- /package/{writingActionIndex.test.ts → quality/writingActionIndex.test.ts} +0 -0
- /package/{writingActionIndex.ts → quality/writingActionIndex.ts} +0 -0
- /package/{subspaceReport.ts → subspace/subspaceReport.ts} +0 -0
- /package/{sshTunnel.ts → tunnel/sshTunnel.ts} +0 -0
- /package/{fileEditor.ts → util/fileEditor.ts} +0 -0
- /package/{fileSys.test.ts → util/fileSys.test.ts} +0 -0
- /package/{fileSys.ts → util/fileSys.ts} +0 -0
- /package/{jsonFormatter.ts → util/jsonFormatter.ts} +0 -0
- /package/{selectModel.ts → util/selectModel.ts} +0 -0
- /package/{semver.test.ts → util/semver.test.ts} +0 -0
- /package/{semver.ts → util/semver.ts} +0 -0
- /package/{shellOnlyEnv.test.ts → util/shellOnlyEnv.test.ts} +0 -0
- /package/{shellOnlyEnv.ts → util/shellOnlyEnv.ts} +0 -0
- /package/{spinner.test.ts → util/spinner.test.ts} +0 -0
- /package/{spinner.ts → util/spinner.ts} +0 -0
- /package/{stripAnsi.ts → util/stripAnsi.ts} +0 -0
- /package/{codegenLock.ts → workspace/codegenLock.ts} +0 -0
- /package/{getRelatedCnsts.ts → workspace/getRelatedCnsts.ts} +0 -0
- /package/{gitRevision.test.ts → workspace/gitRevision.test.ts} +0 -0
- /package/{gitRevision.ts → workspace/gitRevision.ts} +0 -0
- /package/{manifestDependencies.ts → workspace/manifestDependencies.ts} +0 -0
- /package/{packageExportsMap.ts → workspace/packageExportsMap.ts} +0 -0
- /package/{repoIdentity.ts → workspace/repoIdentity.ts} +0 -0
- /package/{types.ts → workspace/types.ts} +0 -0
- /package/{workspaceLayout.ts → workspace/workspaceLayout.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
A generated `errorCodes` guideline lists every code a framework error carries, with its status, whether it is forwarded, and whether the caller's JSON carries it; the `akan-err` skill ships it as a reference.
|
|
173
173
|
|
|
174
174
|
- d12f556: The barrel-import rewrite maps a name that a barrel re-exports by name from another barrel (`export { migration } from "./migration"`) to the file that declares it, as it already did through `export *`. It used to stop at the inner barrel, so a page that imported one name loaded every module behind it.
|
|
175
|
+
- a480576: A file moved since the fork point keeps its `akan.baseline.json` entries, whether it was moved with `git mv` or a plain rename. The growth check reads the committed entries under the path git pairs the file with, and `--fix` rewrites the working entries there, so moving a recorded file no longer fails as new debt. A move that also rewrote more than half the file, or left a file at the old path, still reads as new, since git no longer sees it as a move.
|
|
175
176
|
- 0504209: `akan build <app> --env <env>` builds for an environment other than the workspace `.env`'s, the way the desktop and mobile builds already do. Before, the shell's `AKAN_PUBLIC_ENV` lost to the `.env`, so a new workspace could only build `local` without editing it. The local-build notice, the image guard and the README now say what a `local` build changes in a built server: no endpoint rate limits, and local defaults for Redis and the database mode. They no longer say the dev routes are served, which a built server never does.
|
|
176
177
|
- bf872ce: A variable the shell sets now outranks the workspace `.env` when `akan` builds or runs an app, as dotenv and Bun's own `.env` loading do: `AKAN_PUBLIC_ENV=main akan build <app>` builds `main` where the `.env` says `local`. The order is `--env` (for `AKAN_PUBLIC_ENV`), then the process environment (the shell, and the `.env.local` and `.env.<NODE_ENV>` Bun loads into it), then the `.env`, then the defaults; an empty export counts as unset. The bundles, the bundled server env, `akan.env.json` and the Dockerfile still take one set of values. Where an exported value outranks the `.env`, `akan build` now warns with both values instead of the old warning that listed the values it ignored, and the server-env message, the `--env` help, the local-build notice, the README and the CLI reference state the new order.
|
|
177
178
|
|
|
@@ -216,6 +217,16 @@
|
|
|
216
217
|
|
|
217
218
|
- 1870fcd: `akan verify` adds a `fix:` line to a module file's two-parent import that names the layer barrel to import from instead, such as `import from "@apps/<app>/common"`. The lint message itself now points at the layer barrel too.
|
|
218
219
|
- 5691327: `setErrorConstructor` on `FetchClient`, `HttpClient` and `WsClient`, `HttpClientOptions.ErrorCls` and `FetchClient.build`'s `Err` option are deprecated. Every dictionary's `Err` is `akanjs/common`'s `Err`, which a restored error already is, so they change nothing. They keep working. A generated `lib/sig.ts` no longer calls `fetch.setErrorConstructor(Err)`, and a generated `lib/useClient.ts` no longer passes `{ Err: pageProto.Err }`; `akan sync` rewrites both. No upgrade step is needed.
|
|
220
|
+
- 7c39aea: The 82 source files at the root of `@akanjs/devkit` now sit in folders by concern:
|
|
221
|
+
|
|
222
|
+
- `quality/`: the maintainability gate and its scanners
|
|
223
|
+
- `context/`: `akan context` and the MCP contract
|
|
224
|
+
- `guideline/`: guidelines and the files `akan agent install` writes
|
|
225
|
+
- `app/` (the app build runner and reporter, the route JS budget, route source checks and the signal test preload), `workspace/`, `docs/`, `subspace/`, `tunnel/` and `util/`, and `test/` for the shared test helpers
|
|
226
|
+
- `lint/`, `typecheck/` and `executors/`, which already existed (`executors.ts` is now `executors/index.ts`)
|
|
227
|
+
|
|
228
|
+
Each old root subpath (`@akanjs/devkit/scanInfo`, `@akanjs/devkit/workspaceLayout.ts`, …) is an explicit entry in `exports` pointing at the file's new place, so existing imports keep working. Those aliases are deprecated and go away in the next minor; import from the folder path instead (`@akanjs/devkit/workspace/scanInfo`). The package root now holds only the type barrel, and a test keeps it that way.
|
|
229
|
+
|
|
219
230
|
- 76ab8d4: `akan doctor` exits with code 1 when its report says `"status": "failed"`, in text or JSON, with or without `--strict`, and for `--ios`, so the `agent:doctor` script (`akan doctor --strict --format json`) or a CI step fails on it. Before, it always exited 0. The full report still prints on stdout. A warning never changes the exit code: `--strict` still only decides which conventions count as errors, today a missing module abstract. Doctor's `dictionary-label-missing` now reads both a constant's fields and its dictionary's labels from their syntax, ignoring comments and strings. A field that appears only in a comment no longer asks for a label: a new `--sample` workspace no longer warns about `task`'s `priority`, `tags`, `assignee` and `completedAt` or `workHistory`'s `actor` and `previousStatus`, which its constants suggest only in comments. A label that exists only in a comment, or a `name:` inside a string, no longer counts, so a field whose label is commented out now warns.
|
|
220
231
|
- 245d318: A font declared on a root layout now gets its metric-adjusted fallback faces: `@font-face` rules named `"<font> fallback"` that draw a local system font with `size-adjust`, `ascent-override` and `descent-override` matched to the web font. The variable `--font-<name>` already named that family, but the build never wrote it, because fontaine's `readMetrics` takes a URL and returned nothing for the file path it was given. While a web font loaded (`font-display: swap`), text drew in the browser's default font, usually a serif, and moved when the web font arrived. The metrics are read from the source font, not the subset, so a subset without Latin letters (`subsets: ["ks-x-1001"]`, or only `subsetText`) still sizes the fallback correctly. A font whose metrics cannot be read keeps its face and gets no fallback, as before. Set `adjustFontFallback: false` on a font to keep the old output. Cached font output from `akan start` is regenerated once.
|
|
221
232
|
- 6f6cc2a: A fresh clone of a workspace now builds and starts after `bun install` alone. The env files that hold secrets stay gitignored, so a clone has none of them: before, `akan typecheck`, `akan build` and `akan verify` failed with `Cannot find module './env.server.local'`, and with no `.env` the CLI picked the `debug` environment, so `akan build` stopped asking for `AKAN_PUBLIC_REPO_NAME` and `AKAN_PUBLIC_SERVE_DOMAIN`.
|
|
@@ -277,7 +288,7 @@
|
|
|
277
288
|
Starting the browser now has its own bound of 120 s, `startTimeoutMs` on `PreviewView.probe`. Running out of it reads `Timed out starting the <engine> browser after 120 s.`, where the engine is `chrome` or `webkit`. A browser that misses its bound may still come up late, so later pages in that process try again, but each waits only its own `timeoutMs` for the browser. Once the browser answers, the full bound applies again. So a browser that never starts holds the first page for 120 s, where before it held it for `timeoutMs` (60 s for `akan preview`, 30 s for the code agent's check).
|
|
278
289
|
|
|
279
290
|
- eefd9cb: `akan preview <app> /_akan/studio` opens Studio instead of a 404. Preview added the default locale to every path, and the server routes `/_akan/*` without one, so `/en/_akan/studio` matched no page. A path under `/_akan`, `/__csr`, `/__rsc`, `/.well-known` or the app's API prefix, a file the app's `public/` holds, and the server's own `/favicon.ico`, `/robots.txt`, `/sitemap.xml` (at the root only, the one place the server answers it) and `manifest.webmanifest` now open as written: no locale, and no CSR boot query under `--csr`. Every other path, including one that already starts with a locale or ends in a dotted segment such as `/release/1.2.3`, is a page and gets the default locale as before. The `akan-debug` skill and the `akan preview` reference say so.
|
|
280
|
-
- 01ca04b: `akan preview` opens `/openapi.json` and
|
|
291
|
+
- 01ca04b: `akan preview` opens `/openapi.json` and `/mcp` as written, as the server mounts them outside `/:lang`; before, they got the default locale and opened a 404 page. `/mcp` answers only `POST`, so its preview fails with 405, and the docs say preview cannot check it. A full URL (`http://localhost:<port>/oauth/token`) now opens its path and query with no locale and no CSR boot query, so an endpoint mounted outside the API prefix can be opened; before, a full URL was taken by its path and given the locale. Preview always stays on the app's dev server, for a path that starts with `//` too, and notes a full URL that names another server. `--csr` prints a note naming each path it opens without the CSR boot instead of dropping the flag silently. A page `--changed` finds opens as a page even at a server route's path such as `/openapi.json`, under the same locale rule as a typed page, and a trailing slash names the same page, so `/en` and `/en/` open once. A screenshot's file name carries the page's query and a short hash of the query as sent, a path that is not plain lower-case words carries a hash of the path, and a long path or query is cut with a hash, so `/a/b` and `/a-b`, `?a=b+c` and `?a=b%20c`, or `/_akan/studio?view=runtime` and `?view=signals` no longer overwrite one another and a long query no longer fails the page. The `akan-debug` skill, `akan preview --help` and the `akan preview` reference state the same rule.
|
|
281
292
|
- b101fcf: `akan remove-application`, `remove-library`, `remove-package`, `remove-module` and `remove-scalar` no longer delete a target they picked themselves. Left out, or named but not in the workspace, the target is refused in a terminal or not, with the choices and the line to rerun, such as `` Missing app: this command deletes files and never picks its target, so rerun it as `akan remove-application <app>` (choices: pokedex). `` Before, `akan remove-application` in a one-app workspace removed `apps/<app>` without asking, and without a terminal `akan remove-scalar <name>` removed the scalar from the only app or lib. A terminal is no longer offered a select for these commands. Other commands still take the only app, or the only app or lib without a terminal, as before. A command declares this with `destructive: true` on its target.
|
|
282
293
|
- 44149b1: `akan remove-module` now removes a service module named exactly, as in `akan remove-module pokedex:_billing` for `apps/pokedex/lib/_billing`. Before, no command could remove a service module: `remove-module` left out every `lib/_<name>` folder and refused one by name with `Invalid module name: _billing`. A service module left out or misnamed gets the same refusal as any target of a remove command, and its choices now list the service modules. `create-view`, `create-unit`, `create-template` and `create-crud-page` still take only a model module. A command opts in to service modules by taking `ModuleOrService` instead of `Module`.
|
|
283
294
|
- 4fcf44f: A new `rename-key` workflow renames a slice key or a Filter query key everywhere it is spelled. That covers the key itself, every name derived from it (`initMemoInPublic`, `memoListInPublic`, `queryByName`) in the app and every lib, and its module dictionary entry. It is the same rename the editor extension's F2 runs, so agents get it through `plan_workflow` / `apply_workflow` and the CLI through `akan workflow plan rename-key --app <app> --module <module> --slice <key> --to <newKey>` (or `--query <key>`). The plan lists each file it will change. A use that could also be another model's is left alone, and `akan verify` then reports it.
|
|
@@ -522,6 +533,7 @@
|
|
|
522
533
|
- Updated dependencies [d9eaacc]
|
|
523
534
|
- Updated dependencies [c334caf]
|
|
524
535
|
- Updated dependencies [170be15]
|
|
536
|
+
- Updated dependencies [d9f5ad5]
|
|
525
537
|
- Updated dependencies [f314eba]
|
|
526
538
|
- Updated dependencies [e143263]
|
|
527
539
|
- Updated dependencies [e4f7876]
|
package/README.ko.md
CHANGED
|
@@ -26,7 +26,7 @@ bun add -d @akanjs/devkit
|
|
|
26
26
|
## 사용 예시
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
|
-
import { ApplicationBuildRunner } from "@akanjs/devkit/applicationBuildRunner";
|
|
29
|
+
import { ApplicationBuildRunner } from "@akanjs/devkit/app/applicationBuildRunner";
|
|
30
30
|
import { AppExecutor, WorkspaceExecutor } from "@akanjs/devkit/executors";
|
|
31
31
|
|
|
32
32
|
const workspace = WorkspaceExecutor.fromRoot();
|
|
@@ -39,7 +39,8 @@ await runner.build();
|
|
|
39
39
|
|
|
40
40
|
값은 그것을 가진 facet에서 import합니다(`@akanjs/devkit/executors`, `@akanjs/devkit/akanConfig`,
|
|
41
41
|
`@akanjs/devkit/workflow` 등). 루트 `@akanjs/devkit` 진입점은 타입만 내보내므로, 도구 하나를 불러도 모든 facet이
|
|
42
|
-
프로세스에 올라오지 않습니다.
|
|
42
|
+
프로세스에 올라오지 않습니다. facet이 따로 없는 도구는 그 폴더에서 import합니다(`@akanjs/devkit/app/…`, `quality/`,
|
|
43
|
+
`workspace/`, `util/` 등). 이 도구들이 패키지 루트에 있던 시절의 경로는 다음 minor 릴리스까지 계속 동작합니다.
|
|
43
44
|
|
|
44
45
|
## 제공하는 것
|
|
45
46
|
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ bun add -d @akanjs/devkit
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import { ApplicationBuildRunner } from "@akanjs/devkit/applicationBuildRunner";
|
|
28
|
+
import { ApplicationBuildRunner } from "@akanjs/devkit/app/applicationBuildRunner";
|
|
29
29
|
import { AppExecutor, WorkspaceExecutor } from "@akanjs/devkit/executors";
|
|
30
30
|
|
|
31
31
|
const workspace = WorkspaceExecutor.fromRoot();
|
|
@@ -38,7 +38,9 @@ await runner.build();
|
|
|
38
38
|
|
|
39
39
|
Import values from the facet that owns them (`@akanjs/devkit/executors`, `@akanjs/devkit/akanConfig`,
|
|
40
40
|
`@akanjs/devkit/workflow`, …). The root `@akanjs/devkit` entry exports types only, so loading a tool does not pull
|
|
41
|
-
every facet into the process.
|
|
41
|
+
every facet into the process. A tool with no facet of its own is imported from its folder (`@akanjs/devkit/app/…`,
|
|
42
|
+
`quality/`, `workspace/`, `util/`, …); the paths these tools had at the package root still resolve until the next
|
|
43
|
+
minor release.
|
|
42
44
|
|
|
43
45
|
## What It Provides
|
|
44
46
|
|
|
@@ -3,7 +3,7 @@ import { realpath, rm, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { Logger } from "akanjs/common";
|
|
5
5
|
import type { App } from "../commandDecorators";
|
|
6
|
-
import { tempDirs, writeText } from "../testHelpers";
|
|
6
|
+
import { tempDirs, writeText } from "../test/testHelpers";
|
|
7
7
|
import { BackendImportGraph } from "./BackendImportGraph";
|
|
8
8
|
import { filesChangedSince } from "./devHostPolicy";
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import type { BuilderMessage } from "akanjs/server";
|
|
4
4
|
import { IncrementalBuilderHost } from "../incrementalBuilder";
|
|
5
|
-
import { createTempApp, isolateEnv, tempRoots, writeText } from "../testHelpers";
|
|
5
|
+
import { createTempApp, isolateEnv, tempRoots, writeText } from "../test/testHelpers";
|
|
6
6
|
import { AkanAppHost } from "./akanApp.host";
|
|
7
7
|
import type { DevHostEvent } from "./devHostPolicy";
|
|
8
8
|
|
package/akanApp/akanApp.host.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Logger } from "akanjs/common";
|
|
2
2
|
import type { BuilderMessage } from "akanjs/server";
|
|
3
3
|
import type { App } from "../commandDecorators";
|
|
4
|
-
import { createTunnel } from "../createTunnel";
|
|
5
4
|
import { WorkspaceExecutor } from "../executors";
|
|
6
5
|
import type { DevStdioMode } from "../incrementalBuilder";
|
|
6
|
+
import { createTunnel } from "../tunnel/createTunnel";
|
|
7
7
|
import { BackendImportGraph } from "./BackendImportGraph";
|
|
8
8
|
import { BuilderGap } from "./builderGap";
|
|
9
9
|
import { BuilderRequestRelay } from "./builderRequestRelay";
|
|
@@ -5,7 +5,7 @@ import path from "node:path";
|
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { AppExecutor, WorkspaceExecutor } from "../executors";
|
|
7
7
|
import { NativeConfig } from "../mobile/nativeConfig";
|
|
8
|
-
import type { PackageJson } from "../types";
|
|
8
|
+
import type { PackageJson } from "../workspace/types";
|
|
9
9
|
import { AkanAppConfig, AkanLibConfig, deriveDefaultAppId } from "./akanConfig";
|
|
10
10
|
import type { LibConfigInput } from "./types";
|
|
11
11
|
|
package/akanConfig/akanConfig.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { AkanImageConfig } from "akanjs/server";
|
|
|
9
9
|
import type { App, Lib } from "../commandDecorators";
|
|
10
10
|
import { WorkspaceExecutor } from "../executors/workspaceExecutor";
|
|
11
11
|
import { ServerEnvProfile } from "../transforms/serverEnvProfile";
|
|
12
|
-
import type { BaseDevEnv, PackageJson } from "../types";
|
|
12
|
+
import type { BaseDevEnv, PackageJson } from "../workspace/types";
|
|
13
13
|
import { AkanBin } from "./akanBin";
|
|
14
14
|
import {
|
|
15
15
|
type AkanApiConfig,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import type { SubspaceConfigInput, WorkspaceConfig, WorkspacePipelineConfig } from "akanjs";
|
|
3
3
|
import type { WorkspaceExecutor } from "../executors";
|
|
4
|
-
import { FileSys } from "../fileSys";
|
|
4
|
+
import { FileSys } from "../util/fileSys";
|
|
5
5
|
import { AkanAppConfig } from "./akanConfig";
|
|
6
6
|
|
|
7
7
|
/** The workspace root's own `akan.config.ts`: settings that belong to no app. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdtemp, rm } from "node:fs/promises";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import type { PackageJson } from "../types";
|
|
4
|
+
import type { PackageJson } from "../workspace/types";
|
|
5
5
|
|
|
6
6
|
export class ProductionLockfile {
|
|
7
7
|
static readonly fileName = "bun.lock";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, setDefaultTimeout, test } from "bun:test";
|
|
2
2
|
import { rm } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { tempDirs, writeText } from "../testHelpers";
|
|
4
|
+
import { tempDirs, writeText } from "../test/testHelpers";
|
|
5
5
|
import { ApiReport } from "./apiReport";
|
|
6
6
|
import { ApiReportDiff } from "./apiReportDiff";
|
|
7
7
|
import { ApiReportPolicy } from "./apiReportPolicy";
|
|
@@ -2,15 +2,15 @@ import { describe, expect, spyOn, test } from "bun:test";
|
|
|
2
2
|
import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { AkanAppConfig } from "
|
|
6
|
-
import { ProductionLockfile } from "
|
|
5
|
+
import { AkanAppConfig } from "../akanConfig";
|
|
6
|
+
import { ProductionLockfile } from "../akanConfig/productionLockfile";
|
|
7
|
+
import type { App } from "../commandDecorators";
|
|
8
|
+
import { AppExecutor, Executor } from "../executors";
|
|
9
|
+
import { AllRoutesBuilder, type BuildAllRoutesResult, VendorNarrowing } from "../frontendBuild";
|
|
10
|
+
import { bundleDefine } from "../frontendBuild/bundleDefine";
|
|
11
|
+
import { createTempApp } from "../test/testHelpers";
|
|
12
|
+
import { ProjectTypecheck } from "../typecheck/projectTypecheck";
|
|
7
13
|
import { AKAN_BACKEND_MINIFY, AKAN_OPTIONAL_BACKEND_EXTERNALS, ApplicationBuildRunner } from "./applicationBuildRunner";
|
|
8
|
-
import type { App } from "./commandDecorators";
|
|
9
|
-
import { AppExecutor, Executor } from "./executors";
|
|
10
|
-
import { AllRoutesBuilder, type BuildAllRoutesResult, VendorNarrowing } from "./frontendBuild";
|
|
11
|
-
import { bundleDefine } from "./frontendBuild/bundleDefine";
|
|
12
|
-
import { createTempApp } from "./testHelpers";
|
|
13
|
-
import { ProjectTypecheck } from "./typecheck/projectTypecheck";
|
|
14
14
|
|
|
15
15
|
describe("ApplicationBuildRunner", () => {
|
|
16
16
|
test("externalizes Akan optional backend dependencies", () => {
|
|
@@ -2,14 +2,9 @@ import path from "node:path";
|
|
|
2
2
|
import { toError } from "akanjs/common";
|
|
3
3
|
import { BUILD_ENV_FILE } from "akanjs/server/lifecycle/buildEnv";
|
|
4
4
|
import type { BunPlugin } from "bun";
|
|
5
|
-
import { ProductionLockfile } from "
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
ApplicationBuildProgressReporter,
|
|
9
|
-
ApplicationBuildResult,
|
|
10
|
-
} from "./applicationBuildReporter";
|
|
11
|
-
import type { App } from "./commandDecorators";
|
|
12
|
-
import { parseEnvFile, WorkspaceExecutor } from "./executors";
|
|
5
|
+
import { ProductionLockfile } from "../akanConfig/productionLockfile";
|
|
6
|
+
import type { App } from "../commandDecorators";
|
|
7
|
+
import { parseEnvFile, WorkspaceExecutor } from "../executors";
|
|
13
8
|
import {
|
|
14
9
|
AllRoutesBuilder,
|
|
15
10
|
CsrArtifactBuilder,
|
|
@@ -18,13 +13,18 @@ import {
|
|
|
18
13
|
precompressArtifacts,
|
|
19
14
|
SsrBaseArtifactBuilder,
|
|
20
15
|
VendorImportScanner,
|
|
21
|
-
} from "
|
|
16
|
+
} from "../frontendBuild";
|
|
17
|
+
import { createServerEnvPlugin } from "../transforms/serverEnvPlugin";
|
|
18
|
+
import { ServerEnvProfile } from "../transforms/serverEnvProfile";
|
|
19
|
+
import { ProjectTypecheck } from "../typecheck/projectTypecheck";
|
|
20
|
+
import { Spinner } from "../util/spinner";
|
|
21
|
+
import type { BaseDevEnv, PackageJson } from "../workspace/types";
|
|
22
|
+
import type {
|
|
23
|
+
ApplicationBuildPhaseResult,
|
|
24
|
+
ApplicationBuildProgressReporter,
|
|
25
|
+
ApplicationBuildResult,
|
|
26
|
+
} from "./applicationBuildReporter";
|
|
22
27
|
import { RouteJsBudget, type RouteJsBudgetMode, type RouteJsBudgetStatus, type RouteJsSize } from "./routeJsBudget";
|
|
23
|
-
import { Spinner } from "./spinner";
|
|
24
|
-
import { createServerEnvPlugin } from "./transforms/serverEnvPlugin";
|
|
25
|
-
import { ServerEnvProfile } from "./transforms/serverEnvProfile";
|
|
26
|
-
import { ProjectTypecheck } from "./typecheck/projectTypecheck";
|
|
27
|
-
import type { BaseDevEnv, PackageJson } from "./types";
|
|
28
28
|
|
|
29
29
|
export interface TypecheckOptions {
|
|
30
30
|
clean?: boolean;
|
|
@@ -23,7 +23,7 @@ export async function resolveSignalTestPreloadPath(target: SignalTestPreloadTarg
|
|
|
23
23
|
path.join(process.cwd(), "node_modules/akanjs", SIGNAL_TEST_PRELOAD_PATH),
|
|
24
24
|
path.join(process.cwd(), "pkgs/akanjs", SIGNAL_TEST_PRELOAD_PATH),
|
|
25
25
|
path.join(path.dirname(Bun.main), "../../akanjs", SIGNAL_TEST_PRELOAD_PATH),
|
|
26
|
-
path.resolve(import.meta.dir, "
|
|
26
|
+
path.resolve(import.meta.dir, "../../../akanjs", SIGNAL_TEST_PRELOAD_PATH),
|
|
27
27
|
);
|
|
28
28
|
|
|
29
29
|
const uniqueCandidates = [...new Set(candidates)];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { tempDirs, writeText as write } from "../test/testHelpers";
|
|
3
4
|
import { RouteJsBudget, type RouteJsSize } from "./routeJsBudget";
|
|
4
|
-
import { tempDirs, writeText as write } from "./testHelpers";
|
|
5
5
|
|
|
6
6
|
const makeTempRoot = tempDirs("akan-route-js-");
|
|
7
7
|
const size = (routeId: string, brotliKB: number): RouteJsSize => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { toError } from "akanjs/common";
|
|
3
|
-
import { FontPruner } from "
|
|
4
|
-
import { JsonFormatter } from "
|
|
3
|
+
import { FontPruner } from "../frontendBuild/fontPruner";
|
|
4
|
+
import { JsonFormatter } from "../util/jsonFormatter";
|
|
5
5
|
|
|
6
6
|
export interface RouteJsSize {
|
|
7
7
|
routeId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { tempDirs, writeText as write } from "../testHelpers";
|
|
3
|
+
import { tempDirs, writeText as write } from "../test/testHelpers";
|
|
4
4
|
import { resolveSsrPageEntries } from "./implicitRootLayout";
|
|
5
5
|
|
|
6
6
|
const makeTempRoot = tempDirs("akan-implicit-root-layout-");
|
package/cloud/cloudApi.test.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { readFile, rm } from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import type { Workspace } from "../commandDecorators";
|
|
6
|
-
import { tempDirs, writeJson, writeText } from "../testHelpers";
|
|
6
|
+
import { tempDirs, writeJson, writeText } from "../test/testHelpers";
|
|
7
7
|
import { CloudApi } from "./cloudApi";
|
|
8
8
|
|
|
9
9
|
// The cloud rotates a refresh token on every use and treats a second use as theft, revoking every session.
|
package/cloud/configLock.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { tempDirs } from "../testHelpers";
|
|
4
|
+
import { tempDirs } from "../test/testHelpers";
|
|
5
5
|
import { ConfigLock } from "./configLock";
|
|
6
6
|
|
|
7
7
|
const makeRoot = tempDirs("akan-config-lock-");
|
|
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
|
|
|
2
2
|
import { mkdir, stat } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
|
-
import { tempDirs } from "../testHelpers";
|
|
5
|
+
import { tempDirs } from "../test/testHelpers";
|
|
6
6
|
import { GlobalConfig } from "./globalConfig";
|
|
7
7
|
|
|
8
8
|
const tempHome = tempDirs("akan-global-config-");
|
package/cloud/globalConfig.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { rm, writeFile } from "node:fs/promises";
|
|
2
2
|
import { trimTrailingSlashes } from "akanjs/common";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
|
-
import { FileSys } from "../fileSys";
|
|
4
|
+
import { FileSys } from "../util/fileSys";
|
|
5
5
|
import { ConfigLock } from "./configLock";
|
|
6
6
|
import {
|
|
7
7
|
type AccessToken,
|
|
@@ -3,7 +3,7 @@ import { createHash } from "node:crypto";
|
|
|
3
3
|
import { truncate, writeFile } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import type { Workspace } from "../commandDecorators";
|
|
6
|
-
import { tempDirs } from "../testHelpers";
|
|
6
|
+
import { tempDirs } from "../test/testHelpers";
|
|
7
7
|
import { CloudApi } from "./cloudApi";
|
|
8
8
|
import { UpdatePackUpload } from "./updatePackUpload";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { FileSys } from "../../fileSys";
|
|
4
|
+
import { FileSys } from "../../util/fileSys";
|
|
5
5
|
import { AkanCodeEnv } from "./AkanCodeEnv";
|
|
6
6
|
|
|
7
7
|
// Two candidates: the CLI bundle flattens entry chunks into the package root, where `skills/` is a sibling.
|
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import type { ExtensionAPI, InlineExtension } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { type CodeAgentEvent, type CodeAgentProfile, codeAgentPresets } from "akanjs/common";
|
|
6
6
|
import { WorkspaceExecutor } from "../../executors";
|
|
7
|
-
import { isolateEnv, tempDirs } from "../../testHelpers";
|
|
7
|
+
import { isolateEnv, tempDirs } from "../../test/testHelpers";
|
|
8
8
|
import { AkanCodePlugins } from "../tools/AkanCodePlugins";
|
|
9
9
|
import { akanCodeDefaultModel, type CodeAgentModelRef } from "./akanCodeModel";
|
|
10
10
|
import { akanCodePaths } from "./akanCodePaths";
|
|
@@ -16,11 +16,14 @@ the server errors logged meanwhile, console errors and warnings, and layout smel
|
|
|
16
16
|
running one.
|
|
17
17
|
- Paths are comma-separated (`akan preview <app> /board,/board/new`) and get the default locale when they lack
|
|
18
18
|
one, unless the app sets `localePrefix: "as-needed"` and `--csr` is off. What the server answers outside a
|
|
19
|
-
locale opens as written: a `/_akan` route such as Studio
|
|
20
|
-
API prefix, `/__csr`, `/__rsc`, `/.well-known`,
|
|
21
|
-
`/robots.txt`, `/sitemap.xml`, `manifest.webmanifest` and a file in
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
locale opens as written, with no locale and no CSR boot query: a `/_akan` route such as Studio
|
|
20
|
+
(`/_akan/studio?view=runtime`), a route under the API prefix, `/__csr`, `/__rsc`, `/.well-known`,
|
|
21
|
+
`/openapi.json`, `/mcp`, `/favicon.ico`, `/robots.txt`, `/sitemap.xml`, `manifest.webmanifest` and a file in
|
|
22
|
+
the app's `public/`; `--csr` prints a note naming them. `/mcp` answers only `POST`, so preview cannot check it
|
|
23
|
+
(it fails with 405); the `akan-mcp` exposure test does. A full URL (`http://localhost:<port>/oauth/token`)
|
|
24
|
+
opens its path and query the same way, always on the app's dev server, with a note when it names another
|
|
25
|
+
server: use it for an endpoint mounted outside the API prefix. A page `--changed` finds opens as a page even at
|
|
26
|
+
a server route's path, under the same locale rule, and `/en` and `/en/` open once.
|
|
24
27
|
`--changed` adds the pages your uncommitted page and layout edits reach. A dynamic route needs a concrete
|
|
25
28
|
path (`/memo/1`); `akan context --app <app>` lists every route with its params and search names.
|
|
26
29
|
- The viewport is a 390x844 phone; `--desktop` is 1280x800. `--csr` loads each page in the CSR boot the native
|
|
@@ -77,7 +77,7 @@ export class AkanToolPack {
|
|
|
77
77
|
|
|
78
78
|
static async #guidelineNames() {
|
|
79
79
|
try {
|
|
80
|
-
const { Prompter } = await import("../../prompter");
|
|
80
|
+
const { Prompter } = await import("../../guideline/prompter");
|
|
81
81
|
return await Prompter.listGuidelines();
|
|
82
82
|
} catch {
|
|
83
83
|
return [];
|
|
@@ -3,7 +3,7 @@ import { mkdtempSync, rmSync } from "node:fs";
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { codeAgentPresets } from "akanjs/common";
|
|
6
|
-
import { makeCliTempWorkspace, tempRoots, writeText } from "../../testHelpers";
|
|
6
|
+
import { makeCliTempWorkspace, tempRoots, writeText } from "../../test/testHelpers";
|
|
7
7
|
import { CodeAgent, type CodeAgentOptions } from "../agent/CodeAgent";
|
|
8
8
|
import { SubagentPool } from "../agent/SubagentPool";
|
|
9
9
|
import { WorkspaceTrust } from "../agent/WorkspaceTrust";
|
|
@@ -8,7 +8,6 @@ import type {
|
|
|
8
8
|
import { Logger } from "akanjs/common";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
import { type Command, type CommanderError, program } from "commander";
|
|
11
|
-
import { AppSelectionMemory } from "../appSelectionMemory";
|
|
12
11
|
import {
|
|
13
12
|
AppExecutor,
|
|
14
13
|
Executor,
|
|
@@ -19,8 +18,9 @@ import {
|
|
|
19
18
|
WorkspaceExecutor,
|
|
20
19
|
} from "../executors";
|
|
21
20
|
// Never the root barrel: it drags ink, ssh2 and the cloud stack into every command process.
|
|
22
|
-
import { FileSys, getDirname } from "../fileSys";
|
|
23
|
-
import
|
|
21
|
+
import { FileSys, getDirname } from "../util/fileSys";
|
|
22
|
+
import { AppSelectionMemory } from "../workspace/appSelectionMemory";
|
|
23
|
+
import type { PackageJson } from "../workspace/types";
|
|
24
24
|
import {
|
|
25
25
|
type ArgMeta,
|
|
26
26
|
type CommandContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, mock, test } from "bun:test";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { AppExecutor, LibExecutor, ModuleExecutor, PkgExecutor, WorkspaceExecutor } from "../executors";
|
|
4
|
-
import { makeCliTempWorkspace, tempRoots, writeText } from "../testHelpers";
|
|
4
|
+
import { makeCliTempWorkspace, tempRoots, writeText } from "../test/testHelpers";
|
|
5
5
|
import {
|
|
6
6
|
App,
|
|
7
7
|
type ArgMeta,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { mkdir, symlink } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { tempDirs, writeJson } from "../testHelpers";
|
|
4
|
+
import { tempDirs, writeJson } from "../test/testHelpers";
|
|
5
5
|
import { WorkspaceVersionCheck } from "./workspaceVersionCheck";
|
|
6
6
|
|
|
7
7
|
const makeRoot = tempDirs("akan-version-check-");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import type { PackageJson } from "../types";
|
|
3
|
+
import type { PackageJson } from "../workspace/types";
|
|
4
4
|
|
|
5
5
|
export class WorkspaceVersionCheck {
|
|
6
6
|
static readonly #exemptCommands = new Set(["update", "create-workspace"]);
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { readdir } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { capitalize, isRecord, parseRouteModuleKey } from "akanjs/common";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { FileSys } from "
|
|
7
|
-
import { unlabeledFieldNames } from "./moduleFieldNames";
|
|
8
|
-
import { collectRecipeSources, findInlineRecipeDuplicates, scanRecipes } from "./recipeScanner";
|
|
9
|
-
import type { PackageJson } from "./types";
|
|
4
|
+
import { AppExecutor, LibExecutor, type SysExecutor, type WorkspaceExecutor } from "../executors";
|
|
5
|
+
import { extractBlockVersion, readDevkitVersion } from "../guideline/agentsIndex";
|
|
6
|
+
import { FileSys } from "../util/fileSys";
|
|
10
7
|
import {
|
|
11
8
|
type GeneratedSyncState,
|
|
12
9
|
type RepairAction,
|
|
@@ -16,7 +13,8 @@ import {
|
|
|
16
13
|
workflowPathsForPlan,
|
|
17
14
|
workflowRunArtifactPath,
|
|
18
15
|
workflowSyncDir,
|
|
19
|
-
} from "
|
|
16
|
+
} from "../workflow";
|
|
17
|
+
import type { PackageJson } from "../workspace/types";
|
|
20
18
|
import {
|
|
21
19
|
barrelFacetDirs,
|
|
22
20
|
facetIndexShadowOf,
|
|
@@ -24,7 +22,9 @@ import {
|
|
|
24
22
|
rootAllowedDirs,
|
|
25
23
|
rootAllowedFiles,
|
|
26
24
|
rootEntryHintOf,
|
|
27
|
-
} from "
|
|
25
|
+
} from "../workspace/workspaceLayout";
|
|
26
|
+
import { unlabeledFieldNames } from "./moduleFieldNames";
|
|
27
|
+
import { collectRecipeSources, findInlineRecipeDuplicates, scanRecipes } from "./recipeScanner";
|
|
28
28
|
|
|
29
29
|
export type AkanContextFormat = "json" | "markdown";
|
|
30
30
|
export type AkanModuleKind = "domain" | "service" | "scalar";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { mkdir, symlink } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { createTempApp, tempRoots } from "../test/testHelpers";
|
|
4
5
|
import { createAkanValidationContract, workflowArtifactPath } from "./akanMcpContract";
|
|
5
|
-
import { createTempApp, tempRoots } from "./testHelpers";
|
|
6
6
|
|
|
7
7
|
const track = tempRoots();
|
|
8
8
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { lstatSync, realpathSync } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { isRecord } from "akanjs/common";
|
|
4
|
-
import
|
|
5
|
-
import { AkanMcpToolError } from "./akanMcpToolError";
|
|
6
|
-
import type { Workspace } from "./commandDecorators";
|
|
4
|
+
import type { Workspace } from "../commandDecorators";
|
|
7
5
|
import type {
|
|
8
6
|
AkanContextEvidence,
|
|
9
7
|
AkanContextNext,
|
|
@@ -12,8 +10,10 @@ import type {
|
|
|
12
10
|
InspectAkanContextResult,
|
|
13
11
|
WorkflowDiagnostic,
|
|
14
12
|
WorkflowPlanInputs,
|
|
15
|
-
} from "
|
|
16
|
-
import { buildAkanModuleContextIndex, createWorkflowBaselineSummary, toolingRolloutGate } from "
|
|
13
|
+
} from "../workflow";
|
|
14
|
+
import { buildAkanModuleContextIndex, createWorkflowBaselineSummary, toolingRolloutGate } from "../workflow";
|
|
15
|
+
import { AkanContextAnalyzer, type AkanDiagnostic, type AkanModuleContext } from "./akanContext";
|
|
16
|
+
import { AkanMcpToolError } from "./akanMcpToolError";
|
|
17
17
|
|
|
18
18
|
export type McpToolDefinition = {
|
|
19
19
|
name: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { writeFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { tempDirs } from "../test/testHelpers";
|
|
4
5
|
import { collectRecipeSources, findInlineRecipeDuplicates, type RecipeInfo, scanRecipes } from "./recipeScanner";
|
|
5
|
-
import { tempDirs } from "./testHelpers";
|
|
6
6
|
|
|
7
7
|
const byName = (recipes: RecipeInfo[], name: string) => recipes.find((recipe) => recipe.name === name);
|
|
8
8
|
|
package/devkitUtils.test.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import { realpath } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { ApplicationBuildReporter } from "./applicationBuildReporter";
|
|
5
|
-
import { resolveSignalTestPreloadPath } from "./applicationTestPreload";
|
|
6
|
-
import { TypeScriptDependencyScanner } from "./dependencyScanner";
|
|
4
|
+
import { ApplicationBuildReporter } from "./app/applicationBuildReporter";
|
|
5
|
+
import { resolveSignalTestPreloadPath } from "./app/applicationTestPreload";
|
|
7
6
|
import { AppExecutor, WorkspaceExecutor } from "./executors";
|
|
8
|
-
import { tempDirs, writeText as write } from "./testHelpers";
|
|
9
|
-
import
|
|
7
|
+
import { tempDirs, writeText as write } from "./test/testHelpers";
|
|
8
|
+
import { TypeScriptDependencyScanner } from "./workspace/dependencyScanner";
|
|
9
|
+
import type { PackageJson, TsConfigJson } from "./workspace/types";
|
|
10
10
|
|
|
11
11
|
const makeTempRoot = tempDirs("akan-devkit-utils-");
|
|
12
12
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { AgentAssets } from "
|
|
3
|
+
import { AgentAssets } from "../guideline/agentAssets";
|
|
4
4
|
import { ApiReference } from "./apiReference";
|
|
5
5
|
|
|
6
|
-
const akanjsDir = path.resolve(import.meta.dir, "
|
|
7
|
-
const target = ApiReference.target(path.resolve(import.meta.dir, "
|
|
6
|
+
const akanjsDir = path.resolve(import.meta.dir, "../../../akanjs");
|
|
7
|
+
const target = ApiReference.target(path.resolve(import.meta.dir, "../../cli"));
|
|
8
8
|
|
|
9
9
|
describe("ApiReference", () => {
|
|
10
10
|
const rendered = ApiReference.render(akanjsDir);
|
|
11
11
|
|
|
12
|
-
test("the committed guideline matches the akanjs sources; regenerate with bun pkgs/@akanjs/devkit/apiReference.ts", async () => {
|
|
12
|
+
test("the committed guideline matches the akanjs sources; regenerate with bun pkgs/@akanjs/devkit/docs/apiReference.ts", async () => {
|
|
13
13
|
expect(await Bun.file(target).text()).toBe(rendered);
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -234,7 +234,7 @@ export class ApiReference {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
if (import.meta.main) {
|
|
237
|
-
const akanjsDir = path.resolve(import.meta.dir, "
|
|
238
|
-
const target = ApiReference.target(path.resolve(import.meta.dir, "
|
|
237
|
+
const akanjsDir = path.resolve(import.meta.dir, "../../../akanjs");
|
|
238
|
+
const target = ApiReference.target(path.resolve(import.meta.dir, "../../cli"));
|
|
239
239
|
await Bun.write(target, ApiReference.render(akanjsDir));
|
|
240
240
|
}
|