akanjs 2.2.4 → 2.2.6
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 +9 -0
- package/base/base.ts +1 -1
- package/base/primitiveRegistry.ts +6 -10
- package/base/types.ts +1 -4
- package/capacitor.base.config.ts +1 -1
- package/client/capacitor.ts +1 -1
- package/client/cookie.ts +2 -4
- package/client/createFont.ts +2 -2
- package/client/csrTypes.ts +2 -8
- package/client/makePageProto.tsx +4 -10
- package/client/router.ts +3 -8
- package/client/translator.ts +4 -12
- package/common/Logger.ts +1 -4
- package/common/formatNumber.ts +2 -5
- package/common/hmrPhase.ts +1 -1
- package/common/isValidDate.ts +0 -3
- package/constant/fieldInfo.ts +3 -3
- package/constant/purify.ts +1 -2
- package/constant/types.ts +0 -4
- package/constant/via.ts +6 -12
- package/document/databaseRegistry.ts +0 -8
- package/document/into.ts +0 -1
- package/fetch/client/fetchClient.ts +1 -6
- package/fetch/client/httpClient.ts +1 -2
- package/fetch/fetchType/appliedReturn.type.ts +0 -1
- package/fetch/fetchType/endpointFetch.type.ts +0 -3
- package/fetch/fetchType/sliceFetch.type.ts +0 -8
- package/fetch/requestStorage.ts +2 -10
- package/package.json +67 -24
- package/server/akanApp.ts +2 -5
- package/server/akanLib.ts +0 -1
- package/server/akanServer.ts +3 -4
- package/server/artifact/builderRpc.ts +2 -2
- package/server/artifact/ipcTypes.ts +0 -4
- package/server/decorators.ts +1 -1
- package/server/di/diLifecycle.ts +3 -6
- package/server/hmr/clientScript.ts +2 -20
- package/server/hmr/devHmrController.ts +0 -4
- package/server/processMetricsCollector.ts +1 -1
- package/server/resolver/database.resolver.ts +2 -2
- package/server/resolver/resolver.contract.fixture.ts +0 -1
- package/server/resolver/signal.resolver.ts +2 -10
- package/server/routing/apiRouter.ts +2 -4
- package/server/rscClient.tsx +1 -7
- package/server/rscWorkerHost.ts +11 -33
- package/server/ssrFromRscRenderer.tsx +3 -35
- package/server/types/react-server-dom-webpack.d.ts +1 -7
- package/server/vendor/react-dom-client.ts +1 -1
- package/server/vendor/react-dom.ts +2 -3
- package/server/vendor/react-jsx-dev-runtime.ts +1 -1
- package/server/vendor/react-jsx-runtime.ts +1 -1
- package/server/vendor/react-refresh-runtime.ts +2 -2
- package/server/vendor/react-server-dom-webpack-client-browser.ts +1 -1
- package/server/vendor/react.ts +2 -9
- package/server/vendor/scheduler.ts +2 -3
- package/server/webRouter.ts +2 -3
- package/service/adapt.ts +1 -5
- package/service/predefinedAdaptor/cache.adaptor.ts +1 -2
- package/service/predefinedAdaptor/database.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +1 -2
- package/service/predefinedAdaptor/websocket.adaptor.ts +3 -15
- package/service/serve.ts +3 -7
- package/signal/base.signal.ts +0 -1
- package/signal/endpointInfo.ts +0 -7
- package/signal/intercept.ts +0 -2
- package/signal/middleware.ts +1 -2
- package/signal/serverSignal.ts +1 -15
- package/signal/signalContext.ts +1 -1
- package/signal/signalRegistry.ts +0 -5
- package/signal/sliceInfo.ts +0 -3
- package/signal/trace.ts +0 -11
- package/signal/types.ts +2 -11
- package/store/action.ts +3 -5
- package/store/stateBuilder.ts +0 -2
- package/store/stateInfo.ts +1 -2
- package/store/types.ts +1 -1
- package/test/playwright.config.base.ts +5 -28
- package/test/playwright.pageAgent.ts +1 -1
- package/test/sampleOf.ts +1 -1
- package/test/testServer.ts +1 -1
- package/types/base/base.d.ts +53 -0
- package/types/base/baseEnv.d.ts +68 -0
- package/types/base/index.d.ts +6 -0
- package/types/base/primitiveRegistry.d.ts +134 -0
- package/types/base/symbols.d.ts +11 -0
- package/types/base/types.d.ts +68 -0
- package/types/base/utils.d.ts +4 -0
- package/types/base.d.ts +1 -0
- package/types/capacitor.base.config.d.ts +3 -0
- package/types/client/capacitor.d.ts +233 -0
- package/types/client/clientRuntime.d.ts +63 -0
- package/types/client/cookie.d.ts +33 -0
- package/types/client/createFont.d.ts +6 -0
- package/types/client/csrTypes.d.ts +262 -0
- package/types/client/decorators.d.ts +7 -0
- package/types/client/device.d.ts +41 -0
- package/types/client/fetch.d.ts +1 -0
- package/types/client/index.d.ts +14 -0
- package/types/client/locale.d.ts +5 -0
- package/types/client/makePageProto.d.ts +17002 -0
- package/types/client/router.d.ts +66 -0
- package/types/client/rscNavigation.d.ts +19 -0
- package/types/client/storage.d.ts +5 -0
- package/types/client/translator.d.ts +18 -0
- package/types/client/types.d.ts +145 -0
- package/types/client/useClient.d.ts +1 -0
- package/types/client.d.ts +1 -0
- package/types/common/Logger.d.ts +41 -0
- package/types/common/applyMixins.d.ts +3 -0
- package/types/common/capitalize.d.ts +2 -0
- package/types/common/deepObjectify.d.ts +4 -0
- package/types/common/fileUpload.d.ts +28 -0
- package/types/common/formatNumber.d.ts +1 -0
- package/types/common/formatPhone.d.ts +2 -0
- package/types/common/getAllPropertyDescriptors.d.ts +5 -0
- package/types/common/hmrPhase.d.ts +6 -0
- package/types/common/httpClient.d.ts +20 -0
- package/types/common/index.d.ts +29 -0
- package/types/common/isDayjs.d.ts +2 -0
- package/types/common/isEmail.d.ts +2 -0
- package/types/common/isPhoneNumber.d.ts +2 -0
- package/types/common/isQueryEqual.d.ts +1 -0
- package/types/common/isValidDate.d.ts +2 -0
- package/types/common/jwtDecode.d.ts +2 -0
- package/types/common/localeConfig.d.ts +11 -0
- package/types/common/lowerlize.d.ts +2 -0
- package/types/common/mergeVersion.d.ts +10 -0
- package/types/common/objectify.d.ts +1 -0
- package/types/common/pathGet.d.ts +1 -0
- package/types/common/pathSet.d.ts +3 -0
- package/types/common/randomPick.d.ts +1 -0
- package/types/common/randomPicks.d.ts +1 -0
- package/types/common/routeConvention.d.ts +35 -0
- package/types/common/sleep.d.ts +2 -0
- package/types/common/splitVersion.d.ts +11 -0
- package/types/common/subRoute.d.ts +7 -0
- package/types/common/types.d.ts +14 -0
- package/types/common.d.ts +1 -0
- package/types/constant/constantRegistry.d.ts +89 -0
- package/types/constant/crystalize.d.ts +4 -0
- package/types/constant/deserialize.d.ts +7 -0
- package/types/constant/fieldInfo.d.ts +153 -0
- package/types/constant/getDefault.d.ts +3 -0
- package/types/constant/immerify.d.ts +2 -0
- package/types/constant/index.d.ts +10 -0
- package/types/constant/purify.d.ts +12 -0
- package/types/constant/serialize.d.ts +11 -0
- package/types/constant/types.d.ts +77 -0
- package/types/constant/via.d.ts +52 -0
- package/types/constant.d.ts +1 -0
- package/types/dictionary/base.dictionary.d.ts +1 -0
- package/types/dictionary/dictInfo.d.ts +206 -0
- package/types/dictionary/dictionary.d.ts +11 -0
- package/types/dictionary/index.d.ts +4 -0
- package/types/dictionary/locale.d.ts +128 -0
- package/types/dictionary/trans.d.ts +82 -0
- package/types/dictionary.d.ts +1 -0
- package/types/document/by.d.ts +20 -0
- package/types/document/dataLoader.d.ts +36 -0
- package/types/document/database.d.ts +96 -0
- package/types/document/databaseRegistry.d.ts +36 -0
- package/types/document/documentQuery.d.ts +105 -0
- package/types/document/documentSchema.d.ts +33 -0
- package/types/document/filterMeta.d.ts +84 -0
- package/types/document/index.d.ts +11 -0
- package/types/document/into.d.ts +65 -0
- package/types/document/loaderInfo.d.ts +35 -0
- package/types/document/schema.d.ts +5 -0
- package/types/document/types.d.ts +36 -0
- package/types/document.d.ts +1 -0
- package/types/fetch/client/fetchClient.d.ts +78 -0
- package/types/fetch/client/httpClient.d.ts +39 -0
- package/types/fetch/client/index.d.ts +3 -0
- package/types/fetch/client/wsClient.d.ts +37 -0
- package/types/fetch/client.d.ts +1 -0
- package/types/fetch/fetchType/appliedReturn.type.d.ts +67 -0
- package/types/fetch/fetchType/buildFetch.type.d.ts +11 -0
- package/types/fetch/fetchType/clientSignal.type.d.ts +16 -0
- package/types/fetch/fetchType/endpointFetch.type.d.ts +29 -0
- package/types/fetch/fetchType/index.d.ts +5 -0
- package/types/fetch/fetchType/sliceFetch.type.d.ts +76 -0
- package/types/fetch/fetchType.d.ts +1 -0
- package/types/fetch/index.d.ts +4 -0
- package/types/fetch/requestStorage.d.ts +29 -0
- package/types/fetch/serializer/fetch.serializer.d.ts +14 -0
- package/types/fetch/serializer/index.d.ts +1 -0
- package/types/fetch/serializer.d.ts +1 -0
- package/types/fetch/types.d.ts +19 -0
- package/types/fetch.d.ts +1 -0
- package/types/index.d.ts +213 -0
- package/types/server/akanApp.d.ts +17 -0
- package/types/server/akanAppHeaders.d.ts +1 -0
- package/types/server/akanLib.d.ts +33 -0
- package/types/server/akanOption.d.ts +15 -0
- package/types/server/akanServer.d.ts +47 -0
- package/types/server/artifact/builderRpc.d.ts +42 -0
- package/types/server/artifact/index.d.ts +6 -0
- package/types/server/artifact/ipcTypes.d.ts +73 -0
- package/types/server/artifact/manifestTypes.d.ts +16 -0
- package/types/server/artifact/routeClientCache.d.ts +45 -0
- package/types/server/artifact/routeSeedIndexStore.d.ts +43 -0
- package/types/server/artifact/routesManifestStore.d.ts +16 -0
- package/types/server/artifact.d.ts +1 -0
- package/types/server/decorators.d.ts +6 -0
- package/types/server/di/diLifecycle.d.ts +45 -0
- package/types/server/di/index.d.ts +4 -0
- package/types/server/di/predefinedAdaptor.d.ts +33 -0
- package/types/server/di/resolveAdaptorHierarchy.d.ts +21 -0
- package/types/server/di/resolveHierarchy.d.ts +11 -0
- package/types/server/di/resolveServiceHierarchy.d.ts +13 -0
- package/types/server/di/utils.d.ts +14 -0
- package/types/server/di.d.ts +1 -0
- package/types/server/hmr/changeBatch.d.ts +13 -0
- package/types/server/hmr/clientScript.d.ts +1 -0
- package/types/server/hmr/devHmrController.d.ts +24 -0
- package/types/server/hmr/index.d.ts +4 -0
- package/types/server/hmr/wsHub.d.ts +45 -0
- package/types/server/hmr.d.ts +1 -0
- package/types/server/imageOptimizer.d.ts +12 -0
- package/types/server/imageOptimizerError.d.ts +4 -0
- package/types/server/index.d.ts +14 -0
- package/types/server/lifecycle/shutdownManager.d.ts +13 -0
- package/types/server/logging/rotatingLogWriter.d.ts +20 -0
- package/types/server/processMetricsCollector.d.ts +10 -0
- package/types/server/proxy/akanResponse.d.ts +7 -0
- package/types/server/proxy/bunRequestFields.d.ts +1 -0
- package/types/server/proxy/hostBasePathWebProxy.d.ts +6 -0
- package/types/server/proxy/index.d.ts +6 -0
- package/types/server/proxy/localeWebProxy.d.ts +5 -0
- package/types/server/proxy/types.d.ts +37 -0
- package/types/server/proxy/webProxyRunner.d.ts +7 -0
- package/types/server/proxy.d.ts +1 -0
- package/types/server/resolver/database.resolver.d.ts +6 -0
- package/types/server/resolver/index.d.ts +3 -0
- package/types/server/resolver/service.resolver.d.ts +7 -0
- package/types/server/resolver/signal.resolver.d.ts +29 -0
- package/types/server/resolver.d.ts +1 -0
- package/types/server/robots.d.ts +1 -0
- package/types/server/routeElementComposer.d.ts +41 -0
- package/types/server/routeTreeBuilder.d.ts +28 -0
- package/types/server/routing/apiRouter.d.ts +61 -0
- package/types/server/rscClient.d.ts +15 -0
- package/types/server/rscWorker.d.ts +3 -0
- package/types/server/rscWorkerHost.d.ts +83 -0
- package/types/server/sitemap.d.ts +13 -0
- package/types/server/ssrFromRscRenderer.d.ts +6 -0
- package/types/server/ssrTypes.d.ts +47 -0
- package/types/server/systemPages.d.ts +27 -0
- package/types/server/types/react-server-dom-webpack.d.ts +91 -0
- package/types/server/types.d.ts +67 -0
- package/types/server/vendor/akanjs-base.d.ts +1 -0
- package/types/server/vendor/akanjs-common.d.ts +1 -0
- package/types/server/vendor/akanjs-constant.d.ts +1 -0
- package/types/server/vendor/akanjs-store.d.ts +1 -0
- package/types/server/vendor/react-dom-client.d.ts +3 -0
- package/types/server/vendor/react-dom.d.ts +3 -0
- package/types/server/vendor/react-jsx-dev-runtime.d.ts +3 -0
- package/types/server/vendor/react-jsx-runtime.d.ts +3 -0
- package/types/server/vendor/react-refresh-runtime.d.ts +3 -0
- package/types/server/vendor/react-server-dom-webpack-client-browser.d.ts +3 -0
- package/types/server/vendor/react.d.ts +11 -0
- package/types/server/vendor/scheduler.d.ts +3 -0
- package/types/server/webRouter.d.ts +44 -0
- package/types/server.d.ts +1 -0
- package/types/service/adapt.d.ts +15 -0
- package/types/service/base.service.d.ts +18 -0
- package/types/service/index.d.ts +10 -0
- package/types/service/injectInfo.d.ts +102 -0
- package/types/service/ipcTypes.d.ts +194 -0
- package/types/service/predefinedAdaptor/cache.adaptor.d.ts +46 -0
- package/types/service/predefinedAdaptor/compress.adaptor.d.ts +22 -0
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +329 -0
- package/types/service/predefinedAdaptor/index.d.ts +13 -0
- package/types/service/predefinedAdaptor/logging.adaptor.d.ts +20 -0
- package/types/service/predefinedAdaptor/queue.adaptor.d.ts +22 -0
- package/types/service/predefinedAdaptor/role.adaptor.d.ts +17 -0
- package/types/service/predefinedAdaptor/schedule.adaptor.d.ts +60 -0
- package/types/service/predefinedAdaptor/solidCache.adaptor.d.ts +25 -0
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +20 -0
- package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +19 -0
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +24 -0
- package/types/service/predefinedAdaptor/sqlitePath.d.ts +9 -0
- package/types/service/predefinedAdaptor/storage.adaptor.d.ts +80 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +49 -0
- package/types/service/predefinedAdaptor.d.ts +1 -0
- package/types/service/serve.d.ts +31 -0
- package/types/service/serviceModule.d.ts +50 -0
- package/types/service/serviceRegistry.d.ts +9 -0
- package/types/service/types.d.ts +55 -0
- package/types/service.d.ts +1 -0
- package/types/signal/base.signal.d.ts +41 -0
- package/types/signal/endpoint.d.ts +28 -0
- package/types/signal/endpointInfo.d.ts +77 -0
- package/types/signal/exception.d.ts +54786 -0
- package/types/signal/guard.d.ts +10 -0
- package/types/signal/guards.d.ts +10 -0
- package/types/signal/index.d.ts +19 -0
- package/types/signal/intercept.d.ts +17 -0
- package/types/signal/internal.d.ts +18 -0
- package/types/signal/internalArg.d.ts +31 -0
- package/types/signal/internalInfo.d.ts +45 -0
- package/types/signal/middleware.d.ts +51 -0
- package/types/signal/serializer/fetch.serializer.d.ts +14 -0
- package/types/signal/serializer/index.d.ts +1 -0
- package/types/signal/serializer.d.ts +1 -0
- package/types/signal/serverSignal.d.ts +36 -0
- package/types/signal/signalContext.d.ts +96 -0
- package/types/signal/signalRegistry.d.ts +49 -0
- package/types/signal/slice.d.ts +42 -0
- package/types/signal/sliceInfo.d.ts +51 -0
- package/types/signal/trace.d.ts +97 -0
- package/types/signal/types.d.ts +142 -0
- package/types/signal.d.ts +1 -0
- package/types/store/action.d.ts +145 -0
- package/types/store/baseSt.d.ts +412 -0
- package/types/store/hooks.d.ts +1 -0
- package/types/store/index.d.ts +8 -0
- package/types/store/rootStore.d.ts +22 -0
- package/types/store/state.d.ts +91 -0
- package/types/store/stateBuilder.d.ts +141 -0
- package/types/store/stateInfo.d.ts +23 -0
- package/types/store/store.d.ts +36 -0
- package/types/store/storeInstance.d.ts +38 -0
- package/types/store/storeRegistry.d.ts +13 -0
- package/types/store/types.d.ts +42 -0
- package/types/store/withSelector.d.ts +42 -0
- package/types/store.d.ts +1 -0
- package/types/test/index.d.ts +4 -0
- package/types/test/playwright.config.base.d.ts +9 -0
- package/types/test/playwright.pageAgent.d.ts +12 -0
- package/types/test/sample.d.ts +15 -0
- package/types/test/sampleOf.d.ts +5 -0
- package/types/test/signalTest.preload.d.ts +1 -0
- package/types/test/signalTestRuntime.d.ts +29 -0
- package/types/test/testServer.d.ts +26 -0
- package/types/test.d.ts +1 -0
- package/types/ui/BottomSheet.d.ts +13 -0
- package/types/ui/Button.d.ts +11 -0
- package/types/ui/ClientSide.d.ts +8 -0
- package/types/ui/Clipboard.d.ts +7 -0
- package/types/ui/Constant/Doc.d.ts +29 -0
- package/types/ui/Constant/Mermaid.d.ts +8 -0
- package/types/ui/Constant/index.d.ts +6 -0
- package/types/ui/Constant/schemaDoc.d.ts +84 -0
- package/types/ui/Constant.d.ts +1 -0
- package/types/ui/Copy.d.ts +10 -0
- package/types/ui/CsrImage.d.ts +18 -0
- package/types/ui/Data/CardList.d.ts +36 -0
- package/types/ui/Data/Dashboard.d.ts +11 -0
- package/types/ui/Data/Insight.d.ts +9 -0
- package/types/ui/Data/Item.d.ts +75 -0
- package/types/ui/Data/ListContainer.d.ts +49 -0
- package/types/ui/Data/Pagination.d.ts +9 -0
- package/types/ui/Data/QueryMaker.d.ts +8 -0
- package/types/ui/Data/TableList.d.ts +26 -0
- package/types/ui/Data/index.d.ts +9 -0
- package/types/ui/Data/index_.d.ts +8 -0
- package/types/ui/Data.d.ts +1 -0
- package/types/ui/DatePicker.d.ts +36 -0
- package/types/ui/Dialog/Action.d.ts +5 -0
- package/types/ui/Dialog/Close.d.ts +6 -0
- package/types/ui/Dialog/Content.d.ts +6 -0
- package/types/ui/Dialog/Modal.d.ts +9 -0
- package/types/ui/Dialog/Provider.d.ts +11 -0
- package/types/ui/Dialog/Title.d.ts +5 -0
- package/types/ui/Dialog/Trigger.d.ts +6 -0
- package/types/ui/Dialog/context.d.ts +10 -0
- package/types/ui/Dialog/index.d.ts +9 -0
- package/types/ui/Dialog.d.ts +1 -0
- package/types/ui/DragAction.d.ts +24 -0
- package/types/ui/DraggableList.d.ts +31 -0
- package/types/ui/Dropdown.d.ts +14 -0
- package/types/ui/Empty.d.ts +12 -0
- package/types/ui/Field.d.ts +411 -0
- package/types/ui/FontFace.d.ts +6 -0
- package/types/ui/Image.d.ts +49 -0
- package/types/ui/InfiniteScroll.d.ts +10 -0
- package/types/ui/Input.d.ts +95 -0
- package/types/ui/KeyboardAvoiding.d.ts +8 -0
- package/types/ui/Layout/BottomAction.d.ts +6 -0
- package/types/ui/Layout/BottomInset.d.ts +7 -0
- package/types/ui/Layout/BottomTab.d.ts +14 -0
- package/types/ui/Layout/Header.d.ts +8 -0
- package/types/ui/Layout/LeftSider.d.ts +9 -0
- package/types/ui/Layout/Navbar.d.ts +11 -0
- package/types/ui/Layout/RightSider.d.ts +10 -0
- package/types/ui/Layout/Sider.d.ts +7 -0
- package/types/ui/Layout/Template.d.ts +7 -0
- package/types/ui/Layout/TopLeftAction.d.ts +6 -0
- package/types/ui/Layout/Unit.d.ts +9 -0
- package/types/ui/Layout/View.d.ts +8 -0
- package/types/ui/Layout/Zone.d.ts +6 -0
- package/types/ui/Layout/index.d.ts +14 -0
- package/types/ui/Layout.d.ts +1 -0
- package/types/ui/Link/Back.d.ts +7 -0
- package/types/ui/Link/Close.d.ts +7 -0
- package/types/ui/Link/CsrLink.d.ts +2 -0
- package/types/ui/Link/Lang.d.ts +8 -0
- package/types/ui/Link/SsrLink.d.ts +2 -0
- package/types/ui/Link/index.d.ts +10 -0
- package/types/ui/Link/types.d.ts +42 -0
- package/types/ui/Link.d.ts +1 -0
- package/types/ui/Load/Edit.d.ts +4 -0
- package/types/ui/Load/Edit_Client.d.ts +27 -0
- package/types/ui/Load/Page.d.ts +15 -0
- package/types/ui/Load/PageCSR.d.ts +3 -0
- package/types/ui/Load/Pagination.d.ts +8 -0
- package/types/ui/Load/Units.d.ts +30 -0
- package/types/ui/Load/View.d.ts +22 -0
- package/types/ui/Load/index.d.ts +8 -0
- package/types/ui/Load/index_.d.ts +3 -0
- package/types/ui/Load.d.ts +1 -0
- package/types/ui/Loading/Area.d.ts +1 -0
- package/types/ui/Loading/Button.d.ts +7 -0
- package/types/ui/Loading/Input.d.ts +7 -0
- package/types/ui/Loading/ProgressBar.d.ts +6 -0
- package/types/ui/Loading/Skeleton.d.ts +7 -0
- package/types/ui/Loading/Spin.d.ts +7 -0
- package/types/ui/Loading/index.d.ts +8 -0
- package/types/ui/Loading.d.ts +1 -0
- package/types/ui/Menu.d.ts +26 -0
- package/types/ui/Modal.d.ts +19 -0
- package/types/ui/Model/AdminPanel.d.ts +31 -0
- package/types/ui/Model/Edit.d.ts +16 -0
- package/types/ui/Model/EditModal.d.ts +52 -0
- package/types/ui/Model/EditWrapper.d.ts +13 -0
- package/types/ui/Model/LoadInit.d.ts +10 -0
- package/types/ui/Model/New.d.ts +16 -0
- package/types/ui/Model/NewWrapper.d.ts +13 -0
- package/types/ui/Model/NewWrapper_Client.d.ts +13 -0
- package/types/ui/Model/Remove.d.ts +13 -0
- package/types/ui/Model/RemoveWrapper.d.ts +12 -0
- package/types/ui/Model/SureToRemove.d.ts +11 -0
- package/types/ui/Model/View.d.ts +19 -0
- package/types/ui/Model/ViewEditModal.d.ts +12 -0
- package/types/ui/Model/ViewModal.d.ts +14 -0
- package/types/ui/Model/ViewWrapper.d.ts +12 -0
- package/types/ui/Model/index.d.ts +16 -0
- package/types/ui/Model/index_.d.ts +14 -0
- package/types/ui/Model.d.ts +1 -0
- package/types/ui/More.d.ts +12 -0
- package/types/ui/ObjectId.d.ts +5 -0
- package/types/ui/Pagination.d.ts +20 -0
- package/types/ui/Popconfirm.d.ts +28 -0
- package/types/ui/Portal.d.ts +6 -0
- package/types/ui/Radio.d.ts +19 -0
- package/types/ui/RecentTime.d.ts +12 -0
- package/types/ui/Refresh.d.ts +7 -0
- package/types/ui/ScreenNavigator.d.ts +18 -0
- package/types/ui/Select.d.ts +43 -0
- package/types/ui/Signal/Arg.d.ts +78 -0
- package/types/ui/Signal/Doc.d.ts +33 -0
- package/types/ui/Signal/Listener.d.ts +9 -0
- package/types/ui/Signal/Message.d.ts +23 -0
- package/types/ui/Signal/Object.d.ts +20 -0
- package/types/ui/Signal/PubSub.d.ts +24 -0
- package/types/ui/Signal/Request.d.ts +8 -0
- package/types/ui/Signal/Response.d.ts +14 -0
- package/types/ui/Signal/RestApi.d.ts +40 -0
- package/types/ui/Signal/WebSocket.d.ts +11 -0
- package/types/ui/Signal/index.d.ts +18 -0
- package/types/ui/Signal/makeExample.d.ts +4 -0
- package/types/ui/Signal/style.d.ts +15 -0
- package/types/ui/Signal.d.ts +1 -0
- package/types/ui/System/CSR.d.ts +32 -0
- package/types/ui/System/Client.d.ts +47 -0
- package/types/ui/System/Common.d.ts +47 -0
- package/types/ui/System/DevModeToggle.d.ts +1 -0
- package/types/ui/System/Gtag.d.ts +4 -0
- package/types/ui/System/Messages.d.ts +1 -0
- package/types/ui/System/Reconnect.d.ts +1 -0
- package/types/ui/System/Root.d.ts +6 -0
- package/types/ui/System/SSR.d.ts +24 -0
- package/types/ui/System/SelectLanguage.d.ts +5 -0
- package/types/ui/System/ThemeToggle.d.ts +4 -0
- package/types/ui/System/index.d.ts +12 -0
- package/types/ui/System.d.ts +1 -0
- package/types/ui/Tab/Menu.d.ts +12 -0
- package/types/ui/Tab/Menus.d.ts +6 -0
- package/types/ui/Tab/Panel.d.ts +8 -0
- package/types/ui/Tab/Provider.d.ts +10 -0
- package/types/ui/Tab/context.d.ts +9 -0
- package/types/ui/Tab/index.d.ts +7 -0
- package/types/ui/Tab.d.ts +1 -0
- package/types/ui/Table.d.ts +41 -0
- package/types/ui/ToggleSelect.d.ts +33 -0
- package/types/ui/Unauthorized.d.ts +9 -0
- package/types/ui/animated.d.ts +5 -0
- package/types/ui/fontCss.d.ts +11 -0
- package/types/ui/index.d.ts +44 -0
- package/types/ui.d.ts +1 -0
- package/types/webkit/bootCsr.d.ts +16 -0
- package/types/webkit/createRobotPage.d.ts +15 -0
- package/types/webkit/createSitemapPage.d.ts +4 -0
- package/types/webkit/index.d.ts +17 -0
- package/types/webkit/lazy.d.ts +11 -0
- package/types/webkit/types.d.ts +7 -0
- package/types/webkit/useCamera.d.ts +19 -0
- package/types/webkit/useCodepush.d.ts +16 -0
- package/types/webkit/useContact.d.ts +11 -0
- package/types/webkit/useCsrValues.d.ts +30 -0
- package/types/webkit/useDebounce.d.ts +2 -0
- package/types/webkit/useFetch.d.ts +18 -0
- package/types/webkit/useGeoLocation.d.ts +8 -0
- package/types/webkit/useHistory.d.ts +23 -0
- package/types/webkit/useInterval.d.ts +2 -0
- package/types/webkit/useLocation.d.ts +8 -0
- package/types/webkit/usePurchase.d.ts +19 -0
- package/types/webkit/usePushNoti.d.ts +7 -0
- package/types/webkit/useThrottle.d.ts +2 -0
- package/types/webkit.d.ts +1 -0
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Clipboard.tsx +1 -1
- package/ui/CsrImage.tsx +3 -14
- package/ui/Data/ListContainer.tsx +1 -1
- package/ui/Data/Pagination.tsx +1 -1
- package/ui/Data/QueryMaker.tsx +0 -339
- package/ui/Data/index.ts +0 -1
- package/ui/DatePicker.tsx +1 -95
- package/ui/Dialog/Modal.tsx +1 -1
- package/ui/DraggableList.tsx +5 -5
- package/ui/Field.tsx +2 -3
- package/ui/Image.tsx +2 -3
- package/ui/InfiniteScroll.tsx +0 -1
- package/ui/Input.tsx +1 -8
- package/ui/Layout/BottomTab.tsx +2 -2
- package/ui/Link/SsrLink.tsx +1 -2
- package/ui/Load/Page.tsx +1 -1
- package/ui/Load/PageCSR.tsx +0 -1
- package/ui/Load/Units.tsx +1 -2
- package/ui/Load/View.tsx +1 -2
- package/ui/Menu.tsx +5 -8
- package/ui/Model/EditModal.tsx +2 -5
- package/ui/Popconfirm.tsx +2 -4
- package/ui/ScreenNavigator.tsx +2 -3
- package/ui/Signal/Message.tsx +2 -3
- package/ui/Signal/PubSub.tsx +0 -2
- package/ui/Signal/Response.tsx +1 -1
- package/ui/Signal/WebSocket.tsx +2 -11
- package/ui/System/Client.tsx +7 -41
- package/ui/System/Gtag.tsx +2 -5
- package/ui/System/Messages.tsx +2 -2
- package/ui/System/Reconnect.tsx +5 -6
- package/ui/System/Root.tsx +0 -1
- package/ui/System/SSR.tsx +1 -7
- package/ui/ToggleSelect.tsx +3 -8
- package/ui/Unauthorized.tsx +1 -1
- package/webkit/bootCsr.tsx +3 -6
- package/webkit/lazy.tsx +1 -8
- package/webkit/useCamera.tsx +0 -1
- package/webkit/useCodepush.tsx +4 -9
- package/webkit/useContact.tsx +0 -1
- package/webkit/useCsrValues.ts +6 -10
- package/webkit/useDebounce.ts +2 -2
- package/webkit/usePurchase.tsx +5 -9
- package/webkit/usePushNoti.tsx +0 -1
- package/base/base.test.ts +0 -135
- package/base/baseEnv.test.ts +0 -146
- package/base/primitiveRegistry.test.ts +0 -127
- package/base/symbols.test.ts +0 -29
- package/base/utils.test.ts +0 -30
- package/build.ts +0 -318
- package/capacitor.base.config.test.ts +0 -83
- package/client/client.auth-storage.test.ts +0 -210
- package/client/client.decorators.test.ts +0 -74
- package/client/client.device.test.ts +0 -181
- package/client/client.page.test.tsx +0 -175
- package/client/client.pure.test.ts +0 -146
- package/client/client.router.test.ts +0 -290
- package/common/Logger.test.ts +0 -45
- package/common/formatAndValidation.test.ts +0 -61
- package/common/httpClient.test.ts +0 -91
- package/common/objectPath.test.ts +0 -108
- package/common/routeConvention.test.ts +0 -132
- package/common/runtimeConfig.test.ts +0 -84
- package/constant/constant.test.ts +0 -374
- package/dictionary/dictionary.test.ts +0 -352
- package/document/document.test.ts +0 -698
- package/fetch/fetch.test.ts +0 -838
- package/server/akanApp.test.ts +0 -130
- package/server/akanServer.test.ts +0 -157
- package/server/artifact/routeClientCache.test.ts +0 -265
- package/server/artifact/routeSeedIndex.test.ts +0 -56
- package/server/artifact/routesManifest.test.ts +0 -64
- package/server/di/diLifecycle.contract.test.ts +0 -168
- package/server/logging/rotatingLogWriter.test.ts +0 -119
- package/server/processMetrics.test.ts +0 -24
- package/server/proxy/webProxyRunner.test.ts +0 -66
- package/server/resolver/resolver.contract.test.ts +0 -594
- package/server/robots.test.ts +0 -16
- package/server/routeTree.test.tsx +0 -198
- package/server/routing/apiRouter.test.ts +0 -136
- package/server/sitemap.test.ts +0 -61
- package/server/systemPages.test.tsx +0 -93
- package/server/webRouter.test.ts +0 -49
- package/service/predefinedAdaptor/compress.adaptor.test.ts +0 -184
- package/service/predefinedAdaptor/solidCache.adaptor.test.ts +0 -107
- package/service/predefinedAdaptor/solidSqlite.test.ts +0 -457
- package/service/service.test.ts +0 -732
- package/signal/signal.test.ts +0 -892
- package/store/stateBuilder.test.ts +0 -168
- package/store/store.test.ts +0 -427
- package/tsconfig.json +0 -5
- package/ui/Constant/schemaDoc.test.ts +0 -113
- package/ui/InfiniteScroll.test.tsx +0 -155
- package/ui/System/Common.test.ts +0 -37
- package/webkit/bootCsr.test.tsx +0 -153
- package/webkit/native.test.tsx +0 -341
- package/webkit/webkit.test.tsx +0 -531
|
@@ -24,7 +24,6 @@ type PubsubSubscribeFn<E> = (
|
|
|
24
24
|
...args: [...EndpInfoArgs<E>, handleEvent: (data: EndpInfoReturns<E>) => PromiseOrObject<void>, options?: FetchPolicy]
|
|
25
25
|
) => () => void;
|
|
26
26
|
|
|
27
|
-
// Keys kept as-is: query / mutation / message (emit)
|
|
28
27
|
type PrimaryFetchType<EInfoObj extends { [key: string]: EndpointInfo }> = {
|
|
29
28
|
[K in keyof EInfoObj as EndpInfoType<EInfoObj[K]> extends "query" | "mutation" | "message" ? K : never]: EndpInfoType<
|
|
30
29
|
EInfoObj[K]
|
|
@@ -35,7 +34,6 @@ type PrimaryFetchType<EInfoObj extends { [key: string]: EndpointInfo }> = {
|
|
|
35
34
|
: never;
|
|
36
35
|
};
|
|
37
36
|
|
|
38
|
-
// Keys remapped to `subscribe${Key}`
|
|
39
37
|
type PubsubFetchType<EInfoObj extends { [key: string]: EndpointInfo }> = {
|
|
40
38
|
[K in keyof EInfoObj as EndpInfoType<EInfoObj[K]> extends "pubsub"
|
|
41
39
|
? K extends string
|
|
@@ -44,7 +42,6 @@ type PubsubFetchType<EInfoObj extends { [key: string]: EndpointInfo }> = {
|
|
|
44
42
|
: never]: PubsubSubscribeFn<EInfoObj[K]>;
|
|
45
43
|
};
|
|
46
44
|
|
|
47
|
-
// Keys remapped to `listen${Key}`
|
|
48
45
|
type MessageListenFetchType<EInfoObj extends { [key: string]: EndpointInfo }> = {
|
|
49
46
|
[K in keyof EInfoObj as EndpInfoType<EInfoObj[K]> extends "message"
|
|
50
47
|
? K extends string
|
|
@@ -5,8 +5,6 @@ import type { DatabaseModel, ExtractSort, FilterInstance } from "akanjs/document
|
|
|
5
5
|
import type { SliceCls, SliceInfoArgs } from "akanjs/signal";
|
|
6
6
|
import type { ClientEdit, ClientInit, ClientView, EditReturn, InitReturn, ViewReturn } from "./appliedReturn.type";
|
|
7
7
|
|
|
8
|
-
// Shortcut accessors — avoids re-typing the long lookup path and lets TS
|
|
9
|
-
// memoize each access once per SlceCls instantiation.
|
|
10
8
|
type _SliceMap<S extends SliceCls> = S[typeof SLICE_META];
|
|
11
9
|
type _RefName<S extends SliceCls> = S["srv"]["cnst"]["refName"];
|
|
12
10
|
type _Cap<S extends SliceCls> = S["srv"]["cnst"]["_CapitalizedRefName"];
|
|
@@ -23,11 +21,6 @@ type _Sort<S extends SliceCls> = S["srv"]["db"]["_Sort"];
|
|
|
23
21
|
type _LightWithId<S extends SliceCls> = _Light<S> extends { id: string } ? _Light<S> : { id: string };
|
|
24
22
|
type _SliceFetchInitOption<S extends SliceCls> = FetchInitOption<_Input<S>, _Filter<S>, _DefaultInput<S>, _Sort<S>>;
|
|
25
23
|
|
|
26
|
-
// The 4 dynamic parts below are each a single homomorphic mapped type over
|
|
27
|
-
// `keyof SliceMap`, which preserves each result key's declaration trace
|
|
28
|
-
// (better hover, slightly better go-to-def) and avoids the
|
|
29
|
-
// `UnionToIntersection`/`MergedValues` blow-up.
|
|
30
|
-
|
|
31
24
|
type SliceListFetch<S extends SliceCls> = {
|
|
32
25
|
[Suffix in keyof _SliceMap<S> as Suffix extends string ? `${_RefName<S>}List${Capitalize<Suffix>}` : never]: (
|
|
33
26
|
...args: [
|
|
@@ -145,7 +138,6 @@ type AppliedBaseSliceFetchType<
|
|
|
145
138
|
} & {
|
|
146
139
|
[K in `get${_CapitalizedRefName}Edit`]: (id: string, option?: FetchPolicy) => ClientEdit<RefName, Full>;
|
|
147
140
|
} & {
|
|
148
|
-
// TODO: migrate this to shared
|
|
149
141
|
[K in `add${_CapitalizedRefName}Files`]: (
|
|
150
142
|
fileList: FileList,
|
|
151
143
|
parentId?: string,
|
package/fetch/requestStorage.ts
CHANGED
|
@@ -15,11 +15,7 @@ declare global {
|
|
|
15
15
|
let _requestStorage: RequestStorage | null = null;
|
|
16
16
|
if (typeof window === "undefined") {
|
|
17
17
|
try {
|
|
18
|
-
|
|
19
|
-
// Bun's HMR runtime, and a top-level `await import("node:async_hooks")`
|
|
20
|
-
// turns the whole `export *` chain into an async module. Named imports
|
|
21
|
-
// from that chain can then be observed as `null` during evaluation
|
|
22
|
-
// (notably `FetchClient` in `akanjs/client/useClient.ts`).
|
|
18
|
+
|
|
23
19
|
const { AsyncLocalStorage } = require("node:async_hooks") as typeof import("node:async_hooks");
|
|
24
20
|
globalThis.__AKAN_REQUEST_STORAGE__ ??= new AsyncLocalStorage() as RequestStorage;
|
|
25
21
|
_requestStorage = globalThis.__AKAN_REQUEST_STORAGE__;
|
|
@@ -61,10 +57,6 @@ export function pushRequestFallback(req: Request): () => void {
|
|
|
61
57
|
};
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
// Lightweight server-side helpers for server components to read the incoming
|
|
65
|
-
// request's headers/cookies. Kept in akanjs/fetch (no heavy client deps) so
|
|
66
|
-
// they can be imported from inside the RSC worker without pulling `akanjs/
|
|
67
|
-
// client`'s useClient macro chain.
|
|
68
60
|
/** Returns the active server request from AsyncLocalStorage or the fallback stack. */
|
|
69
61
|
export function getRequest(): Request | undefined {
|
|
70
62
|
return requestStorage?.getStore() ?? globalThis.__AKAN_REQUEST_FALLBACK_STACK__?.at(-1);
|
|
@@ -112,7 +104,7 @@ export function parseCookieHeader(cookieHeader: string): Map<string, CookieEntry
|
|
|
112
104
|
if (eq === -1) continue;
|
|
113
105
|
const name = trimmed.slice(0, eq).trim();
|
|
114
106
|
const raw = trimmed.slice(eq + 1).trim();
|
|
115
|
-
|
|
107
|
+
|
|
116
108
|
const value = raw.startsWith("j:")
|
|
117
109
|
? (() => {
|
|
118
110
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akanjs",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,98 +15,140 @@
|
|
|
15
15
|
},
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
+
"types": "./types/index.d.ts",
|
|
18
19
|
"import": "./index.ts",
|
|
19
|
-
"types": "./index.ts",
|
|
20
20
|
"default": "./index.ts"
|
|
21
21
|
},
|
|
22
22
|
"./package.json": "./package.json",
|
|
23
23
|
"./base": {
|
|
24
|
+
"types": "./types/base/index.d.ts",
|
|
24
25
|
"import": "./base/index.ts",
|
|
25
|
-
"types": "./base/index.ts",
|
|
26
26
|
"default": "./base/index.ts"
|
|
27
27
|
},
|
|
28
28
|
"./common": {
|
|
29
|
+
"types": "./types/common/index.d.ts",
|
|
29
30
|
"import": "./common/index.ts",
|
|
30
|
-
"types": "./common/index.ts",
|
|
31
31
|
"default": "./common/index.ts"
|
|
32
32
|
},
|
|
33
|
-
"./common/*":
|
|
33
|
+
"./common/*": {
|
|
34
|
+
"types": "./types/common/*.d.ts",
|
|
35
|
+
"import": "./common/*",
|
|
36
|
+
"default": "./common/*"
|
|
37
|
+
},
|
|
38
|
+
"./common/*.ts": {
|
|
39
|
+
"types": "./types/common/*.d.ts",
|
|
40
|
+
"import": "./common/*.ts",
|
|
41
|
+
"default": "./common/*.ts"
|
|
42
|
+
},
|
|
43
|
+
"./common/*.tsx": {
|
|
44
|
+
"types": "./types/common/*.d.ts",
|
|
45
|
+
"import": "./common/*.tsx",
|
|
46
|
+
"default": "./common/*.tsx"
|
|
47
|
+
},
|
|
34
48
|
"./fetch": {
|
|
49
|
+
"types": "./types/fetch/index.d.ts",
|
|
35
50
|
"import": "./fetch/index.ts",
|
|
36
|
-
"types": "./fetch/index.ts",
|
|
37
51
|
"default": "./fetch/index.ts"
|
|
38
52
|
},
|
|
39
53
|
"./document": {
|
|
54
|
+
"types": "./types/document/index.d.ts",
|
|
40
55
|
"import": "./document/index.ts",
|
|
41
|
-
"types": "./document/index.ts",
|
|
42
56
|
"default": "./document/index.ts"
|
|
43
57
|
},
|
|
44
58
|
"./signal": {
|
|
59
|
+
"types": "./types/signal/index.d.ts",
|
|
45
60
|
"import": "./signal/index.ts",
|
|
46
|
-
"types": "./signal/index.ts",
|
|
47
61
|
"default": "./signal/index.ts"
|
|
48
62
|
},
|
|
49
63
|
"./store": {
|
|
64
|
+
"types": "./types/store/index.d.ts",
|
|
50
65
|
"import": "./store/index.ts",
|
|
51
|
-
"types": "./store/index.ts",
|
|
52
66
|
"default": "./store/index.ts"
|
|
53
67
|
},
|
|
54
68
|
"./ui": {
|
|
69
|
+
"types": "./types/ui/index.d.ts",
|
|
55
70
|
"import": "./ui/index.ts",
|
|
56
|
-
"types": "./ui/index.ts",
|
|
57
71
|
"default": "./ui/index.ts"
|
|
58
72
|
},
|
|
59
|
-
"./ui/*":
|
|
73
|
+
"./ui/*": {
|
|
74
|
+
"types": "./types/ui/*.d.ts",
|
|
75
|
+
"import": "./ui/*",
|
|
76
|
+
"default": "./ui/*"
|
|
77
|
+
},
|
|
78
|
+
"./ui/*.ts": {
|
|
79
|
+
"types": "./types/ui/*.d.ts",
|
|
80
|
+
"import": "./ui/*.ts",
|
|
81
|
+
"default": "./ui/*.ts"
|
|
82
|
+
},
|
|
83
|
+
"./ui/*.tsx": {
|
|
84
|
+
"types": "./types/ui/*.d.ts",
|
|
85
|
+
"import": "./ui/*.tsx",
|
|
86
|
+
"default": "./ui/*.tsx"
|
|
87
|
+
},
|
|
60
88
|
"./client": {
|
|
89
|
+
"types": "./types/client/index.d.ts",
|
|
61
90
|
"import": "./client/index.ts",
|
|
62
|
-
"types": "./client/index.ts",
|
|
63
91
|
"default": "./client/index.ts"
|
|
64
92
|
},
|
|
65
93
|
"./client/capacitor": {
|
|
94
|
+
"types": "./types/client/capacitor.d.ts",
|
|
66
95
|
"import": "./client/capacitor.ts",
|
|
67
|
-
"types": "./client/capacitor.ts",
|
|
68
96
|
"default": "./client/capacitor.ts"
|
|
69
97
|
},
|
|
70
98
|
"./capacitor.base.config": {
|
|
99
|
+
"types": "./types/capacitor.base.config.d.ts",
|
|
71
100
|
"import": "./capacitor.base.config.ts",
|
|
72
|
-
"types": "./capacitor.base.config.ts",
|
|
73
101
|
"default": "./capacitor.base.config.ts"
|
|
74
102
|
},
|
|
75
103
|
"./webkit": {
|
|
104
|
+
"types": "./types/webkit/index.d.ts",
|
|
76
105
|
"import": "./webkit/index.ts",
|
|
77
|
-
"types": "./webkit/index.ts",
|
|
78
106
|
"default": "./webkit/index.ts"
|
|
79
107
|
},
|
|
80
|
-
"./webkit/*":
|
|
108
|
+
"./webkit/*": {
|
|
109
|
+
"types": "./types/webkit/*.d.ts",
|
|
110
|
+
"import": "./webkit/*",
|
|
111
|
+
"default": "./webkit/*"
|
|
112
|
+
},
|
|
113
|
+
"./webkit/*.ts": {
|
|
114
|
+
"types": "./types/webkit/*.d.ts",
|
|
115
|
+
"import": "./webkit/*.ts",
|
|
116
|
+
"default": "./webkit/*.ts"
|
|
117
|
+
},
|
|
118
|
+
"./webkit/*.tsx": {
|
|
119
|
+
"types": "./types/webkit/*.d.ts",
|
|
120
|
+
"import": "./webkit/*.tsx",
|
|
121
|
+
"default": "./webkit/*.tsx"
|
|
122
|
+
},
|
|
81
123
|
"./server": {
|
|
124
|
+
"types": "./types/server/index.d.ts",
|
|
82
125
|
"import": "./server/index.ts",
|
|
83
|
-
"types": "./server/index.ts",
|
|
84
126
|
"default": "./server/index.ts"
|
|
85
127
|
},
|
|
86
128
|
"./service": {
|
|
129
|
+
"types": "./types/service/index.d.ts",
|
|
87
130
|
"import": "./service/index.ts",
|
|
88
|
-
"types": "./service/index.ts",
|
|
89
131
|
"default": "./service/index.ts"
|
|
90
132
|
},
|
|
91
133
|
"./constant": {
|
|
134
|
+
"types": "./types/constant/index.d.ts",
|
|
92
135
|
"import": "./constant/index.ts",
|
|
93
|
-
"types": "./constant/index.ts",
|
|
94
136
|
"default": "./constant/index.ts"
|
|
95
137
|
},
|
|
96
138
|
"./dictionary": {
|
|
139
|
+
"types": "./types/dictionary/index.d.ts",
|
|
97
140
|
"import": "./dictionary/index.ts",
|
|
98
|
-
"types": "./dictionary/index.ts",
|
|
99
141
|
"default": "./dictionary/index.ts"
|
|
100
142
|
},
|
|
101
143
|
"./test": {
|
|
144
|
+
"types": "./types/test/index.d.ts",
|
|
102
145
|
"import": "./test/index.ts",
|
|
103
|
-
"types": "./test/index.ts",
|
|
104
146
|
"default": "./test/index.ts"
|
|
105
147
|
},
|
|
106
148
|
"./ui/styles.css": "./ui/styles.css",
|
|
107
149
|
"./server/rsc-worker": {
|
|
150
|
+
"types": "./types/server/rscWorker.d.ts",
|
|
108
151
|
"import": "./server/rscWorker.tsx",
|
|
109
|
-
"types": "./server/rscWorker.tsx",
|
|
110
152
|
"default": "./server/rscWorker.tsx"
|
|
111
153
|
}
|
|
112
154
|
},
|
|
@@ -286,5 +328,6 @@
|
|
|
286
328
|
},
|
|
287
329
|
"engines": {
|
|
288
330
|
"bun": ">=1.3.13"
|
|
289
|
-
}
|
|
290
|
-
|
|
331
|
+
},
|
|
332
|
+
"main": "./index.ts"
|
|
333
|
+
}
|
package/server/akanApp.ts
CHANGED
|
@@ -154,7 +154,7 @@ export class AkanApp {
|
|
|
154
154
|
process.on("SIGINT", () => this.#handleShutdownSignal("SIGINT"));
|
|
155
155
|
process.on("SIGTERM", () => this.#handleShutdownSignal("SIGTERM"));
|
|
156
156
|
await new Promise<void>((resolve) => {
|
|
157
|
-
|
|
157
|
+
|
|
158
158
|
this.#resolveStopped = resolve;
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -360,7 +360,6 @@ export class AkanApp {
|
|
|
360
360
|
try {
|
|
361
361
|
await rm(socketPath, { force: true });
|
|
362
362
|
} catch {
|
|
363
|
-
// Best-effort cleanup for stale Unix sockets.
|
|
364
363
|
}
|
|
365
364
|
}
|
|
366
365
|
|
|
@@ -589,8 +588,7 @@ export class AkanApp {
|
|
|
589
588
|
|
|
590
589
|
#proxyResponse(upstreamRes: Response): Response {
|
|
591
590
|
const headers = new Headers(upstreamRes.headers);
|
|
592
|
-
|
|
593
|
-
// headers, which makes browsers try to decode an already-decoded payload.
|
|
591
|
+
|
|
594
592
|
headers.delete("content-encoding");
|
|
595
593
|
headers.delete("content-length");
|
|
596
594
|
this.#rewriteInternalLocation(headers);
|
|
@@ -608,7 +606,6 @@ export class AkanApp {
|
|
|
608
606
|
const parsed = new URL(location);
|
|
609
607
|
if (parsed.hostname === "akan-child") headers.set("location", `${parsed.pathname}${parsed.search}${parsed.hash}`);
|
|
610
608
|
} catch {
|
|
611
|
-
// Relative redirects are already safe to pass through.
|
|
612
609
|
}
|
|
613
610
|
}
|
|
614
611
|
|
package/server/akanLib.ts
CHANGED
package/server/akanServer.ts
CHANGED
|
@@ -41,8 +41,7 @@ interface AkanAppPrepared {
|
|
|
41
41
|
|
|
42
42
|
export class AkanServer {
|
|
43
43
|
status: "stopped" | "initializing" | "initialized" | "starting" | "running" | "stopping" = "stopped";
|
|
44
|
-
|
|
45
|
-
// `server.upgrade(...)` type-checks for both.
|
|
44
|
+
|
|
46
45
|
#server: Bun.Server<{ createdAt: number } | HmrWsData> | null = null;
|
|
47
46
|
#wsServer: Bun.Server<{ createdAt: number } | HmrWsData> | null = null;
|
|
48
47
|
#prepared: AkanAppPrepared | null = null;
|
|
@@ -174,10 +173,10 @@ export class AkanServer {
|
|
|
174
173
|
hmrState: webRouter ? { state: webRouter.renderState } : null,
|
|
175
174
|
logger: this.logger,
|
|
176
175
|
}),
|
|
177
|
-
|
|
176
|
+
|
|
178
177
|
data: {},
|
|
179
178
|
} as Bun.WebSocketHandler<{ createdAt: number } | HmrWsData>;
|
|
180
|
-
|
|
179
|
+
|
|
181
180
|
this.#server = Bun.serve({
|
|
182
181
|
idleTimeout: 0,
|
|
183
182
|
...(unix ? { unix } : { port }),
|
|
@@ -51,7 +51,7 @@ export class BuilderRpc {
|
|
|
51
51
|
throw new Error("[builder] process.send unavailable — backend must be spawned by the CLI with ipc enabled");
|
|
52
52
|
this.#send = this.#proc.send.bind(this.#proc);
|
|
53
53
|
this.#offMessage = this.#listen((msg) => {
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
if (msg.type === "build-route-res") {
|
|
56
56
|
const res = msg as BuilderRes;
|
|
57
57
|
const waiter = this.#pending.get(res.id);
|
|
@@ -61,7 +61,7 @@ export class BuilderRpc {
|
|
|
61
61
|
else waiter.reject(new Error(`[builder] ${res.type} failed: ${res.error}`));
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
const ev = msg as BuilderEvent;
|
|
66
66
|
switch (ev.type) {
|
|
67
67
|
case "builder-ready":
|
|
@@ -16,8 +16,6 @@ export interface CssPayload {
|
|
|
16
16
|
changedFiles?: string[];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
// --- backend → builder (request/response) -------------------------------
|
|
20
|
-
|
|
21
19
|
export type BuilderReq = {
|
|
22
20
|
type: "build-route";
|
|
23
21
|
id: number;
|
|
@@ -31,8 +29,6 @@ export type BuilderRes =
|
|
|
31
29
|
| { type: "build-route-res"; id: number; ok: true; data: BuildRouteResultPayload }
|
|
32
30
|
| { type: "build-route-res"; id: number; ok: false; error: string };
|
|
33
31
|
|
|
34
|
-
// --- builder → backend (unsolicited events) -----------------------------
|
|
35
|
-
|
|
36
32
|
export interface PagesBundlePayload {
|
|
37
33
|
bundlePath: string;
|
|
38
34
|
buildId: number;
|
package/server/decorators.ts
CHANGED
package/server/di/diLifecycle.ts
CHANGED
|
@@ -94,12 +94,12 @@ export class DiLifecycle {
|
|
|
94
94
|
});
|
|
95
95
|
this.webProxies.push(...lib.option.getWebProxies());
|
|
96
96
|
lib.database.forEach((mod) => {
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
if (!mod.service.srv.enabled) return;
|
|
99
99
|
this.#database.set(mod.constant.refName, mod);
|
|
100
100
|
});
|
|
101
101
|
lib.service.forEach((mod) => {
|
|
102
|
-
|
|
102
|
+
|
|
103
103
|
if (!mod.service.srv.enabled) return;
|
|
104
104
|
this.#service.set(mod.service.srv.refName, mod);
|
|
105
105
|
});
|
|
@@ -144,7 +144,7 @@ export class DiLifecycle {
|
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
async destroyAll() {
|
|
147
|
-
|
|
147
|
+
|
|
148
148
|
const internalNow = Date.now();
|
|
149
149
|
this.logger.verbose("Running destroy internals...");
|
|
150
150
|
try {
|
|
@@ -154,19 +154,16 @@ export class DiLifecycle {
|
|
|
154
154
|
}
|
|
155
155
|
this.logger.verbose(`Destroy internals in ${Date.now() - internalNow}ms`);
|
|
156
156
|
|
|
157
|
-
// 2. Destroy services (reverse order)
|
|
158
157
|
const serviceNow = Date.now();
|
|
159
158
|
this.logger.verbose("Destroying services...");
|
|
160
159
|
await this.destroyServices();
|
|
161
160
|
this.logger.verbose(`Destroy services in ${Date.now() - serviceNow}ms`);
|
|
162
161
|
|
|
163
|
-
// 3. Destroy adaptors (reverse order)
|
|
164
162
|
const adaptorNow = Date.now();
|
|
165
163
|
this.logger.verbose("Destroying adaptors...");
|
|
166
164
|
await this.destroyAdaptors();
|
|
167
165
|
this.logger.verbose(`Destroy adaptors in ${Date.now() - adaptorNow}ms`);
|
|
168
166
|
|
|
169
|
-
// 4. Destroy external uses (SDK clients, API wrappers, etc.)
|
|
170
167
|
const usesNow = Date.now();
|
|
171
168
|
this.logger.verbose("Destroying uses...");
|
|
172
169
|
await this.destroyUses();
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// script runs. Keep it small and free of dependencies — we cannot rely on any
|
|
4
|
-
// framework code being available when this executes.
|
|
5
|
-
//
|
|
6
|
-
// Protocol (see wsHub.ts `HmrMessage` for the TypeScript shape):
|
|
7
|
-
// { type: "hello", buildId, cssAssets } → initial handshake on connect
|
|
8
|
-
// { type: "reload", buildId } → full page refresh
|
|
9
|
-
// { type: "rsc-refresh", buildId } → full page refresh
|
|
10
|
-
// { type: "client-refresh", buildId } → full page refresh
|
|
11
|
-
// { type: "css-update", cssAssets } → atomic current-subroute <link> swap, no reload
|
|
12
|
-
// { type: "error", message } → forwarded build error, console only
|
|
13
|
-
//
|
|
14
|
-
// The server-rendered HTML tags the "active" stylesheet with
|
|
15
|
-
// data-akan-css="active" (see rscWorker.tsx) so swapCss can remove the stale
|
|
16
|
-
// one after the new stylesheet has finished loading without a flash of
|
|
17
|
-
// unstyled content.
|
|
1
|
+
|
|
2
|
+
|
|
18
3
|
export const HMR_CLIENT_SCRIPT = `(function(){
|
|
19
4
|
if (self.__AKAN_HMR_INSTALLED__) return;
|
|
20
5
|
self.__AKAN_HMR_INSTALLED__ = true;
|
|
@@ -34,8 +19,6 @@ export const HMR_CLIENT_SCRIPT = `(function(){
|
|
|
34
19
|
var overlayJobs = {};
|
|
35
20
|
self.__AKAN_HMR_PHASE__ = null;
|
|
36
21
|
|
|
37
|
-
// Bun's React Fast Refresh transform can emit top-level calls to these globals
|
|
38
|
-
// even when we fall back to full reload instead of applying React Refresh.
|
|
39
22
|
self.$RefreshReg$ = self.$RefreshReg$ || function(){};
|
|
40
23
|
self.$RefreshSig$ = self.$RefreshSig$ || function(){ return function(type){ return type; }; };
|
|
41
24
|
|
|
@@ -90,7 +73,6 @@ export const HMR_CLIENT_SCRIPT = `(function(){
|
|
|
90
73
|
setTimeout(connect, delay);
|
|
91
74
|
}
|
|
92
75
|
|
|
93
|
-
// goseoghyeon: CSR route registry keeps stale module refs, so JS/RSC HMR uses full reload for now.
|
|
94
76
|
function reloadForHmr(msg){
|
|
95
77
|
try { self.__AKAN_RSC_CLEAR_CACHE__ && self.__AKAN_RSC_CLEAR_CACHE__(); } catch(e){}
|
|
96
78
|
if (msg && msg.buildId != null) lastBuildId = msg.buildId;
|
|
@@ -363,9 +363,6 @@ export class DevHmrController {
|
|
|
363
363
|
];
|
|
364
364
|
if (files.some((file) => runtimeRoots.some((needle) => path.resolve(file).includes(needle)))) return true;
|
|
365
365
|
|
|
366
|
-
// A route source file that is not in the current seed index is likely a
|
|
367
|
-
// newly added route/layout. The backend's route seed index is static for
|
|
368
|
-
// this process, so a full reload is the safer recovery path.
|
|
369
366
|
return (
|
|
370
367
|
routeIds === undefined &&
|
|
371
368
|
files.some((file) => path.resolve(file).includes(`${path.sep}page${path.sep}`) && /\.(tsx|ts|jsx|js)$/.test(file))
|
|
@@ -382,7 +379,6 @@ export class DevHmrController {
|
|
|
382
379
|
try {
|
|
383
380
|
return new URL(`${protoFallback}://${hostFallback}`).origin;
|
|
384
381
|
} catch {
|
|
385
|
-
/* fallthrough */
|
|
386
382
|
}
|
|
387
383
|
}
|
|
388
384
|
return parsed.origin;
|
|
@@ -34,7 +34,7 @@ class EventLoopLagMonitor {
|
|
|
34
34
|
if (this.#samples.length < EventLoopLagMonitor.#maxSamples) this.#samples.push(lag);
|
|
35
35
|
else this.#samples[Math.floor(Math.random() * EventLoopLagMonitor.#maxSamples)] = lag;
|
|
36
36
|
}, intervalMs);
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
(this.#timer as { unref?: () => void }).unref?.();
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -171,7 +171,7 @@ export class DatabaseResolver {
|
|
|
171
171
|
select(select?: any) {
|
|
172
172
|
return createFindManyChain(query, { ...options, select });
|
|
173
173
|
},
|
|
174
|
-
|
|
174
|
+
|
|
175
175
|
then(resolve: (value: any[]) => void, reject: (reason: unknown) => void) {
|
|
176
176
|
return store.find(query, options).then(resolve, reject);
|
|
177
177
|
},
|
|
@@ -192,7 +192,7 @@ export class DatabaseResolver {
|
|
|
192
192
|
select(select?: any) {
|
|
193
193
|
return createFindOneChain(query, { ...options, select });
|
|
194
194
|
},
|
|
195
|
-
|
|
195
|
+
|
|
196
196
|
then(resolve: (value: any | null) => void, reject: (reason: unknown) => void) {
|
|
197
197
|
return store.findOne(query, options).then(resolve, reject);
|
|
198
198
|
},
|
|
@@ -165,7 +165,6 @@ export class SignalResolver {
|
|
|
165
165
|
const capitalizedKey = capitalize(key);
|
|
166
166
|
const argLength = sliceInfo.args.length;
|
|
167
167
|
|
|
168
|
-
// List endpoint: ${refName}List${Capitalize<key>}
|
|
169
168
|
const listKey = `${refName}List${capitalizedKey}`;
|
|
170
169
|
endpointObj[listKey] = (builder as any)
|
|
171
170
|
.query([sliceInfo.light], sliceInfo.signalOption)
|
|
@@ -189,7 +188,6 @@ export class SignalResolver {
|
|
|
189
188
|
})) as any;
|
|
190
189
|
});
|
|
191
190
|
|
|
192
|
-
// Insight endpoint: ${refName}Insight${Capitalize<key>}
|
|
193
191
|
const insightKey = `${refName}Insight${capitalizedKey}`;
|
|
194
192
|
endpointObj[insightKey] = (builder as any)
|
|
195
193
|
.query(sliceInfo.insight, sliceInfo.signalOption)
|
|
@@ -203,7 +201,6 @@ export class SignalResolver {
|
|
|
203
201
|
});
|
|
204
202
|
});
|
|
205
203
|
|
|
206
|
-
// model endpoint: ${refName}
|
|
207
204
|
endpointObj[refName] = (builder as any)
|
|
208
205
|
.query(cnst.full, { guards: sliceCls.getGuards })
|
|
209
206
|
.param(`${refName}Id`, ID)
|
|
@@ -211,7 +208,6 @@ export class SignalResolver {
|
|
|
211
208
|
return await this[serviceName][`get${capitalizedRefName}`](id);
|
|
212
209
|
});
|
|
213
210
|
|
|
214
|
-
// lightModel endpoint: light${Capitalize<refName>}
|
|
215
211
|
endpointObj[`light${capitalizedRefName}`] = (builder as any)
|
|
216
212
|
.query(cnst.light, { guards: sliceCls.getGuards })
|
|
217
213
|
.param(`${refName}Id`, ID)
|
|
@@ -219,7 +215,6 @@ export class SignalResolver {
|
|
|
219
215
|
return await this[serviceName][`get${capitalizedRefName}`](id);
|
|
220
216
|
});
|
|
221
217
|
|
|
222
|
-
// createModel endpoint: create${Capitalize<refName>}
|
|
223
218
|
endpointObj[`create${capitalizedRefName}`] = (builder as any)
|
|
224
219
|
.mutation(cnst.full, { guards: sliceCls.cruGuards })
|
|
225
220
|
.body("data", cnst.input)
|
|
@@ -227,7 +222,6 @@ export class SignalResolver {
|
|
|
227
222
|
return await this[serviceName].__create(data);
|
|
228
223
|
});
|
|
229
224
|
|
|
230
|
-
// updateModel endpoint: update${Capitalize<refName>}${Capitalize<key>}
|
|
231
225
|
endpointObj[`update${capitalizedRefName}`] = (builder as any)
|
|
232
226
|
.mutation(cnst.full, { guards: sliceCls.cruGuards })
|
|
233
227
|
.param(`${refName}Id`, ID)
|
|
@@ -236,7 +230,6 @@ export class SignalResolver {
|
|
|
236
230
|
return await this[serviceName].__update(id, data);
|
|
237
231
|
});
|
|
238
232
|
|
|
239
|
-
// removeModel endpoint: remove${Capitalize<refName>}${Capitalize<key>}
|
|
240
233
|
endpointObj[`remove${capitalizedRefName}`] = (builder as any)
|
|
241
234
|
.mutation(cnst.full, { guards: sliceCls.cruGuards })
|
|
242
235
|
.param(`${refName}Id`, ID)
|
|
@@ -321,7 +314,7 @@ export class SignalResolver {
|
|
|
321
314
|
const roomCtxMap = SignalResolver.#liveWsPubsubRoomCtx.get(ws) ?? new Map();
|
|
322
315
|
roomCtxMap.set(roomId, context);
|
|
323
316
|
SignalResolver.#liveWsPubsubRoomCtx.set(ws, roomCtxMap);
|
|
324
|
-
|
|
317
|
+
|
|
325
318
|
websocket.joinRoom(ws, roomId);
|
|
326
319
|
SignalResolver.logger.verbose(`WebSocket subscribed to room ${roomId}`);
|
|
327
320
|
} else {
|
|
@@ -335,7 +328,7 @@ export class SignalResolver {
|
|
|
335
328
|
}
|
|
336
329
|
roomCtxMap.delete(roomId);
|
|
337
330
|
if (roomCtxMap.size === 0) SignalResolver.#liveWsPubsubRoomCtx.delete(ws);
|
|
338
|
-
|
|
331
|
+
|
|
339
332
|
websocket.leaveRoom(ws, roomId);
|
|
340
333
|
SignalResolver.logger.verbose(`WebSocket unsubscribed from room ${roomId}`);
|
|
341
334
|
}
|
|
@@ -413,7 +406,6 @@ export class SignalResolver {
|
|
|
413
406
|
}
|
|
414
407
|
SignalResolver.#liveWsPubsubRoomCtx.delete(ws);
|
|
415
408
|
|
|
416
|
-
// Clean up socket from Redis
|
|
417
409
|
await SignalResolver.#getWebsocket(registry).unregisterSocket(ws);
|
|
418
410
|
SignalResolver.logger.verbose(`WebSocket disconnected from all rooms`);
|
|
419
411
|
}
|
|
@@ -109,9 +109,7 @@ export class ApiRouter {
|
|
|
109
109
|
}: WebsocketHandlersInputs): Bun.WebSocketHandler<WsTaggedData> {
|
|
110
110
|
return {
|
|
111
111
|
open: (ws) => {
|
|
112
|
-
|
|
113
|
-
// websockets. We tag them via `data.kind === "akan-hmr"` at upgrade
|
|
114
|
-
// time so the dispatcher can skip signal handling.
|
|
112
|
+
|
|
115
113
|
const data = ws.data as WsTaggedData | undefined;
|
|
116
114
|
if (data?.kind === "akan-hmr" && hmrHub && hmrState) {
|
|
117
115
|
hmrHub.attach(ws as unknown as Bun.ServerWebSocket<HmrWsData>);
|
|
@@ -128,7 +126,7 @@ export class ApiRouter {
|
|
|
128
126
|
},
|
|
129
127
|
message: async (ws, message) => {
|
|
130
128
|
const data = ws.data as WsTaggedData | undefined;
|
|
131
|
-
if (data?.kind === "akan-hmr") return;
|
|
129
|
+
if (data?.kind === "akan-hmr") return;
|
|
132
130
|
try {
|
|
133
131
|
if (typeof message === "string") {
|
|
134
132
|
const msg = JSON.parse(message) as WebsocketReqData;
|
package/server/rscClient.tsx
CHANGED
|
@@ -67,13 +67,7 @@ async function fetchRsc(href: string, options: { buildId?: number } = {}): Promi
|
|
|
67
67
|
return { type: "redirected" };
|
|
68
68
|
}
|
|
69
69
|
if (!res.ok || !res.body) throw new Error(`[rscClient] RSC fetch failed ${res.status} ${res.statusText}`);
|
|
70
|
-
|
|
71
|
-
// `use(thenable)` lives at the document root with no Suspense boundary above it
|
|
72
|
-
// (see Root / ssrFromRscRenderer), so any mid-render suspension during a client
|
|
73
|
-
// navigation transition has no fallback and can leave the transition stuck —
|
|
74
|
-
// committing only when a later navigation flushes the pending lane. Materializing
|
|
75
|
-
// the payload up front means all RSC rows are present and every referenced client
|
|
76
|
-
// module `import()` starts immediately, so the committed render does not suspend.
|
|
70
|
+
|
|
77
71
|
const buffer = await res.arrayBuffer();
|
|
78
72
|
const completeStream = new ReadableStream<Uint8Array>({
|
|
79
73
|
start(controller) {
|