akanjs 2.0.6 → 2.1.0-rc.0
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/README.ko.md +5 -5
- package/README.md +5 -5
- package/client/router.ts +10 -3
- package/constant/serialize.ts +1 -1
- package/document/documentSchema.ts +9 -1
- package/index.ts +187 -0
- package/package.json +6 -50
- package/server/akanApp.ts +49 -30
- package/server/akanAppHeaders.ts +30 -0
- package/server/di/predefinedAdaptor.ts +1 -1
- package/server/processMetricsCollector.ts +79 -1
- package/server/resolver/database.resolver.ts +82 -31
- package/server/resolver/signal.resolver.ts +67 -28
- package/service/ipcTypes.ts +5 -0
- package/service/predefinedAdaptor/database.adaptor.ts +95 -27
- package/service/predefinedAdaptor/solidSqlite.ts +7 -7
- package/service/predefinedAdaptor/storage.adaptor.ts +35 -9
- package/signal/index.ts +1 -0
- package/signal/middleware.ts +5 -1
- package/signal/signalContext.ts +85 -31
- package/signal/trace.ts +279 -0
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +8 -8
- package/types/document/documentSchema.d.ts +33 -0
- package/types/document/index.d.ts +1 -1
- package/types/document/schema.d.ts +1 -1
- package/types/document/types.d.ts +1 -1
- package/types/{devkit/akanConfig/types.d.ts → index.d.ts} +45 -54
- package/types/server/akanAppHeaders.d.ts +1 -0
- package/types/server/di/predefinedAdaptor.d.ts +1 -1
- package/types/server/processMetricsCollector.d.ts +2 -0
- package/types/service/ipcTypes.d.ts +5 -0
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +26 -32
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +3 -3
- package/types/service/predefinedAdaptor/storage.adaptor.d.ts +8 -2
- package/types/signal/index.d.ts +1 -0
- package/types/signal/signalContext.d.ts +4 -1
- package/types/signal/trace.d.ts +97 -0
- package/types/store/baseSt.d.ts +2 -2
- package/types/ui/Signal/style.d.ts +15 -0
- package/ui/Link/SsrLink.tsx +2 -2
- package/ui/Signal/Arg.tsx +22 -15
- package/ui/Signal/Doc.tsx +28 -21
- package/ui/Signal/Listener.tsx +15 -39
- package/ui/Signal/Message.tsx +32 -50
- package/ui/Signal/Object.tsx +16 -13
- package/ui/Signal/PubSub.tsx +29 -47
- package/ui/Signal/Response.tsx +7 -17
- package/ui/Signal/RestApi.tsx +41 -57
- package/ui/Signal/WebSocket.tsx +1 -1
- package/ui/Signal/style.ts +36 -0
- package/webkit/useCodepush.tsx +1 -1
- package/webkit/useCsrValues.ts +147 -37
- package/cli/application/application.command.ts +0 -221
- package/cli/application/application.interface.tsx +0 -225
- package/cli/application/application.runner.ts +0 -357
- package/cli/application/application.script.ts +0 -244
- package/cli/build.ts +0 -26
- package/cli/cloud/cloud.command.ts +0 -48
- package/cli/cloud/cloud.runner.ts +0 -157
- package/cli/cloud/cloud.script.ts +0 -40
- package/cli/guideline/guideline.command.ts +0 -31
- package/cli/guideline/guideline.prompt.ts +0 -212
- package/cli/guideline/guideline.runner.ts +0 -53
- package/cli/guideline/guideline.script.ts +0 -33
- package/cli/guidelines/___library/sharedUiStructureDescription.en.md +0 -767
- package/cli/guidelines/___library/utilUiStructureDescription.en.md +0 -395
- package/cli/guidelines/___lint/lintRuleDescription.en.md +0 -64
- package/cli/guidelines/___module/moduleStructureDescription.en.md +0 -80
- package/cli/guidelines/componentRule/componentRule.generate.json +0 -131
- package/cli/guidelines/componentRule/componentRule.instruction.md +0 -637
- package/cli/guidelines/cssRule/cssRule.generate.json +0 -93
- package/cli/guidelines/cssRule/cssRule.instruction.md +0 -435
- package/cli/guidelines/databaseModule/databaseModule.generate.json +0 -51
- package/cli/guidelines/databaseModule/databaseModule.instruction.md +0 -612
- package/cli/guidelines/docPageRule/docPageRule.generate.json +0 -72
- package/cli/guidelines/docPageRule/docPageRule.instruction.md +0 -389
- package/cli/guidelines/enumConstant/enumConstant.generate.json +0 -24
- package/cli/guidelines/enumConstant/enumConstant.instruction.md +0 -232
- package/cli/guidelines/framework/framework.generate.json +0 -119
- package/cli/guidelines/framework/framework.instruction.md +0 -1110
- package/cli/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/cli/guidelines/modelConstant/modelConstant.generate.json +0 -128
- package/cli/guidelines/modelConstant/modelConstant.instruction.md +0 -506
- package/cli/guidelines/modelDictionary/modelDictionary.generate.json +0 -108
- package/cli/guidelines/modelDictionary/modelDictionary.instruction.md +0 -547
- package/cli/guidelines/modelDocument/modelDocument.generate.json +0 -129
- package/cli/guidelines/modelDocument/modelDocument.instruction.md +0 -509
- package/cli/guidelines/modelService/modelService.generate.json +0 -135
- package/cli/guidelines/modelService/modelService.instruction.md +0 -708
- package/cli/guidelines/modelSignal/modelSignal.generate.json +0 -201
- package/cli/guidelines/modelSignal/modelSignal.instruction.md +0 -552
- package/cli/guidelines/modelStore/modelStore.generate.json +0 -130
- package/cli/guidelines/modelStore/modelStore.instruction.md +0 -585
- package/cli/guidelines/modelTemplate/modelTemplate.generate.json +0 -104
- package/cli/guidelines/modelTemplate/modelTemplate.instruction.md +0 -604
- package/cli/guidelines/modelUnit/modelUnit.generate.json +0 -92
- package/cli/guidelines/modelUnit/modelUnit.instruction.md +0 -541
- package/cli/guidelines/modelUtil/modelUtil.generate.json +0 -93
- package/cli/guidelines/modelUtil/modelUtil.instruction.md +0 -752
- package/cli/guidelines/modelView/modelView.generate.json +0 -80
- package/cli/guidelines/modelView/modelView.instruction.md +0 -1005
- package/cli/guidelines/modelZone/modelZone.generate.json +0 -126
- package/cli/guidelines/modelZone/modelZone.instruction.md +0 -528
- package/cli/guidelines/scalarConstant/scalarConstant.generate.json +0 -106
- package/cli/guidelines/scalarConstant/scalarConstant.instruction.md +0 -442
- package/cli/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -83
- package/cli/guidelines/scalarDictionary/scalarDictionary.instruction.md +0 -273
- package/cli/guidelines/scalarModule/scalarModule.generate.json +0 -35
- package/cli/guidelines/scalarModule/scalarModule.instruction.md +0 -81
- package/cli/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -108
- package/cli/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -310
- package/cli/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -140
- package/cli/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -339
- package/cli/index.js +0 -184404
- package/cli/index.ts +0 -24
- package/cli/library/library.command.ts +0 -28
- package/cli/library/library.runner.ts +0 -66
- package/cli/library/library.script.ts +0 -39
- package/cli/module/module.command.ts +0 -35
- package/cli/module/module.prompt.ts +0 -18
- package/cli/module/module.request.ts +0 -319
- package/cli/module/module.runner.ts +0 -76
- package/cli/module/module.script.ts +0 -161
- package/cli/npmRegistry.ts +0 -13
- package/cli/openBrowser.ts +0 -15
- package/cli/package/package.command.ts +0 -32
- package/cli/package/package.runner.ts +0 -94
- package/cli/package/package.script.ts +0 -35
- package/cli/page/page.command.ts +0 -14
- package/cli/page/page.runner.ts +0 -14
- package/cli/page/page.script.ts +0 -12
- package/cli/pluralizeName.ts +0 -5
- package/cli/scalar/scalar.command.ts +0 -21
- package/cli/scalar/scalar.prompt.ts +0 -131
- package/cli/scalar/scalar.runner.ts +0 -38
- package/cli/scalar/scalar.script.ts +0 -16
- package/cli/semver.ts +0 -18
- package/cli/templates/__scalar/__model__/__model__.constant.ts +0 -15
- package/cli/templates/__scalar/__model__/__model__.dictionary.ts +0 -19
- package/cli/templates/__scalar/__model__/__model__.document.ts +0 -15
- package/cli/templates/app/akan.config.ts +0 -14
- package/cli/templates/app/env/env.client.debug.ts.template +0 -7
- package/cli/templates/app/env/env.client.develop.ts.template +0 -7
- package/cli/templates/app/env/env.client.local.ts.template +0 -7
- package/cli/templates/app/env/env.client.main.ts.template +0 -7
- package/cli/templates/app/env/env.client.testing.ts.template +0 -7
- package/cli/templates/app/env/env.client.ts +0 -21
- package/cli/templates/app/env/env.client.type.ts +0 -16
- package/cli/templates/app/env/env.server.debug.ts.template +0 -7
- package/cli/templates/app/env/env.server.develop.ts.template +0 -7
- package/cli/templates/app/env/env.server.local.ts.template +0 -7
- package/cli/templates/app/env/env.server.main.ts.template +0 -7
- package/cli/templates/app/env/env.server.testing.ts.template +0 -6
- package/cli/templates/app/env/env.server.ts +0 -20
- package/cli/templates/app/lib/___appName__/__appName__.dictionary.ts +0 -17
- package/cli/templates/app/lib/___appName__/__appName__.service.ts +0 -13
- package/cli/templates/app/lib/___appName__/__appName__.signal.ts +0 -17
- package/cli/templates/app/lib/___appName__/__appName__.store.ts +0 -15
- package/cli/templates/app/lib/option.ts +0 -17
- package/cli/templates/app/main.ts +0 -16
- package/cli/templates/app/package.json.template +0 -5
- package/cli/templates/app/page/_index.tsx +0 -296
- package/cli/templates/app/page/_layout.tsx +0 -31
- package/cli/templates/app/page/styles.css.template +0 -53
- package/cli/templates/app/public/favicon.ico +0 -0
- package/cli/templates/app/public/logo.png +0 -0
- package/cli/templates/app/tsconfig.json.template +0 -21
- package/cli/templates/client.ts +0 -46
- package/cli/templates/crudPages/[__model__Id]/edit/page.tsx +0 -47
- package/cli/templates/crudPages/[__model__Id]/page.tsx +0 -52
- package/cli/templates/crudPages/new/page.tsx +0 -42
- package/cli/templates/crudPages/page.tsx +0 -43
- package/cli/templates/crudSinglePage/page.tsx +0 -37
- package/cli/templates/env/_env.server.type.ts +0 -16
- package/cli/templates/facetIndex/index.ts +0 -32
- package/cli/templates/index.ts +0 -10
- package/cli/templates/lib/__lib/lib.constant.ts +0 -38
- package/cli/templates/lib/__lib/lib.dictionary.ts +0 -33
- package/cli/templates/lib/__lib/lib.document.ts +0 -35
- package/cli/templates/lib/__lib/lib.service.ts +0 -33
- package/cli/templates/lib/__lib/lib.signal.ts +0 -34
- package/cli/templates/lib/__lib/lib.store.ts +0 -33
- package/cli/templates/lib/cnst.ts +0 -29
- package/cli/templates/lib/db.ts +0 -32
- package/cli/templates/lib/dict.ts +0 -49
- package/cli/templates/lib/sig.ts +0 -60
- package/cli/templates/lib/srv.ts +0 -34
- package/cli/templates/lib/st.ts +0 -31
- package/cli/templates/lib/useClient.ts +0 -19
- package/cli/templates/lib/useServer.ts +0 -7
- package/cli/templates/libRoot/.gitignore.template +0 -16
- package/cli/templates/libRoot/akan.config.ts +0 -12
- package/cli/templates/libRoot/base/baseLogic.ts +0 -10
- package/cli/templates/libRoot/base/index.ts +0 -8
- package/cli/templates/libRoot/common/commonLogic.ts +0 -10
- package/cli/templates/libRoot/common/index.ts +0 -8
- package/cli/templates/libRoot/env/env.server.example.ts.template +0 -6
- package/cli/templates/libRoot/env/env.server.testing.ts.template +0 -6
- package/cli/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +0 -15
- package/cli/templates/libRoot/lib/___libName__/__libName__.service.ts +0 -11
- package/cli/templates/libRoot/lib/___libName__/__libName__.store.ts +0 -13
- package/cli/templates/libRoot/lib/option.ts +0 -17
- package/cli/templates/libRoot/package.json.template +0 -5
- package/cli/templates/libRoot/srvkit/backendLogic.ts +0 -10
- package/cli/templates/libRoot/srvkit/index.ts +0 -8
- package/cli/templates/libRoot/tsconfig.json.template +0 -11
- package/cli/templates/libRoot/ui/index.ts +0 -7
- package/cli/templates/libRoot/webkit/frontendLogic.ts +0 -10
- package/cli/templates/libRoot/webkit/index.ts +0 -8
- package/cli/templates/localDev/docker-compose.yaml.template +0 -37
- package/cli/templates/module/__Model__.Template.tsx +0 -36
- package/cli/templates/module/__Model__.Unit.tsx +0 -26
- package/cli/templates/module/__Model__.Util.tsx +0 -30
- package/cli/templates/module/__Model__.View.tsx +0 -29
- package/cli/templates/module/__Model__.Zone.tsx +0 -43
- package/cli/templates/module/__model__.constant.ts +0 -24
- package/cli/templates/module/__model__.dictionary.ts +0 -30
- package/cli/templates/module/__model__.document.ts +0 -23
- package/cli/templates/module/__model__.service.ts +0 -16
- package/cli/templates/module/__model__.signal.ts +0 -27
- package/cli/templates/module/__model__.store.ts +0 -19
- package/cli/templates/moduleRoot/index.tsx +0 -31
- package/cli/templates/pkgRoot/tsconfig.json.template +0 -10
- package/cli/templates/server.ts +0 -45
- package/cli/templates/workspaceRoot/.env.template +0 -14
- package/cli/templates/workspaceRoot/.gitignore.template +0 -120
- package/cli/templates/workspaceRoot/.vscode/settings.json.template +0 -23
- package/cli/templates/workspaceRoot/biome.json.template +0 -191
- package/cli/templates/workspaceRoot/bunfig.toml +0 -4
- package/cli/templates/workspaceRoot/package.json.template +0 -7
- package/cli/templates/workspaceRoot/tsconfig.json.template +0 -29
- package/cli/testHelpers.ts +0 -171
- package/cli/workspace/workspace.command.ts +0 -55
- package/cli/workspace/workspace.runner.ts +0 -79
- package/cli/workspace/workspace.script.ts +0 -74
- package/devkit/aiEditor.ts +0 -299
- package/devkit/akanApp/akanApp.host.ts +0 -393
- package/devkit/akanApp/index.ts +0 -1
- package/devkit/akanConfig/akanConfig.ts +0 -360
- package/devkit/akanConfig/index.ts +0 -2
- package/devkit/akanConfig/types.ts +0 -187
- package/devkit/applicationBuildReporter.ts +0 -69
- package/devkit/applicationBuildRunner.ts +0 -302
- package/devkit/applicationReleasePackager.ts +0 -205
- package/devkit/artifact/implicitRootLayout.ts +0 -155
- package/devkit/artifact/index.ts +0 -1
- package/devkit/artifact/routeSeedIndex.ts +0 -128
- package/devkit/auth.ts +0 -41
- package/devkit/builder.ts +0 -164
- package/devkit/capacitor.base.config.ts +0 -74
- package/devkit/capacitorApp.ts +0 -389
- package/devkit/commandDecorators/argMeta.ts +0 -102
- package/devkit/commandDecorators/command.ts +0 -340
- package/devkit/commandDecorators/commandBuilder.ts +0 -224
- package/devkit/commandDecorators/commandMeta.ts +0 -6
- package/devkit/commandDecorators/dependencyBuilder.ts +0 -100
- package/devkit/commandDecorators/helpFormatter.ts +0 -220
- package/devkit/commandDecorators/index.ts +0 -8
- package/devkit/commandDecorators/targetMeta.ts +0 -31
- package/devkit/commandDecorators/types.ts +0 -10
- package/devkit/constants.ts +0 -25
- package/devkit/createTunnel.ts +0 -36
- package/devkit/dependencyScanner.ts +0 -339
- package/devkit/executors.ts +0 -1362
- package/devkit/extractDeps.ts +0 -85
- package/devkit/fileEditor.ts +0 -106
- package/devkit/fileSys.ts +0 -39
- package/devkit/frontendBuild/allRoutesBuilder.ts +0 -103
- package/devkit/frontendBuild/clientBuildTypes.ts +0 -114
- package/devkit/frontendBuild/clientEntriesBundler.ts +0 -300
- package/devkit/frontendBuild/clientEntryDiscovery.ts +0 -196
- package/devkit/frontendBuild/csrArtifactBuilder.ts +0 -237
- package/devkit/frontendBuild/cssCompiler.ts +0 -285
- package/devkit/frontendBuild/cssImportResolver.ts +0 -116
- package/devkit/frontendBuild/fontOptimizer.ts +0 -427
- package/devkit/frontendBuild/hmrChangeClassifier.ts +0 -28
- package/devkit/frontendBuild/hmrWatcher.ts +0 -101
- package/devkit/frontendBuild/index.ts +0 -18
- package/devkit/frontendBuild/pagesBundleBuilder.ts +0 -137
- package/devkit/frontendBuild/pagesEntrySourceGenerator.ts +0 -37
- package/devkit/frontendBuild/precompressArtifacts.ts +0 -59
- package/devkit/frontendBuild/routeClientBuilder.ts +0 -290
- package/devkit/frontendBuild/routesManifestArtifactSerializer.ts +0 -62
- package/devkit/frontendBuild/ssrBaseArtifactBuilder.ts +0 -139
- package/devkit/frontendBuild/vendorSpecifiers.ts +0 -16
- package/devkit/frontendBuild/watchRootResolver.ts +0 -28
- package/devkit/getCredentials.ts +0 -19
- package/devkit/getDirname.ts +0 -3
- package/devkit/getModelFileData.ts +0 -59
- package/devkit/getRelatedCnsts.ts +0 -300
- package/devkit/guideline.ts +0 -19
- package/devkit/incrementalBuilder/incrementalBuilder.host.ts +0 -152
- package/devkit/incrementalBuilder/incrementalBuilder.proc.ts +0 -331
- package/devkit/incrementalBuilder/index.ts +0 -1
- package/devkit/index.ts +0 -36
- package/devkit/lint/no-deep-internal-import.grit +0 -25
- package/devkit/lint/no-import-client-functions.grit +0 -32
- package/devkit/lint/no-import-external-library.grit +0 -21
- package/devkit/lint/no-js-private-class-method.grit +0 -42
- package/devkit/lint/no-use-client-in-server.grit +0 -7
- package/devkit/lint/non-scalar-props-restricted.grit +0 -13
- package/devkit/linter.ts +0 -248
- package/devkit/mobile/index.ts +0 -1
- package/devkit/mobile/mobileTarget.ts +0 -87
- package/devkit/prompter.ts +0 -71
- package/devkit/scanInfo.ts +0 -605
- package/devkit/selectModel.ts +0 -11
- package/devkit/spinner.ts +0 -54
- package/devkit/src/capacitorApp.ts +0 -277
- package/devkit/sshTunnel.ts +0 -151
- package/devkit/streamAi.ts +0 -45
- package/devkit/transforms/barrelAnalyzer.ts +0 -249
- package/devkit/transforms/barrelImportsPlugin.ts +0 -457
- package/devkit/transforms/externalizeFrameworkPlugin.ts +0 -159
- package/devkit/transforms/index.ts +0 -5
- package/devkit/transforms/rscUseClientTransform.ts +0 -52
- package/devkit/transforms/useClientBundlePlugin.ts +0 -47
- package/devkit/typeChecker.ts +0 -260
- package/devkit/types.ts +0 -44
- package/devkit/ui/MultiScrollList.tsx +0 -228
- package/devkit/ui/ScrollList.tsx +0 -106
- package/devkit/ui/index.ts +0 -2
- package/devkit/uploadRelease.ts +0 -95
- package/devkit/useStdoutDimensions.ts +0 -20
- package/types/cli/application/application.command.d.ts +0 -7
- package/types/cli/application/application.interface.d.ts +0 -40
- package/types/cli/application/application.runner.d.ts +0 -66
- package/types/cli/application/application.script.d.ts +0 -72
- package/types/cli/build.d.ts +0 -1
- package/types/cli/cloud/cloud.command.d.ts +0 -7
- package/types/cli/cloud/cloud.runner.d.ts +0 -13
- package/types/cli/cloud/cloud.script.d.ts +0 -23
- package/types/cli/guideline/guideline.command.d.ts +0 -7
- package/types/cli/guideline/guideline.prompt.d.ts +0 -29
- package/types/cli/guideline/guideline.runner.d.ts +0 -21
- package/types/cli/guideline/guideline.script.d.ts +0 -16
- package/types/cli/index.d.ts +0 -2
- package/types/cli/library/library.command.d.ts +0 -7
- package/types/cli/library/library.runner.d.ts +0 -11
- package/types/cli/library/library.script.d.ts +0 -13
- package/types/cli/module/module.command.d.ts +0 -7
- package/types/cli/module/module.prompt.d.ts +0 -13
- package/types/cli/module/module.request.d.ts +0 -63
- package/types/cli/module/module.runner.d.ts +0 -55
- package/types/cli/module/module.script.d.ts +0 -22
- package/types/cli/npmRegistry.d.ts +0 -1
- package/types/cli/openBrowser.d.ts +0 -1
- package/types/cli/package/package.command.d.ts +0 -7
- package/types/cli/package/package.runner.d.ts +0 -13
- package/types/cli/package/package.script.d.ts +0 -18
- package/types/cli/page/page.command.d.ts +0 -7
- package/types/cli/page/page.runner.d.ts +0 -10
- package/types/cli/page/page.script.d.ts +0 -13
- package/types/cli/pluralizeName.d.ts +0 -1
- package/types/cli/scalar/scalar.command.d.ts +0 -7
- package/types/cli/scalar/scalar.prompt.d.ts +0 -23
- package/types/cli/scalar/scalar.runner.d.ts +0 -16
- package/types/cli/scalar/scalar.script.d.ts +0 -11
- package/types/cli/semver.d.ts +0 -1
- package/types/cli/templates/__scalar/__model__/__model__.constant.d.ts +0 -7
- package/types/cli/templates/__scalar/__model__/__model__.dictionary.d.ts +0 -7
- package/types/cli/templates/__scalar/__model__/__model__.document.d.ts +0 -7
- package/types/cli/templates/app/akan.config.d.ts +0 -6
- package/types/cli/templates/app/env/env.client.d.ts +0 -6
- package/types/cli/templates/app/env/env.client.type.d.ts +0 -6
- package/types/cli/templates/app/env/env.server.d.ts +0 -6
- package/types/cli/templates/app/lib/___appName__/__appName__.dictionary.d.ts +0 -7
- package/types/cli/templates/app/lib/___appName__/__appName__.service.d.ts +0 -7
- package/types/cli/templates/app/lib/___appName__/__appName__.signal.d.ts +0 -7
- package/types/cli/templates/app/lib/___appName__/__appName__.store.d.ts +0 -7
- package/types/cli/templates/app/lib/option.d.ts +0 -6
- package/types/cli/templates/app/main.d.ts +0 -6
- package/types/cli/templates/app/page/_index.d.ts +0 -9
- package/types/cli/templates/app/page/_layout.d.ts +0 -11
- package/types/cli/templates/client.d.ts +0 -4
- package/types/cli/templates/crudPages/[__model__Id]/edit/page.d.ts +0 -11
- package/types/cli/templates/crudPages/[__model__Id]/page.d.ts +0 -11
- package/types/cli/templates/crudPages/new/page.d.ts +0 -11
- package/types/cli/templates/crudPages/page.d.ts +0 -11
- package/types/cli/templates/crudSinglePage/page.d.ts +0 -11
- package/types/cli/templates/env/_env.server.type.d.ts +0 -7
- package/types/cli/templates/facetIndex/index.d.ts +0 -13
- package/types/cli/templates/facetIndex.d.ts +0 -1
- package/types/cli/templates/index.d.ts +0 -6
- package/types/cli/templates/lib/__lib/lib.constant.d.ts +0 -4
- package/types/cli/templates/lib/__lib/lib.dictionary.d.ts +0 -4
- package/types/cli/templates/lib/__lib/lib.document.d.ts +0 -4
- package/types/cli/templates/lib/__lib/lib.service.d.ts +0 -4
- package/types/cli/templates/lib/__lib/lib.signal.d.ts +0 -4
- package/types/cli/templates/lib/__lib/lib.store.d.ts +0 -4
- package/types/cli/templates/lib/cnst.d.ts +0 -4
- package/types/cli/templates/lib/db.d.ts +0 -4
- package/types/cli/templates/lib/dict.d.ts +0 -4
- package/types/cli/templates/lib/sig.d.ts +0 -4
- package/types/cli/templates/lib/srv.d.ts +0 -4
- package/types/cli/templates/lib/st.d.ts +0 -4
- package/types/cli/templates/lib/useClient.d.ts +0 -4
- package/types/cli/templates/lib/useServer.d.ts +0 -4
- package/types/cli/templates/libRoot/akan.config.d.ts +0 -5
- package/types/cli/templates/libRoot/base/baseLogic.d.ts +0 -5
- package/types/cli/templates/libRoot/base/index.d.ts +0 -5
- package/types/cli/templates/libRoot/base.d.ts +0 -1
- package/types/cli/templates/libRoot/common/commonLogic.d.ts +0 -5
- package/types/cli/templates/libRoot/common/index.d.ts +0 -5
- package/types/cli/templates/libRoot/common.d.ts +0 -1
- package/types/cli/templates/libRoot/lib/___libName__/__libName__.dictionary.d.ts +0 -6
- package/types/cli/templates/libRoot/lib/___libName__/__libName__.service.d.ts +0 -6
- package/types/cli/templates/libRoot/lib/___libName__/__libName__.store.d.ts +0 -6
- package/types/cli/templates/libRoot/lib/option.d.ts +0 -6
- package/types/cli/templates/libRoot/srvkit/backendLogic.d.ts +0 -5
- package/types/cli/templates/libRoot/srvkit/index.d.ts +0 -5
- package/types/cli/templates/libRoot/srvkit.d.ts +0 -1
- package/types/cli/templates/libRoot/ui/index.d.ts +0 -5
- package/types/cli/templates/libRoot/ui.d.ts +0 -1
- package/types/cli/templates/libRoot/webkit/frontendLogic.d.ts +0 -5
- package/types/cli/templates/libRoot/webkit/index.d.ts +0 -5
- package/types/cli/templates/libRoot/webkit.d.ts +0 -1
- package/types/cli/templates/module/__Model__.Template.d.ts +0 -11
- package/types/cli/templates/module/__Model__.Unit.d.ts +0 -11
- package/types/cli/templates/module/__Model__.Util.d.ts +0 -11
- package/types/cli/templates/module/__Model__.View.d.ts +0 -11
- package/types/cli/templates/module/__Model__.Zone.d.ts +0 -11
- package/types/cli/templates/module/__model__.constant.d.ts +0 -8
- package/types/cli/templates/module/__model__.dictionary.d.ts +0 -8
- package/types/cli/templates/module/__model__.document.d.ts +0 -8
- package/types/cli/templates/module/__model__.service.d.ts +0 -8
- package/types/cli/templates/module/__model__.signal.d.ts +0 -9
- package/types/cli/templates/module/__model__.store.d.ts +0 -8
- package/types/cli/templates/moduleRoot/index.d.ts +0 -11
- package/types/cli/templates/moduleRoot.d.ts +0 -1
- package/types/cli/templates/server.d.ts +0 -4
- package/types/cli/templates.d.ts +0 -1
- package/types/cli/testHelpers.d.ts +0 -64
- package/types/cli/workspace/workspace.command.d.ts +0 -7
- package/types/cli/workspace/workspace.runner.d.ts +0 -14
- package/types/cli/workspace/workspace.script.d.ts +0 -29
- package/types/cli.d.ts +0 -1
- package/types/devkit/aiEditor.d.ts +0 -50
- package/types/devkit/akanApp/akanApp.host.d.ts +0 -16
- package/types/devkit/akanApp/index.d.ts +0 -1
- package/types/devkit/akanApp.d.ts +0 -1
- package/types/devkit/akanConfig/akanConfig.d.ts +0 -36
- package/types/devkit/akanConfig/index.d.ts +0 -2
- package/types/devkit/akanConfig.d.ts +0 -1
- package/types/devkit/applicationBuildReporter.d.ts +0 -25
- package/types/devkit/applicationBuildRunner.d.ts +0 -29
- package/types/devkit/applicationReleasePackager.d.ts +0 -17
- package/types/devkit/artifact/implicitRootLayout.d.ts +0 -17
- package/types/devkit/artifact/index.d.ts +0 -1
- package/types/devkit/artifact/routeSeedIndex.d.ts +0 -38
- package/types/devkit/artifact.d.ts +0 -1
- package/types/devkit/auth.d.ts +0 -9
- package/types/devkit/builder.d.ts +0 -18
- package/types/devkit/capacitor.base.config.d.ts +0 -3
- package/types/devkit/capacitorApp.d.ts +0 -49
- package/types/devkit/commandDecorators/argMeta.d.ts +0 -68
- package/types/devkit/commandDecorators/command.d.ts +0 -2
- package/types/devkit/commandDecorators/commandBuilder.d.ts +0 -60
- package/types/devkit/commandDecorators/commandMeta.d.ts +0 -2
- package/types/devkit/commandDecorators/dependencyBuilder.d.ts +0 -22
- package/types/devkit/commandDecorators/helpFormatter.d.ts +0 -3
- package/types/devkit/commandDecorators/index.d.ts +0 -8
- package/types/devkit/commandDecorators/targetMeta.d.ts +0 -21
- package/types/devkit/commandDecorators/types.d.ts +0 -8
- package/types/devkit/commandDecorators.d.ts +0 -1
- package/types/devkit/constants.d.ts +0 -25
- package/types/devkit/createTunnel.d.ts +0 -8
- package/types/devkit/dependencyScanner.d.ts +0 -33
- package/types/devkit/executors.d.ts +0 -320
- package/types/devkit/extractDeps.d.ts +0 -7
- package/types/devkit/fileEditor.d.ts +0 -16
- package/types/devkit/fileSys.d.ts +0 -12
- package/types/devkit/frontendBuild/allRoutesBuilder.d.ts +0 -18
- package/types/devkit/frontendBuild/clientBuildTypes.d.ts +0 -107
- package/types/devkit/frontendBuild/clientEntriesBundler.d.ts +0 -12
- package/types/devkit/frontendBuild/clientEntryDiscovery.d.ts +0 -19
- package/types/devkit/frontendBuild/csrArtifactBuilder.d.ts +0 -16
- package/types/devkit/frontendBuild/cssCompiler.d.ts +0 -25
- package/types/devkit/frontendBuild/cssImportResolver.d.ts +0 -9
- package/types/devkit/frontendBuild/fontOptimizer.d.ts +0 -14
- package/types/devkit/frontendBuild/hmrChangeClassifier.d.ts +0 -5
- package/types/devkit/frontendBuild/hmrWatcher.d.ts +0 -21
- package/types/devkit/frontendBuild/index.d.ts +0 -18
- package/types/devkit/frontendBuild/pagesBundleBuilder.d.ts +0 -28
- package/types/devkit/frontendBuild/pagesEntrySourceGenerator.d.ts +0 -9
- package/types/devkit/frontendBuild/precompressArtifacts.d.ts +0 -7
- package/types/devkit/frontendBuild/routeClientBuilder.d.ts +0 -50
- package/types/devkit/frontendBuild/routesManifestArtifactSerializer.d.ts +0 -12
- package/types/devkit/frontendBuild/ssrBaseArtifactBuilder.d.ts +0 -16
- package/types/devkit/frontendBuild/vendorSpecifiers.d.ts +0 -2
- package/types/devkit/frontendBuild/watchRootResolver.d.ts +0 -6
- package/types/devkit/frontendBuild.d.ts +0 -1
- package/types/devkit/getCredentials.d.ts +0 -12
- package/types/devkit/getDirname.d.ts +0 -1
- package/types/devkit/getModelFileData.d.ts +0 -16
- package/types/devkit/getRelatedCnsts.d.ts +0 -53
- package/types/devkit/guideline.d.ts +0 -19
- package/types/devkit/incrementalBuilder/incrementalBuilder.host.d.ts +0 -30
- package/types/devkit/incrementalBuilder/incrementalBuilder.proc.d.ts +0 -1
- package/types/devkit/incrementalBuilder/index.d.ts +0 -1
- package/types/devkit/incrementalBuilder.d.ts +0 -1
- package/types/devkit/index.d.ts +0 -36
- package/types/devkit/linter.d.ts +0 -108
- package/types/devkit/mobile/index.d.ts +0 -1
- package/types/devkit/mobile/mobileTarget.d.ts +0 -14
- package/types/devkit/mobile.d.ts +0 -1
- package/types/devkit/prompter.d.ts +0 -15
- package/types/devkit/scanInfo.d.ts +0 -82
- package/types/devkit/selectModel.d.ts +0 -1
- package/types/devkit/spinner.d.ts +0 -20
- package/types/devkit/src/capacitorApp.d.ts +0 -39
- package/types/devkit/sshTunnel.d.ts +0 -14
- package/types/devkit/streamAi.d.ts +0 -6
- package/types/devkit/transforms/barrelAnalyzer.d.ts +0 -27
- package/types/devkit/transforms/barrelImportsPlugin.d.ts +0 -26
- package/types/devkit/transforms/externalizeFrameworkPlugin.d.ts +0 -49
- package/types/devkit/transforms/index.d.ts +0 -5
- package/types/devkit/transforms/rscUseClientTransform.d.ts +0 -10
- package/types/devkit/transforms/useClientBundlePlugin.d.ts +0 -19
- package/types/devkit/transforms.d.ts +0 -1
- package/types/devkit/typeChecker.d.ts +0 -62
- package/types/devkit/types.d.ts +0 -43
- package/types/devkit/ui/MultiScrollList.d.ts +0 -13
- package/types/devkit/ui/ScrollList.d.ts +0 -7
- package/types/devkit/ui/index.d.ts +0 -2
- package/types/devkit/ui.d.ts +0 -1
- package/types/devkit/uploadRelease.d.ts +0 -10
- package/types/devkit/useStdoutDimensions.d.ts +0 -1
- package/types/devkit.d.ts +0 -1
package/README.ko.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Akan.js
|
|
2
2
|
|
|
3
|
-
[English](
|
|
3
|
+
[English](https://unpkg.com/akanjs@latest/README.md) | [Docs](https://akanjs.com/docs) | [npm](https://www.npmjs.com/package/akanjs)
|
|
4
4
|
|
|
5
5
|
**코드가 아니라, 비즈니스를 씁니다.**
|
|
6
6
|
**Write the business, not the plumbing.**
|
|
@@ -50,7 +50,7 @@ akan start <app-name> --open
|
|
|
50
50
|
가장 작은 앱은 설정이 거의 없어도 시작할 수 있습니다.
|
|
51
51
|
|
|
52
52
|
```ts
|
|
53
|
-
import type { AppConfig } from "akanjs
|
|
53
|
+
import type { AppConfig } from "akanjs";
|
|
54
54
|
|
|
55
55
|
const config: AppConfig = {};
|
|
56
56
|
|
|
@@ -161,9 +161,9 @@ UI barrel import를 leaf import로 다시 써서 클라이언트 번들을 작
|
|
|
161
161
|
| `akanjs/client` | client routing, cookie, storage, locale, device, CSR type, page helper. |
|
|
162
162
|
| `akanjs/client` | Akan page runtime에서 사용하는 client bootstrap과 location helper. |
|
|
163
163
|
| `akanjs/server` | server app runtime, route composition, SSR/RSC artifact, proxy, sitemap, server type. |
|
|
164
|
-
|
|
|
164
|
+
| `@akanjs/devkit` | build runner, config loader, code generation, scanner, transform, CLI helper, tooling. |
|
|
165
165
|
| `akanjs/test` | test helper와 sample generation utility. |
|
|
166
|
-
|
|
|
166
|
+
| `@akanjs/cli` | programmatic CLI entrypoint. 실행 명령은 `akan`입니다. |
|
|
167
167
|
|
|
168
168
|
특수 public surface:
|
|
169
169
|
|
|
@@ -202,7 +202,7 @@ akan update
|
|
|
202
202
|
routes, domains, base paths, mobile settings로 확장됩니다.
|
|
203
203
|
|
|
204
204
|
```ts
|
|
205
|
-
import type { AppConfig } from "akanjs
|
|
205
|
+
import type { AppConfig } from "akanjs";
|
|
206
206
|
|
|
207
207
|
const config: AppConfig = {
|
|
208
208
|
routes: [
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Akan.js
|
|
2
2
|
|
|
3
|
-
[한국어](
|
|
3
|
+
[한국어](https://unpkg.com/akanjs@latest/README.ko.md) | [Docs](https://akanjs.com/docs) | [npm](https://www.npmjs.com/package/akanjs)
|
|
4
4
|
|
|
5
5
|
**Write the business, not the plumbing.**
|
|
6
6
|
|
|
@@ -49,7 +49,7 @@ akan start <app-name> --open
|
|
|
49
49
|
A minimal app can start with almost no configuration:
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
|
-
import type { AppConfig } from "akanjs
|
|
52
|
+
import type { AppConfig } from "akanjs";
|
|
53
53
|
|
|
54
54
|
const config: AppConfig = {};
|
|
55
55
|
|
|
@@ -159,9 +159,9 @@ frontend build to rewrite UI barrel imports into leaf imports.
|
|
|
159
159
|
| `akanjs/client` | Client routing, cookies, storage, locale, device, CSR types, and page helpers. |
|
|
160
160
|
| `akanjs/client` | Client bootstrapping and location helpers used by Akan page runtimes. |
|
|
161
161
|
| `akanjs/server` | Server app runtime, route composition, SSR/RSC artifacts, proxying, sitemap, and server types. |
|
|
162
|
-
|
|
|
162
|
+
| `@akanjs/devkit` | Build runners, config loaders, code generation, scanners, transforms, CLI helpers, and tooling. |
|
|
163
163
|
| `akanjs/test` | Test helpers and sample generation utilities. |
|
|
164
|
-
|
|
|
164
|
+
| `@akanjs/cli` | Programmatic CLI entrypoint. The executable command is `akan`. |
|
|
165
165
|
|
|
166
166
|
Special public surfaces:
|
|
167
167
|
|
|
@@ -200,7 +200,7 @@ Common areas:
|
|
|
200
200
|
grow only when the app needs routes, domains, base paths, or mobile settings.
|
|
201
201
|
|
|
202
202
|
```ts
|
|
203
|
-
import type { AppConfig } from "akanjs
|
|
203
|
+
import type { AppConfig } from "akanjs";
|
|
204
204
|
|
|
205
205
|
const config: AppConfig = {
|
|
206
206
|
routes: [
|
package/client/router.ts
CHANGED
|
@@ -62,6 +62,8 @@ function getServerRequestContext() {
|
|
|
62
62
|
|
|
63
63
|
const getConfiguredBasePaths = () => new Set(parseBasePaths(process.env.AKAN_PUBLIC_BASE_PATHS));
|
|
64
64
|
|
|
65
|
+
const shouldExposeBasePath = () => getEnv().operationMode === "local";
|
|
66
|
+
|
|
65
67
|
const getServerBasePath = (reqPathname: string, lang: string, headerBasePath: string | undefined, fallback: string) => {
|
|
66
68
|
return (
|
|
67
69
|
getBasePathFromPathname(reqPathname, {
|
|
@@ -131,14 +133,16 @@ class Router {
|
|
|
131
133
|
push: (href: string, routeOptions) => {
|
|
132
134
|
const router = options.router;
|
|
133
135
|
const pathInfo = this.#getPathInfo(href);
|
|
136
|
+
const navigationPathInfo = this.#getNavigationPathInfo(href);
|
|
134
137
|
this.#postPathChange(pathInfo);
|
|
135
|
-
router.push(
|
|
138
|
+
router.push(navigationPathInfo.href, routeOptions);
|
|
136
139
|
},
|
|
137
140
|
replace: (href: string, routeOptions) => {
|
|
138
141
|
const router = options.router;
|
|
139
142
|
const pathInfo = this.#getPathInfo(href);
|
|
143
|
+
const navigationPathInfo = this.#getNavigationPathInfo(href);
|
|
140
144
|
this.#postPathChange(pathInfo);
|
|
141
|
-
router.replace(
|
|
145
|
+
router.replace(navigationPathInfo.href, routeOptions);
|
|
142
146
|
},
|
|
143
147
|
back: () => {
|
|
144
148
|
const router = options.router;
|
|
@@ -188,6 +192,9 @@ class Router {
|
|
|
188
192
|
#getPathInfo(href: string, prefix = this.#prefix) {
|
|
189
193
|
return getPathInfo(href, this.#lang, prefix);
|
|
190
194
|
}
|
|
195
|
+
#getNavigationPathInfo(href: string) {
|
|
196
|
+
return this.#getPathInfo(href, shouldExposeBasePath() ? this.#prefix : "");
|
|
197
|
+
}
|
|
191
198
|
#postPathChange({ path, pathname, hash }: { path: string; pathname: string; hash: string }) {
|
|
192
199
|
Logger.log(`pathChange-start:${path}${hash ? `#${hash}` : ""}`);
|
|
193
200
|
window.parent.postMessage({ type: "pathChange", path, pathname, hash }, "*");
|
|
@@ -224,7 +231,7 @@ class Router {
|
|
|
224
231
|
const langFromPath = reqPathname.split("/").filter(Boolean)[0];
|
|
225
232
|
const lang = (h.get("x-locale") ?? langFromPath ?? this.#lang) as string;
|
|
226
233
|
const basePath = getServerBasePath(reqPathname, lang, h.get("x-base-path") ?? undefined, this.#prefix);
|
|
227
|
-
const { pathname, href: fullHref } = getPathInfo(href, lang, basePath);
|
|
234
|
+
const { pathname, href: fullHref } = getPathInfo(href, lang, shouldExposeBasePath() ? basePath : "");
|
|
228
235
|
Logger.log(`redirect to:${pathname}`);
|
|
229
236
|
throw new AkanRedirectError(fullHref, "replace");
|
|
230
237
|
} else {
|
package/constant/serialize.ts
CHANGED
|
@@ -53,7 +53,7 @@ const serializeInput = <Input = unknown>(
|
|
|
53
53
|
return Object.fromEntries(
|
|
54
54
|
Object.entries(modelRef[FIELD_META]).map(([key, field]) => [
|
|
55
55
|
key,
|
|
56
|
-
field.isClass && !field.isScalar
|
|
56
|
+
serializeType === "input" && field.isClass && !field.isScalar
|
|
57
57
|
? serialize(ID, field.arrDepth, getRelationId((value as Record<string, unknown>)?.[key]), serializeType, {
|
|
58
58
|
nullable: field.nullable,
|
|
59
59
|
key,
|
|
@@ -13,6 +13,14 @@ export interface DocumentIndexDescriptor {
|
|
|
13
13
|
where?: DocumentQuery;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export interface DocumentIndexBuilder<Schema> {
|
|
17
|
+
path(path: string, order?: 1 | -1): DocumentIndexBuilder<Schema>;
|
|
18
|
+
text(path: string): DocumentIndexBuilder<Schema>;
|
|
19
|
+
unique(): DocumentIndexBuilder<Schema>;
|
|
20
|
+
where(where: DocumentQuery | ((q: DocumentQueryHelper) => DocumentQuery)): DocumentIndexBuilder<Schema>;
|
|
21
|
+
done(): Schema;
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
export type DocumentSaveHook<Doc = unknown> = (
|
|
17
25
|
this: Doc,
|
|
18
26
|
next?: () => void,
|
|
@@ -58,7 +66,7 @@ export class DocumentSchema<Doc = unknown> {
|
|
|
58
66
|
return this;
|
|
59
67
|
}
|
|
60
68
|
|
|
61
|
-
createIndex(name: string) {
|
|
69
|
+
createIndex(name: string): DocumentIndexBuilder<this> {
|
|
62
70
|
const schema = this;
|
|
63
71
|
const descriptor: DocumentIndexDescriptor = { name, fields: {} };
|
|
64
72
|
const api = {
|
package/index.ts
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import type { AkanImageConfig } from "akanjs/server";
|
|
3
|
+
|
|
4
|
+
export const archs = ["amd64", "arm64"] as const;
|
|
5
|
+
export type Arch = (typeof archs)[number];
|
|
6
|
+
|
|
7
|
+
export interface DockerConfig {
|
|
8
|
+
content: string;
|
|
9
|
+
image: string | { [key in Arch]?: string };
|
|
10
|
+
preRuns: (string | { [key in Arch]?: string })[];
|
|
11
|
+
postRuns: (string | { [key in Arch]?: string })[];
|
|
12
|
+
command: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AkanRouteDomains {
|
|
16
|
+
main?: string[];
|
|
17
|
+
develop?: string[];
|
|
18
|
+
debug?: string[];
|
|
19
|
+
[branch: string]: string[] | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AkanRouteConfig {
|
|
23
|
+
basePath?: string;
|
|
24
|
+
domains: AkanRouteDomains;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type DatabaseMode = "single" | "multiple" | "cluster";
|
|
28
|
+
export type MobileEnv = "local" | "debug" | "develop" | "main";
|
|
29
|
+
export type MobilePermission = "camera" | "contacts" | "location" | "push";
|
|
30
|
+
|
|
31
|
+
export interface AkanMobileTargetAssets {
|
|
32
|
+
icon?: string;
|
|
33
|
+
splash?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface AkanMobileTargetLinks {
|
|
37
|
+
schemes?: string[];
|
|
38
|
+
associatedDomains?: string[];
|
|
39
|
+
androidHosts?: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface AkanMobileTargetFiles {
|
|
43
|
+
ios?: Record<string, string>;
|
|
44
|
+
android?: Record<string, string>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface AkanCapacitorLikeConfig {
|
|
48
|
+
plugins?: Record<string, unknown>;
|
|
49
|
+
android?: Record<string, unknown>;
|
|
50
|
+
ios?: Record<string, unknown>;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface AkanMobileTargetConfig extends AkanCapacitorLikeConfig {
|
|
55
|
+
name: string;
|
|
56
|
+
basePath?: string;
|
|
57
|
+
appName: string;
|
|
58
|
+
appId: string;
|
|
59
|
+
version: string;
|
|
60
|
+
buildNum: number;
|
|
61
|
+
assets?: AkanMobileTargetAssets;
|
|
62
|
+
permissions?: MobilePermission[];
|
|
63
|
+
links?: AkanMobileTargetLinks;
|
|
64
|
+
files?: AkanMobileTargetFiles;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface AkanMobileConfig extends AkanCapacitorLikeConfig {
|
|
68
|
+
appName: string;
|
|
69
|
+
appId: string;
|
|
70
|
+
version: string;
|
|
71
|
+
buildNum: number;
|
|
72
|
+
targets: Record<string, AkanMobileTargetConfig>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface AppConfigResult {
|
|
76
|
+
docker: DockerConfig;
|
|
77
|
+
defaultDatabaseMode: DatabaseMode;
|
|
78
|
+
routes?: AkanRouteConfig[];
|
|
79
|
+
externalLibs: string[];
|
|
80
|
+
barrelImports: string[];
|
|
81
|
+
optimizeImports: string[];
|
|
82
|
+
images: AkanImageConfig;
|
|
83
|
+
i18n: AkanI18nConfig;
|
|
84
|
+
publicEnv: string[];
|
|
85
|
+
mobile: AkanMobileConfig;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface LibConfigResult {
|
|
89
|
+
externalLibs: string[];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type DeepPartial<T> = {
|
|
93
|
+
[P in keyof T]?: T[P] extends unknown[] ? T[P] : T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export interface AppConfigContext {
|
|
97
|
+
readonly name: string;
|
|
98
|
+
readonly type: "app";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface LibConfigContext {
|
|
102
|
+
readonly name: string;
|
|
103
|
+
readonly type: "lib";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type AppConfig = DeepPartial<AppConfigResult> | ((app: AppConfigContext) => DeepPartial<AppConfigResult>);
|
|
107
|
+
export type LibConfig = DeepPartial<LibConfigResult> | ((lib: LibConfigContext) => DeepPartial<LibConfigResult>);
|
|
108
|
+
export type AkanConfigFile = object;
|
|
109
|
+
|
|
110
|
+
export interface FileConventionScanResult {
|
|
111
|
+
constant: { databases: string[]; scalars: string[] };
|
|
112
|
+
dictionary: { databases: string[]; services: string[]; scalars: string[] };
|
|
113
|
+
document: { databases: string[]; scalars: string[] };
|
|
114
|
+
service: { databases: string[]; services: string[] };
|
|
115
|
+
signal: { databases: string[]; services: string[] };
|
|
116
|
+
store: { databases: string[]; services: string[] };
|
|
117
|
+
template: { databases: string[]; services: string[]; scalars: string[] };
|
|
118
|
+
unit: { databases: string[]; services: string[]; scalars: string[] };
|
|
119
|
+
util: { databases: string[]; services: string[]; scalars: string[] };
|
|
120
|
+
view: { databases: string[]; services: string[]; scalars: string[] };
|
|
121
|
+
zone: { databases: string[]; services: string[]; scalars: string[] };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface ScanResult {
|
|
125
|
+
name: string;
|
|
126
|
+
type: "app" | "lib";
|
|
127
|
+
repoName: string;
|
|
128
|
+
serveDomain: string;
|
|
129
|
+
files: FileConventionScanResult;
|
|
130
|
+
libDeps: string[];
|
|
131
|
+
pkgDeps: string[];
|
|
132
|
+
dependencies: string[];
|
|
133
|
+
devDependencies: string[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface AppScanResult extends ScanResult {
|
|
137
|
+
akanConfig: AppConfigResult;
|
|
138
|
+
routes: string[];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface LibScanResult extends ScanResult {
|
|
142
|
+
akanConfig: LibConfigResult;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface PkgScanResult {
|
|
146
|
+
name: string;
|
|
147
|
+
pkgDeps: string[];
|
|
148
|
+
dependencies: string[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface WorkspaceScanResult {
|
|
152
|
+
appNames: string[];
|
|
153
|
+
libNames: string[];
|
|
154
|
+
pkgNames: string[];
|
|
155
|
+
apps: { [key: string]: AppScanResult };
|
|
156
|
+
libs: { [key: string]: LibScanResult };
|
|
157
|
+
pkgs: { [key: string]: PkgScanResult };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface AppInfo {
|
|
161
|
+
readonly name: string;
|
|
162
|
+
readonly type: "app";
|
|
163
|
+
readonly database: Map<string, Set<string>>;
|
|
164
|
+
readonly service: Map<string, Set<string>>;
|
|
165
|
+
readonly scalar: Map<string, Set<string>>;
|
|
166
|
+
readonly file: FileConventionScanResult;
|
|
167
|
+
getLibs(): string[];
|
|
168
|
+
getLibInfos(): Map<string, LibInfo>;
|
|
169
|
+
getDatabaseModules(): string[];
|
|
170
|
+
getScalarModules(): string[];
|
|
171
|
+
getServiceModules(): string[];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface LibInfo {
|
|
175
|
+
readonly name: string;
|
|
176
|
+
readonly type: "lib";
|
|
177
|
+
readonly database: Map<string, Set<string>>;
|
|
178
|
+
readonly service: Map<string, Set<string>>;
|
|
179
|
+
readonly scalar: Map<string, Set<string>>;
|
|
180
|
+
readonly file: FileConventionScanResult;
|
|
181
|
+
getLibs(): string[];
|
|
182
|
+
getLibInfos(): Map<string, LibInfo>;
|
|
183
|
+
getLibInfo(libName: string): LibInfo | undefined;
|
|
184
|
+
getDatabaseModules(): string[];
|
|
185
|
+
getScalarModules(): string[];
|
|
186
|
+
getServiceModules(): string[];
|
|
187
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akanjs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-rc.0",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"akan": "./cli/index.js",
|
|
8
|
-
"akan2": "./cli/index.js"
|
|
9
|
-
},
|
|
10
6
|
"publishConfig": {
|
|
11
7
|
"access": "public"
|
|
12
8
|
},
|
|
@@ -24,11 +20,6 @@
|
|
|
24
20
|
"default": "./index.ts"
|
|
25
21
|
},
|
|
26
22
|
"./package.json": "./package.json",
|
|
27
|
-
"./capacitor.base.config": {
|
|
28
|
-
"types": "./types/devkit/capacitor.base.config.d.ts",
|
|
29
|
-
"import": "./devkit/capacitor.base.config.ts",
|
|
30
|
-
"default": "./devkit/capacitor.base.config.ts"
|
|
31
|
-
},
|
|
32
23
|
"./base": {
|
|
33
24
|
"types": "./types/base/index.d.ts",
|
|
34
25
|
"import": "./base/index.ts",
|
|
@@ -139,21 +130,11 @@
|
|
|
139
130
|
"import": "./dictionary/index.ts",
|
|
140
131
|
"default": "./dictionary/index.ts"
|
|
141
132
|
},
|
|
142
|
-
"./devkit": {
|
|
143
|
-
"types": "./types/devkit/index.d.ts",
|
|
144
|
-
"import": "./devkit/index.ts",
|
|
145
|
-
"default": "./devkit/index.ts"
|
|
146
|
-
},
|
|
147
133
|
"./test": {
|
|
148
134
|
"types": "./types/test/index.d.ts",
|
|
149
135
|
"import": "./test/index.ts",
|
|
150
136
|
"default": "./test/index.ts"
|
|
151
137
|
},
|
|
152
|
-
"./cli": {
|
|
153
|
-
"types": "./types/cli/index.d.ts",
|
|
154
|
-
"import": "./cli/index.ts",
|
|
155
|
-
"default": "./cli/index.ts"
|
|
156
|
-
},
|
|
157
138
|
"./ui/styles.css": "./ui/styles.css",
|
|
158
139
|
"./server/rsc-worker": {
|
|
159
140
|
"types": "./types/server/rscWorker.d.ts",
|
|
@@ -162,27 +143,10 @@
|
|
|
162
143
|
}
|
|
163
144
|
},
|
|
164
145
|
"dependencies": {
|
|
165
|
-
"@inquirer/prompts": "^8.4.3",
|
|
166
|
-
"@langchain/core": "^1.1.47",
|
|
167
|
-
"@langchain/deepseek": "^1.0.26",
|
|
168
|
-
"@langchain/openai": "^1.4.6",
|
|
169
|
-
"@trapezedev/project": "^7.1.4",
|
|
170
|
-
"chalk": "^5.6.2",
|
|
171
146
|
"clsx": "^2.1.1",
|
|
172
|
-
"commander": "^14.0.3",
|
|
173
147
|
"dayjs": "^1.11.20",
|
|
174
|
-
"fontaine": "^0.8.0",
|
|
175
|
-
"fonteditor-core": "^2.6.3",
|
|
176
|
-
"ignore": "^7.0.5",
|
|
177
148
|
"immer": "^11.1.8",
|
|
178
|
-
"
|
|
179
|
-
"js-yaml": "^4.1.1",
|
|
180
|
-
"ora": "^9.4.0",
|
|
181
|
-
"qrcode": "^1.5.4",
|
|
182
|
-
"sharp": "^0.34.5",
|
|
183
|
-
"ssh2": "^1.17.0",
|
|
184
|
-
"subset-font": "^2.5.0",
|
|
185
|
-
"tailwindcss": "^4.3.0"
|
|
149
|
+
"sharp": "^0.34.5"
|
|
186
150
|
},
|
|
187
151
|
"peerDependencies": {
|
|
188
152
|
"@capacitor-community/contacts": "^7.2.0",
|
|
@@ -190,7 +154,6 @@
|
|
|
190
154
|
"@capacitor/app": "^8.1.0",
|
|
191
155
|
"@capacitor/browser": "^8.0.3",
|
|
192
156
|
"@capacitor/camera": "^8.2.0",
|
|
193
|
-
"@capacitor/cli": "^8.3.4",
|
|
194
157
|
"@capacitor/core": "^8.3.4",
|
|
195
158
|
"@capacitor/device": "^8.0.2",
|
|
196
159
|
"@capacitor/geolocation": "^8.2.0",
|
|
@@ -202,7 +165,7 @@
|
|
|
202
165
|
"@libsql/client": "^0.17.3",
|
|
203
166
|
"@playwright/test": "^1.60.0",
|
|
204
167
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
205
|
-
"@react-spring/web": "^
|
|
168
|
+
"@react-spring/web": "^10.1.0",
|
|
206
169
|
"@use-gesture/react": "^10.3.1",
|
|
207
170
|
"bullmq": "^5.76.10",
|
|
208
171
|
"capacitor-plugin-safe-area": "^5.0.0",
|
|
@@ -211,27 +174,23 @@
|
|
|
211
174
|
"croner": "^10.0.1",
|
|
212
175
|
"daisyui": "^5.5.20",
|
|
213
176
|
"file-saver": "^2.0.5",
|
|
214
|
-
"fontaine": "^0.8.0",
|
|
215
|
-
"fonteditor-core": "^2.6.3",
|
|
216
177
|
"ioredis": "^5.10.1",
|
|
217
178
|
"mermaid": "^11.15.0",
|
|
218
179
|
"postgres": "^3.4.9",
|
|
219
180
|
"protobufjs": "^8.4.0",
|
|
220
|
-
"react": "19.2.
|
|
181
|
+
"react": "19.2.6",
|
|
221
182
|
"react-copy-to-clipboard": "^5.1.1",
|
|
222
183
|
"react-datepicker": "^9.1.0",
|
|
223
184
|
"react-device-detect": "^2.2.3",
|
|
224
|
-
"react-dom": "19.2.
|
|
185
|
+
"react-dom": "19.2.6",
|
|
225
186
|
"react-icons": "^5.6.0",
|
|
226
187
|
"react-refresh": "^0.18.0",
|
|
227
188
|
"react-server-dom-webpack": "^19.2.6",
|
|
228
189
|
"react-simple-pull-to-refresh": "^1.3.4",
|
|
229
|
-
"react-spring": "^
|
|
190
|
+
"react-spring": "^10.0.4",
|
|
230
191
|
"scheduler": "^0.27.0",
|
|
231
192
|
"sharp": "^0.34.5",
|
|
232
|
-
"subset-font": "^2.5.0",
|
|
233
193
|
"tailwind-scrollbar": "^4.0.2",
|
|
234
|
-
"tailwindcss": "^4.3.0",
|
|
235
194
|
"typescript": "^6.0.3"
|
|
236
195
|
},
|
|
237
196
|
"peerDependenciesMeta": {
|
|
@@ -250,9 +209,6 @@
|
|
|
250
209
|
"@capacitor/camera": {
|
|
251
210
|
"optional": true
|
|
252
211
|
},
|
|
253
|
-
"@capacitor/cli": {
|
|
254
|
-
"optional": true
|
|
255
|
-
},
|
|
256
212
|
"@capacitor/core": {
|
|
257
213
|
"optional": true
|
|
258
214
|
},
|
package/server/akanApp.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { mkdir, rm } from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { Logger } from "akanjs/common";
|
|
4
4
|
import type { AkanChildRole, AkanChildStatus, AkanIpcMessage, AkanMetricsReport, AkanUpstream } from "akanjs/service";
|
|
5
|
+
import { isTraceEnabled } from "akanjs/signal";
|
|
6
|
+
import { makeAkanChildProxyHeaders } from "./akanAppHeaders";
|
|
5
7
|
import type { BuilderMessage, BuilderReq, BuilderRes } from "./artifact";
|
|
6
8
|
import { RotatingLogWriter } from "./logging/rotatingLogWriter";
|
|
7
9
|
import { ProcessMetricsCollector } from "./processMetricsCollector";
|
|
@@ -59,16 +61,6 @@ export class AkanApp {
|
|
|
59
61
|
static readonly #childRestartBaseDelayMs = 1_000;
|
|
60
62
|
static readonly #childRestartMaxDelayMs = 30_000;
|
|
61
63
|
static readonly #childRestartGraceMs = 5_000;
|
|
62
|
-
static readonly #hopByHopHeaders = new Set([
|
|
63
|
-
"connection",
|
|
64
|
-
"keep-alive",
|
|
65
|
-
"proxy-authenticate",
|
|
66
|
-
"proxy-authorization",
|
|
67
|
-
"te",
|
|
68
|
-
"trailer",
|
|
69
|
-
"transfer-encoding",
|
|
70
|
-
"upgrade",
|
|
71
|
-
]);
|
|
72
64
|
|
|
73
65
|
readonly logger = new Logger("AkanApp");
|
|
74
66
|
readonly #serverPath: string;
|
|
@@ -85,6 +77,7 @@ export class AkanApp {
|
|
|
85
77
|
readonly #builderReqMap = new Map<number, { childIdx: number; childLocalId: number }>();
|
|
86
78
|
#server: Bun.Server<GatewayWsData> | null = null;
|
|
87
79
|
#rrIdx = 0;
|
|
80
|
+
#federationChildCache: ChildState[] | null = null;
|
|
88
81
|
#snapshotTimer: Timer | null = null;
|
|
89
82
|
#healthTimer: Timer | null = null;
|
|
90
83
|
#metricsTimer: Timer | null = null;
|
|
@@ -93,6 +86,9 @@ export class AkanApp {
|
|
|
93
86
|
readonly #childOutputBuffers = new Map<string, string>();
|
|
94
87
|
static readonly #ansiPattern = new RegExp(`${String.fromCharCode(27)}\\[[0-?]*[ -/]*[@-~]`, "g");
|
|
95
88
|
#gatewayMetrics: AkanMetricsReport = {};
|
|
89
|
+
#proxyHopCount = 0;
|
|
90
|
+
#proxyHopSumMs = 0;
|
|
91
|
+
#proxyHopMaxMs = 0;
|
|
96
92
|
#resolveStopped: (() => void) | null = null;
|
|
97
93
|
#exitAfterStop = false;
|
|
98
94
|
#stopping = false;
|
|
@@ -248,6 +244,7 @@ export class AkanApp {
|
|
|
248
244
|
lastRestartAt: previous?.lastRestartAt,
|
|
249
245
|
lastRestartReason: previous?.lastRestartReason,
|
|
250
246
|
});
|
|
247
|
+
this.#invalidateFederationChildCache();
|
|
251
248
|
this.#pipeOutput(idx, role, proc.stdout, "stdout");
|
|
252
249
|
this.#pipeOutput(idx, role, proc.stderr, "stderr");
|
|
253
250
|
proc.exited.then((code) => this.#handleChildExit(idx, proc, code));
|
|
@@ -258,6 +255,7 @@ export class AkanApp {
|
|
|
258
255
|
if (!child || child.proc !== proc) return;
|
|
259
256
|
child.status = "exited";
|
|
260
257
|
child.lastExitCode = code;
|
|
258
|
+
this.#invalidateFederationChildCache();
|
|
261
259
|
this.#removeChildRooms(idx);
|
|
262
260
|
if (this.#stopping) return;
|
|
263
261
|
void this.#scheduleChildRestart(child, proc, `exit:${code ?? "unknown"}`);
|
|
@@ -276,6 +274,7 @@ export class AkanApp {
|
|
|
276
274
|
child.status = reason === "health-timeout" ? "unhealthy" : "exited";
|
|
277
275
|
child.upstream = undefined;
|
|
278
276
|
child.healthPath = undefined;
|
|
277
|
+
this.#invalidateFederationChildCache();
|
|
279
278
|
child.lastRestartReason = reason;
|
|
280
279
|
child.lastRestartAt = Date.now();
|
|
281
280
|
this.#removeChildRooms(child.idx);
|
|
@@ -403,6 +402,7 @@ export class AkanApp {
|
|
|
403
402
|
const url = new URL(req.url);
|
|
404
403
|
if (url.pathname === "/_akan/app/health") return Response.json(this.#getHealthStatus());
|
|
405
404
|
if (url.pathname === "/_akan/app/metrics") return Response.json(this.#getMetricsStatus());
|
|
405
|
+
if (url.pathname === "/_akan/bench/ping") return new Response("ok");
|
|
406
406
|
if (this.#isWebSocketPath(url.pathname)) return this.#upgradeWebSocket(req, server);
|
|
407
407
|
const assetResponse = await this.#serveImmutableArtifact(req, url);
|
|
408
408
|
if (assetResponse) return assetResponse;
|
|
@@ -526,6 +526,13 @@ export class AkanApp {
|
|
|
526
526
|
rooms: this.#roomChildren.size,
|
|
527
527
|
sockets: this.#socketRooms.size,
|
|
528
528
|
gateway: this.#gatewayMetrics,
|
|
529
|
+
proxyHop: this.#proxyHopCount
|
|
530
|
+
? {
|
|
531
|
+
count: this.#proxyHopCount,
|
|
532
|
+
meanMs: Math.round((this.#proxyHopSumMs / this.#proxyHopCount) * 1000) / 1000,
|
|
533
|
+
maxMs: Math.round(this.#proxyHopMaxMs * 1000) / 1000,
|
|
534
|
+
}
|
|
535
|
+
: null,
|
|
529
536
|
children: [...this.#children.values()].map((child) => ({
|
|
530
537
|
idx: child.idx,
|
|
531
538
|
role: child.role,
|
|
@@ -551,6 +558,8 @@ export class AkanApp {
|
|
|
551
558
|
const headers = this.#makeProxyHeaders(req, child.idx);
|
|
552
559
|
child.metrics.activeRequests = (child.metrics.activeRequests ?? 0) + 1;
|
|
553
560
|
child.metrics.totalRequests = (child.metrics.totalRequests ?? 0) + 1;
|
|
561
|
+
const traced = isTraceEnabled();
|
|
562
|
+
const hopStart = traced ? performance.now() : 0;
|
|
554
563
|
try {
|
|
555
564
|
const upstreamRes = await fetch(upstreamUrl, {
|
|
556
565
|
unix: child.upstream.socketPath,
|
|
@@ -563,9 +572,20 @@ export class AkanApp {
|
|
|
563
572
|
return this.#proxyResponse(upstreamRes);
|
|
564
573
|
} finally {
|
|
565
574
|
child.metrics.activeRequests = Math.max(0, (child.metrics.activeRequests ?? 1) - 1);
|
|
575
|
+
if (traced) this.#recordProxyHop(performance.now() - hopStart);
|
|
566
576
|
}
|
|
567
577
|
}
|
|
568
578
|
|
|
579
|
+
/**
|
|
580
|
+
* Gateway-observed upstream round-trip time. The pure proxy overhead is this value
|
|
581
|
+
* minus the child handler time captured in the per-request trace.
|
|
582
|
+
*/
|
|
583
|
+
#recordProxyHop(durationMs: number) {
|
|
584
|
+
this.#proxyHopCount += 1;
|
|
585
|
+
this.#proxyHopSumMs += durationMs;
|
|
586
|
+
this.#proxyHopMaxMs = Math.max(this.#proxyHopMaxMs, durationMs);
|
|
587
|
+
}
|
|
588
|
+
|
|
569
589
|
#proxyResponse(upstreamRes: Response): Response {
|
|
570
590
|
const headers = new Headers(upstreamRes.headers);
|
|
571
591
|
|
|
@@ -650,29 +670,25 @@ export class AkanApp {
|
|
|
650
670
|
}
|
|
651
671
|
|
|
652
672
|
#makeProxyHeaders(req: Request, childIdx: number) {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
headers.set("x-forwarded-for", forwardedFor ? `${forwardedFor}, ${clientAddress}` : clientAddress);
|
|
659
|
-
headers.set("x-forwarded-host", headers.get("host") ?? url.host);
|
|
660
|
-
headers.set("x-forwarded-proto", url.protocol.replace(":", ""));
|
|
661
|
-
headers.set("x-akan-child-idx", String(childIdx));
|
|
662
|
-
headers.set("x-request-id", headers.get("x-request-id") ?? crypto.randomUUID());
|
|
663
|
-
headers.set("host", "akan-child");
|
|
664
|
-
return headers;
|
|
673
|
+
return makeAkanChildProxyHeaders(req, childIdx);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
#invalidateFederationChildCache() {
|
|
677
|
+
this.#federationChildCache = null;
|
|
665
678
|
}
|
|
666
679
|
|
|
667
680
|
#pickFederationChild() {
|
|
668
|
-
const candidates =
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
child
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
681
|
+
const candidates =
|
|
682
|
+
this.#federationChildCache ??
|
|
683
|
+
[...this.#children.values()].filter(
|
|
684
|
+
(child) =>
|
|
685
|
+
(child.role === "federation" || child.role === "all") &&
|
|
686
|
+
child.ready &&
|
|
687
|
+
child.status !== "unhealthy" &&
|
|
688
|
+
child.status !== "exited" &&
|
|
689
|
+
!child.proc.killed,
|
|
690
|
+
);
|
|
691
|
+
this.#federationChildCache = candidates;
|
|
676
692
|
if (candidates.length === 0) return null;
|
|
677
693
|
const child = candidates[this.#rrIdx % candidates.length];
|
|
678
694
|
this.#rrIdx++;
|
|
@@ -761,6 +777,7 @@ export class AkanApp {
|
|
|
761
777
|
child.lastPongAt = Date.now();
|
|
762
778
|
child.restartAttempts = 0;
|
|
763
779
|
child.restartPending = false;
|
|
780
|
+
this.#invalidateFederationChildCache();
|
|
764
781
|
if ([...this.#children.values()].every((item) => item.ready)) {
|
|
765
782
|
process.send?.({ type: "backend-ready", pid: process.pid } satisfies AkanIpcMessage);
|
|
766
783
|
this.logger.verbose(`All ${this.#children.size} child process(es) are ready`);
|
|
@@ -772,6 +789,7 @@ export class AkanApp {
|
|
|
772
789
|
if (!child) return;
|
|
773
790
|
child.status = "healthy";
|
|
774
791
|
child.lastPongAt = Date.now();
|
|
792
|
+
this.#invalidateFederationChildCache();
|
|
775
793
|
}
|
|
776
794
|
|
|
777
795
|
#deliverPubsub(originIdx: number, message: Extract<AkanIpcMessage, { type: "pubsub.publish" }>) {
|
|
@@ -903,6 +921,7 @@ export class AkanApp {
|
|
|
903
921
|
if (child.proc.killed || child.status === "exited") continue;
|
|
904
922
|
if (child.lastPongAt && now - child.lastPongAt > 5_000) {
|
|
905
923
|
child.status = "unhealthy";
|
|
924
|
+
this.#invalidateFederationChildCache();
|
|
906
925
|
void this.#scheduleChildRestart(child, child.proc, "health-timeout");
|
|
907
926
|
return;
|
|
908
927
|
}
|