akanjs 2.2.4 → 2.2.5
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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# akanjs
|
|
2
2
|
|
|
3
|
+
## 2.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d636456: add rich Map methods on memory() helper service
|
|
8
|
+
- a1ee4e8: fill nested constant defaults for arrays on document save and load, normalize date fields to a consistent epoch representation on store (accepting legacy ISO-string values on read), and correct falsy defaults in getDefault
|
|
9
|
+
- 5cdb05e: reverse dependency of file upload api
|
|
10
|
+
- a7da50e: remove dependency from radix dialog
|
|
11
|
+
|
|
3
12
|
## 2.2.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/base/base.ts
CHANGED
|
@@ -76,7 +76,7 @@ export const enumOf = <RefName extends string, T = string | number>(
|
|
|
76
76
|
|
|
77
77
|
/** Id-keyed list helper used for light model collections and immutable-style list updates. */
|
|
78
78
|
export class DataList<Light extends { id: string }> {
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
#idMap: Map<string, number>;
|
|
81
81
|
length: number;
|
|
82
82
|
values: Light[];
|
|
@@ -71,9 +71,9 @@ export class PrimitiveScalar {
|
|
|
71
71
|
{ optional = false }: { optional?: boolean } = {},
|
|
72
72
|
): PrimitiveValue {
|
|
73
73
|
if (optional && (input === null || input === undefined)) return undefined;
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
const value = this.parseValue(input);
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
this._checkValue(value, { optional });
|
|
78
78
|
return value;
|
|
79
79
|
}
|
|
@@ -82,10 +82,10 @@ export class PrimitiveScalar {
|
|
|
82
82
|
value: PrimitiveValue,
|
|
83
83
|
{ optional = false }: { optional?: boolean } = {},
|
|
84
84
|
): PrimitiveValue {
|
|
85
|
-
|
|
85
|
+
|
|
86
86
|
this._checkValue(value, { optional });
|
|
87
87
|
if (value === null || value === undefined) return undefined;
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
return this.serializeValue(value);
|
|
90
90
|
}
|
|
91
91
|
static _checkValue(
|
|
@@ -95,10 +95,9 @@ export class PrimitiveScalar {
|
|
|
95
95
|
): void {
|
|
96
96
|
if (value === null || value === undefined) {
|
|
97
97
|
if (optional) return;
|
|
98
|
-
// biome-ignore lint/complexity/noThisInStatic: subclasses expose their own refName.
|
|
99
98
|
else throw new Error(`Required ${this.refName} value: ${value}`);
|
|
100
99
|
}
|
|
101
|
-
|
|
100
|
+
|
|
102
101
|
if (!this.validate(value)) throw new Error(`Invalid ${this.refName} value: ${value}`);
|
|
103
102
|
}
|
|
104
103
|
}
|
|
@@ -163,7 +162,7 @@ export class ID extends PrimitiveScalar {
|
|
|
163
162
|
}
|
|
164
163
|
static override _checkValue(value: PrimitiveValue, options: { optional?: boolean } = {}): void {
|
|
165
164
|
if (value === ID[PRIMITIVE_DEFAULT_VALUE]) return;
|
|
166
|
-
|
|
165
|
+
|
|
167
166
|
super._checkValue(value, options);
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -286,7 +285,6 @@ const scalarPrimitiveStatics = {
|
|
|
286
285
|
},
|
|
287
286
|
};
|
|
288
287
|
|
|
289
|
-
// String
|
|
290
288
|
Object.assign(String, scalarPrimitiveStatics, {
|
|
291
289
|
refName: "String",
|
|
292
290
|
[PRIMITIVE_DEFAULT_VALUE]: "",
|
|
@@ -303,7 +301,6 @@ Object.assign(String, scalarPrimitiveStatics, {
|
|
|
303
301
|
});
|
|
304
302
|
PrimitiveRegistry.register(String);
|
|
305
303
|
|
|
306
|
-
// Boolean
|
|
307
304
|
Object.assign(Boolean, {
|
|
308
305
|
...scalarPrimitiveStatics,
|
|
309
306
|
refName: "Boolean",
|
|
@@ -321,7 +318,6 @@ Object.assign(Boolean, {
|
|
|
321
318
|
});
|
|
322
319
|
PrimitiveRegistry.register(Boolean);
|
|
323
320
|
|
|
324
|
-
// Date
|
|
325
321
|
Object.assign(Date, {
|
|
326
322
|
...scalarPrimitiveStatics,
|
|
327
323
|
refName: "Date",
|
package/base/types.ts
CHANGED
|
@@ -41,9 +41,6 @@ type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) exten
|
|
|
41
41
|
export type MergedValues<T> = UnionToIntersection<MergeObjectValues<T>>;
|
|
42
42
|
export type Assign<A, B> = Omit<A, keyof B> & B;
|
|
43
43
|
|
|
44
|
-
// NOTE: All `MergeAll*` utilities below use accumulator-style tail recursion so that
|
|
45
|
-
// TS does not allocate a new intersection node at every frame of the recursion. This
|
|
46
|
-
// keeps type-checking roughly linear (vs. quadratic for the naive `T & Recurse<Rest>`).
|
|
47
44
|
export type ObjectAssign<Objects extends object[], Acc = unknown> = Objects extends [
|
|
48
45
|
infer First extends object,
|
|
49
46
|
...infer Rest extends object[],
|
|
@@ -107,7 +104,7 @@ export type MergeAllDoubleKeyOfObjects<
|
|
|
107
104
|
: MergeAllDoubleKeyOfObjects<Rest, Key, SubKey, Acc>
|
|
108
105
|
: Acc;
|
|
109
106
|
|
|
110
|
-
export type Primitive = string | number | boolean | null | undefined;
|
|
107
|
+
export type Primitive = string | number | boolean | null | undefined;
|
|
111
108
|
|
|
112
109
|
export type NestedKeysWithAllowed<T, Allowed = Primitive> = T extends Primitive
|
|
113
110
|
? never
|
package/capacitor.base.config.ts
CHANGED
|
@@ -14,7 +14,7 @@ const getLocalIP = () => {
|
|
|
14
14
|
if (alias.family === "IPv4" && !alias.internal) return alias.address;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
return "127.0.0.1";
|
|
17
|
+
return "127.0.0.1";
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const normalizeBasePath = (basePath: string | undefined) => basePath?.replace(/^\/+|\/+$/g, "");
|
package/client/capacitor.ts
CHANGED
package/client/cookie.ts
CHANGED
|
@@ -49,7 +49,7 @@ export const setCookie = (
|
|
|
49
49
|
const path = options.path ? `; path=${options.path}` : "";
|
|
50
50
|
const sameSite = options.sameSite ? `; SameSite=${options.sameSite}` : "";
|
|
51
51
|
const secure = options.secure ? "; Secure" : "";
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
document.cookie = `${encoded}${path}${sameSite}${secure}`;
|
|
54
54
|
if (env.renderMode !== "csr") return;
|
|
55
55
|
void loadCapacitorCore()
|
|
@@ -59,7 +59,6 @@ export const setCookie = (
|
|
|
59
59
|
|
|
60
60
|
export const getCookie = (key: string): string | undefined => {
|
|
61
61
|
if (getEnv().side === "server") return cookies().get(key)?.value;
|
|
62
|
-
//capacitor 문서에서 document.cookie로 가져오라고 되어었음.
|
|
63
62
|
else
|
|
64
63
|
return document.cookie
|
|
65
64
|
.split(";")
|
|
@@ -70,9 +69,8 @@ export const getCookie = (key: string): string | undefined => {
|
|
|
70
69
|
export const removeCookie = (key: string, options: { path: string } = { path: "/" }) => {
|
|
71
70
|
if (getEnv().side === "server") return cookies().delete(key);
|
|
72
71
|
else {
|
|
73
|
-
|
|
72
|
+
|
|
74
73
|
document.cookie = `${key}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;
|
|
75
|
-
// void CapacitorCookies.deleteCookie({ key });
|
|
76
74
|
}
|
|
77
75
|
};
|
|
78
76
|
export const headers = (): Map<string, string> => {
|
package/client/createFont.ts
CHANGED
package/client/csrTypes.ts
CHANGED
|
@@ -133,16 +133,10 @@ export interface Route {
|
|
|
133
133
|
renderLayout?: RouteRender;
|
|
134
134
|
pageIncludesOwnLayout?: boolean;
|
|
135
135
|
isSpecialRoute?: boolean;
|
|
136
|
-
|
|
137
|
-
// | (({ params, searchParams }: PageProps) => ReactNode)
|
|
138
|
-
// | (({ params, searchParams }: PageProps) => Promise<ReactNode>);
|
|
139
|
-
// Layout?:
|
|
140
|
-
// | (({ children, params, searchParams }: LayoutProps) => ReactNode)
|
|
141
|
-
// | (({ children, params, searchParams }: LayoutProps) => Promise<ReactNode>);
|
|
136
|
+
|
|
142
137
|
loader?: () => any;
|
|
143
138
|
pageState?: PageState;
|
|
144
|
-
|
|
145
|
-
// ErrorBoundary?: any;
|
|
139
|
+
|
|
146
140
|
children: Map<string, Route>;
|
|
147
141
|
}
|
|
148
142
|
|
package/client/makePageProto.tsx
CHANGED
|
@@ -26,17 +26,13 @@ const getPageInfo = (): { locale: string; path: string } => {
|
|
|
26
26
|
if (getEnv().side !== "server") {
|
|
27
27
|
const [, firstSegment = "", ...rest] = window.location.pathname.split("/");
|
|
28
28
|
const hasLocalePrefix = localeSet.has(firstSegment);
|
|
29
|
-
|
|
30
|
-
// SSR render even when the URL's leading segment is not the locale (base-path / cloud routing).
|
|
31
|
-
// Fall back to the URL segment for CSR or any pre-seed render.
|
|
29
|
+
|
|
32
30
|
const activeLocale = Translator.getActiveLocale();
|
|
33
31
|
const locale = activeLocale ?? (hasLocalePrefix ? firstSegment : defaultLocale);
|
|
34
32
|
return { locale, path: hasLocalePrefix ? `/${rest.join("/")}` : window.location.pathname };
|
|
35
33
|
}
|
|
36
34
|
const h = headers();
|
|
37
|
-
|
|
38
|
-
// locale+path from the request URL itself so unadorned dev requests (e.g.
|
|
39
|
-
// `curl /en/hello`) still work.
|
|
35
|
+
|
|
40
36
|
const localeHeader = h.get("x-locale");
|
|
41
37
|
const pathHeader = h.get("x-path");
|
|
42
38
|
if (localeHeader && pathHeader) return { locale: localeHeader, path: pathHeader };
|
|
@@ -162,13 +158,11 @@ export const makePageProto = <
|
|
|
162
158
|
l.rich = (key: DictKey, param?: { [key: string]: string | number }) =>
|
|
163
159
|
(
|
|
164
160
|
<span
|
|
165
|
-
|
|
161
|
+
|
|
166
162
|
dangerouslySetInnerHTML={{
|
|
167
163
|
__html: translator.translate(lang, key, {
|
|
168
164
|
...param,
|
|
169
|
-
|
|
170
|
-
// "bg-primary": (chunks: string) => `<span className="bg-primary text-base-100">${chunks}</span>`,
|
|
171
|
-
// primary: (chunks: string) => `<span className="bg-base-100 text-primary">${chunks}</span>`,
|
|
165
|
+
|
|
172
166
|
br: `<br />`,
|
|
173
167
|
}),
|
|
174
168
|
}}
|
package/client/router.ts
CHANGED
|
@@ -110,14 +110,10 @@ class Router {
|
|
|
110
110
|
push: (href: string) => {
|
|
111
111
|
const { href: fullHref } = this.#getPathInfo(href);
|
|
112
112
|
Logger.log(`push to:${fullHref}`);
|
|
113
|
-
// ! need to revive
|
|
114
|
-
// if (getEnv().side === "server") void redirect(fullHref);
|
|
115
113
|
},
|
|
116
114
|
replace: (href: string) => {
|
|
117
115
|
const { pathname } = this.#getPathInfo(href);
|
|
118
116
|
Logger.log(`replace to:${pathname}`);
|
|
119
|
-
// ! need to revive
|
|
120
|
-
// if (getEnv().side === "server") void redirect(fullHref);
|
|
121
117
|
},
|
|
122
118
|
back: () => {
|
|
123
119
|
throw new Error("back is only available in client");
|
|
@@ -127,7 +123,7 @@ class Router {
|
|
|
127
123
|
},
|
|
128
124
|
};
|
|
129
125
|
init(options: SsrClientRouterOption | SsrServerRouterOption | CSRClientRouterOption) {
|
|
130
|
-
|
|
126
|
+
|
|
131
127
|
this.#prefix = options.prefix ?? "";
|
|
132
128
|
this.#lang = options.lang ?? parseAkanI18nEnv().defaultLocale;
|
|
133
129
|
if (options.type === "csr") this.#initCsrClientRouter(options);
|
|
@@ -137,7 +133,6 @@ class Router {
|
|
|
137
133
|
Logger.verbose("Router initialized");
|
|
138
134
|
}
|
|
139
135
|
#initSsrServerRouter(options: SsrServerRouterOption) {
|
|
140
|
-
// already initialized in next server
|
|
141
136
|
}
|
|
142
137
|
#initSsrClientRouter(options: SsrClientRouterOption) {
|
|
143
138
|
this.#instance = {
|
|
@@ -179,7 +174,7 @@ class Router {
|
|
|
179
174
|
replace: (href: string, routeOptions) => {
|
|
180
175
|
const { path, pathname, hash, href: fullHref } = this.#getPathInfo(href);
|
|
181
176
|
this.#postPathChange({ path, pathname, hash });
|
|
182
|
-
|
|
177
|
+
|
|
183
178
|
setTimeout(() => {
|
|
184
179
|
options.router.replace(this.#withCsrRuntimeSearchParams(fullHref), routeOptions);
|
|
185
180
|
}, 0);
|
|
@@ -240,7 +235,7 @@ class Router {
|
|
|
240
235
|
}
|
|
241
236
|
back(routeOptions?: RouteOptions) {
|
|
242
237
|
if (getEnv().side === "server") throw new Error("back is only available in client side");
|
|
243
|
-
|
|
238
|
+
|
|
244
239
|
this.#checkInitialized();
|
|
245
240
|
this.#instance.back(routeOptions);
|
|
246
241
|
return undefined as never;
|
package/client/translator.ts
CHANGED
|
@@ -11,15 +11,9 @@ export interface AllDictionary {
|
|
|
11
11
|
|
|
12
12
|
export class Translator {
|
|
13
13
|
static #langDictionaryMap = new Map<string, Dictionary>();
|
|
14
|
-
|
|
15
|
-
// snapshot (`allDictionary[lang]`) is a stable module-level reference within a
|
|
16
|
-
// build, so repeat requests skip the merge entirely. A dev rebuild produces a
|
|
17
|
-
// new object reference, which re-seeds and keeps hot reload correct.
|
|
14
|
+
|
|
18
15
|
static #seededDicts = new WeakSet<object>();
|
|
19
|
-
|
|
20
|
-
// `lang` (Flight prop) so client lookups use the same locale that was seeded and server-rendered,
|
|
21
|
-
// instead of re-deriving it from the URL (unreliable for base-path / cloud routing). Unsafe on the
|
|
22
|
-
// server (concurrent requests share the module), so it must only be set when `typeof window !== undefined`.
|
|
16
|
+
|
|
23
17
|
static #activeLocale: string | undefined;
|
|
24
18
|
static setActiveLocale(lang: string | undefined) {
|
|
25
19
|
if (lang) Translator.#activeLocale = lang;
|
|
@@ -35,12 +29,10 @@ export class Translator {
|
|
|
35
29
|
hasDictionary(lang: string) {
|
|
36
30
|
return Translator.#langDictionaryMap.has(lang);
|
|
37
31
|
}
|
|
38
|
-
|
|
39
|
-
// Idempotent: re-seeding the same locale merges keys without dropping existing ones.
|
|
40
|
-
// Used by ClientWrapper to seed the active locale from the server-provided prop.
|
|
32
|
+
|
|
41
33
|
static seed(lang: string, dict: Dictionary | undefined) {
|
|
42
34
|
if (!dict) return;
|
|
43
|
-
|
|
35
|
+
|
|
44
36
|
if (Translator.#seededDicts.has(dict)) return;
|
|
45
37
|
Translator.#seededDicts.add(dict);
|
|
46
38
|
const existingDictionary = Translator.#langDictionaryMap.get(lang) ?? {};
|
package/common/Logger.ts
CHANGED
|
@@ -92,7 +92,7 @@ export class Logger {
|
|
|
92
92
|
rawLog(msg: string, method?: "console" | "process") {
|
|
93
93
|
Logger.rawLog(msg, method);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
static trace(msg: string, context = "", name = "App") {
|
|
97
97
|
if (Logger.#shouldLog("trace")) Logger.#printMessages(name, msg, context, "trace");
|
|
98
98
|
}
|
|
@@ -134,7 +134,6 @@ export class Logger {
|
|
|
134
134
|
try {
|
|
135
135
|
void Promise.resolve(sink(entry)).catch(() => undefined);
|
|
136
136
|
} catch {
|
|
137
|
-
// Log sinks are observers; they must not break application logging.
|
|
138
137
|
}
|
|
139
138
|
}
|
|
140
139
|
}
|
|
@@ -163,7 +162,6 @@ export class Logger {
|
|
|
163
162
|
if (!Logger.#shouldWriteConsole(logLevel)) return;
|
|
164
163
|
if (typeof window === "undefined")
|
|
165
164
|
(process[writeStreamType] as unknown as NodeJS.WriteStream | undefined)?.write(message);
|
|
166
|
-
// biome-ignore lint/suspicious/noConsole: browser fallback
|
|
167
165
|
else console.log(message);
|
|
168
166
|
}
|
|
169
167
|
static rawLog(msg = "", method?: "console" | "process", outputStream?: "log" | "error") {
|
|
@@ -174,7 +172,6 @@ export class Logger {
|
|
|
174
172
|
Logger.#emit({ stream, message: msg, plainMessage: Logger.#stripAnsi(msg) });
|
|
175
173
|
if (typeof window === "undefined" && method !== "console" && (process as unknown as NodeJS.Process | undefined))
|
|
176
174
|
process[stream].write(msg);
|
|
177
|
-
// biome-ignore lint/suspicious/noConsole: browser fallback
|
|
178
175
|
else console[outputStream === "error" ? "error" : "log"](msg.trim());
|
|
179
176
|
}
|
|
180
177
|
}
|
package/common/formatNumber.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
export const formatNumber = (numString: string) => {
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
if (typeof numString !== "string") {
|
|
4
4
|
numString = String(numString);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
// 소수점이 있는 경우 처리
|
|
8
7
|
const parts = numString.split(".");
|
|
9
|
-
const integerPart = parts[0]?.replace(/[^\d]/g, "") ?? "";
|
|
8
|
+
const integerPart = parts[0]?.replace(/[^\d]/g, "") ?? "";
|
|
10
9
|
const decimalPart = parts.length > 1 ? `.${parts[1]}` : "";
|
|
11
10
|
|
|
12
|
-
// 정수 부분에 콤마 추가
|
|
13
11
|
const formattedInteger = Number(integerPart).toLocaleString("ko-KR");
|
|
14
12
|
|
|
15
|
-
// 정수 부분과 소수 부분 합치기
|
|
16
13
|
return formattedInteger + decimalPart;
|
|
17
14
|
};
|
package/common/hmrPhase.ts
CHANGED
package/common/isValidDate.ts
CHANGED
|
@@ -9,9 +9,6 @@ export const isValidDate = (d: string | Date | Dayjs) => {
|
|
|
9
9
|
const format = "YYYY-MM-DD";
|
|
10
10
|
if (typeof d === "string") {
|
|
11
11
|
return dayjs(d, format).isValid();
|
|
12
|
-
// ! Aggregation에서는 위 코드처럼 해야함. 다른곳에서 필요하면 아래 코드 사용해야 할 이유를 찾아보기
|
|
13
|
-
// return dayjs(d, format, true).isValid();
|
|
14
|
-
// } else if (isDayjs(d)) return dayjs(d.format(format), format, true).isSame(d);
|
|
15
12
|
} else if (isDayjs(d)) return d.isValid();
|
|
16
13
|
else return d instanceof Date && !isNaN(d.getTime());
|
|
17
14
|
};
|
package/constant/fieldInfo.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface ConstantFieldProps<
|
|
|
78
78
|
maxlength?: number;
|
|
79
79
|
accumulate?: any;
|
|
80
80
|
example?: FieldValue;
|
|
81
|
-
of?: MapValue;
|
|
81
|
+
of?: MapValue;
|
|
82
82
|
validate?: (value: FieldValue, model: any) => boolean;
|
|
83
83
|
text?: "search" | "filter";
|
|
84
84
|
meta?: Metadata;
|
|
@@ -143,7 +143,7 @@ interface ConstantFieldBuildProps<
|
|
|
143
143
|
maxlength?: number;
|
|
144
144
|
accumulate?: any;
|
|
145
145
|
example?: FieldValue;
|
|
146
|
-
of?: MapValue;
|
|
146
|
+
of?: MapValue;
|
|
147
147
|
validate?: (value: FieldValue, model: any) => boolean;
|
|
148
148
|
text?: "search" | "filter";
|
|
149
149
|
modelRef: ConstantCls;
|
|
@@ -209,7 +209,7 @@ export class ConstantField<
|
|
|
209
209
|
readonly maxlength?: number;
|
|
210
210
|
readonly accumulate?: any;
|
|
211
211
|
readonly example?: FieldValue;
|
|
212
|
-
readonly of?: MapValue;
|
|
212
|
+
readonly of?: MapValue;
|
|
213
213
|
readonly validate?: (value: FieldValue, model: any) => boolean;
|
|
214
214
|
readonly text?: "search" | "filter";
|
|
215
215
|
readonly modelRef: ConstantCls;
|
package/constant/purify.ts
CHANGED
|
@@ -73,7 +73,7 @@ const purify = (
|
|
|
73
73
|
value: unknown,
|
|
74
74
|
self: Record<string, unknown>,
|
|
75
75
|
): unknown => {
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
if (
|
|
78
78
|
field.nullable &&
|
|
79
79
|
(value === null ||
|
|
@@ -147,7 +147,6 @@ const purify = (
|
|
|
147
147
|
if (!field.nullable && !value && value !== 0 && value !== false)
|
|
148
148
|
throw new Error(`Invalid Value (Nullable) in ${key} for value ${value}`);
|
|
149
149
|
|
|
150
|
-
// 2. Convert Value
|
|
151
150
|
const purifyFn = getPurifyFn(field.modelRef);
|
|
152
151
|
return purifyFn(value);
|
|
153
152
|
};
|
package/constant/types.ts
CHANGED
|
@@ -51,7 +51,6 @@ export class BaseInsight {
|
|
|
51
51
|
declare count: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// TODO: migrate this to shared
|
|
55
54
|
export interface ProtoFile {
|
|
56
55
|
id: string;
|
|
57
56
|
filename: string;
|
|
@@ -70,7 +69,6 @@ export interface ProtoFile {
|
|
|
70
69
|
lastModifiedAt: Dayjs;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
// TODO: migrate this to shared
|
|
74
72
|
export interface ProtoAppInfo {
|
|
75
73
|
appId: string | null;
|
|
76
74
|
appName: string;
|
|
@@ -85,7 +83,6 @@ export interface ProtoAppInfo {
|
|
|
85
83
|
isEmulator: boolean | null;
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
// TODO: migrate this to shared
|
|
89
86
|
export interface ProtoPatch {
|
|
90
87
|
source: ProtoFile;
|
|
91
88
|
build: ProtoFile;
|
|
@@ -104,6 +101,5 @@ export type NonFunctionalKeys<T> = keyof T extends (...args: never[]) => unknown
|
|
|
104
101
|
export const unsetDate = dayjs(new Date("0000"));
|
|
105
102
|
export const MAX_INT = 2147483647;
|
|
106
103
|
|
|
107
|
-
// TODO: migrate this to akanjs/client
|
|
108
104
|
export class Responsive extends enumOf("responsive", ["xl", "lg", "md", "sm", "xs"] as const) {}
|
|
109
105
|
export const responsiveWidths = [1200, 992, 768, 576, 0] as const;
|
package/constant/via.ts
CHANGED
|
@@ -137,7 +137,7 @@ const getBaseConstantClass = (field: FieldObject, modelType: ConstantType = "sca
|
|
|
137
137
|
}
|
|
138
138
|
set(obj: Partial<typeof this>) {
|
|
139
139
|
Object.entries(obj).forEach(([key, value]) => {
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
if (!(this.constructor as ConstantCls)[FIELD_META][key] as unknown as object | undefined) return;
|
|
142
142
|
const field = (this.constructor as ConstantCls)[FIELD_META][key];
|
|
143
143
|
if (!field) throw new Error(`Field ${key} not found`);
|
|
@@ -179,7 +179,7 @@ export type ConstantCls<Schema = any, FieldObj extends FieldObject = FieldObject
|
|
|
179
179
|
ConstantStatics<Schema, FieldObj>;
|
|
180
180
|
|
|
181
181
|
declare global {
|
|
182
|
-
|
|
182
|
+
|
|
183
183
|
interface DateConstructor extends ConstantStatics<unknown> {}
|
|
184
184
|
interface StringConstructor extends ConstantStatics<unknown> {}
|
|
185
185
|
interface BooleanConstructor extends ConstantStatics<unknown> {}
|
|
@@ -220,7 +220,6 @@ const applyConstantStatics = <Model>(model: ConstantCls<Model>, fieldMap: FieldO
|
|
|
220
220
|
return model as unknown as ConstantCls<Model>;
|
|
221
221
|
};
|
|
222
222
|
|
|
223
|
-
// light via
|
|
224
223
|
/** Builds Akan constant models such as scalar, input, object, light, full, and insight classes. */
|
|
225
224
|
export function via<
|
|
226
225
|
Obj extends BaseObject,
|
|
@@ -239,7 +238,6 @@ export function via<
|
|
|
239
238
|
...lightModelRefs: LightModels
|
|
240
239
|
): ConstantCls<_Schema, _FieldObj>;
|
|
241
240
|
|
|
242
|
-
// input or scalar via
|
|
243
241
|
export function via<
|
|
244
242
|
BuildField extends (builder: FieldBuilder) => FieldInfoObject,
|
|
245
243
|
Inputs extends Cls[],
|
|
@@ -248,7 +246,6 @@ export function via<
|
|
|
248
246
|
FieldInfoObjectToFieldObject<ReturnType<BuildField>>,
|
|
249
247
|
>(buildField: BuildField, ...extendInputRefs: Inputs): ConstantCls<_Schema, _FieldObj>;
|
|
250
248
|
|
|
251
|
-
// insight via
|
|
252
249
|
export function via<
|
|
253
250
|
Full extends BaseObject,
|
|
254
251
|
BuildField extends (builder: FieldBuilder) => FieldInfoObject,
|
|
@@ -258,7 +255,6 @@ export function via<
|
|
|
258
255
|
FieldInfoObjectToFieldObject<ReturnType<BuildField>>,
|
|
259
256
|
>(modelRef: Cls<Full>, buildField: BuildField, ...extendInsightRefs: Insights): ConstantCls<_Schema, _FieldObj>;
|
|
260
257
|
|
|
261
|
-
// object via
|
|
262
258
|
export function via<
|
|
263
259
|
Input,
|
|
264
260
|
InputFieldObj extends FieldObject,
|
|
@@ -274,7 +270,6 @@ export function via<
|
|
|
274
270
|
...extendObjectRefs: ObjectModels
|
|
275
271
|
): ConstantCls<_Schema, _FieldObj>;
|
|
276
272
|
|
|
277
|
-
// full via
|
|
278
273
|
export function via<
|
|
279
274
|
Obj,
|
|
280
275
|
ObjFieldObj extends FieldObject,
|
|
@@ -300,7 +295,7 @@ export function via(
|
|
|
300
295
|
thirdRefOrResolveField?: Cls | ((resolve: FieldResolver) => FieldInfoObject),
|
|
301
296
|
...extendRefs: Cls[]
|
|
302
297
|
): any {
|
|
303
|
-
|
|
298
|
+
|
|
304
299
|
if (
|
|
305
300
|
!firstRefOrBuildField.prototype ||
|
|
306
301
|
!(firstRefOrBuildField as Cls<unknown, { modelType?: ConstantType }>).modelType
|
|
@@ -315,7 +310,7 @@ export function via(
|
|
|
315
310
|
if (!secondRefOrFieldsOrBuildField) return makeBaseScalar(fieldMap);
|
|
316
311
|
else return extendModelInputs(fieldMap, ...extendInputRefs);
|
|
317
312
|
}
|
|
318
|
-
|
|
313
|
+
|
|
319
314
|
if (Array.isArray(secondRefOrFieldsOrBuildField)) {
|
|
320
315
|
const resolveField = thirdRefOrResolveField as (resolve: FieldResolver) => FieldInfoObject;
|
|
321
316
|
const fieldMap = resolveField(resolve);
|
|
@@ -327,14 +322,13 @@ export function via(
|
|
|
327
322
|
);
|
|
328
323
|
}
|
|
329
324
|
|
|
330
|
-
// insight or object via
|
|
331
325
|
if (
|
|
332
326
|
!(secondRefOrFieldsOrBuildField as Cls).prototype ||
|
|
333
327
|
!(secondRefOrFieldsOrBuildField as Cls<unknown, { modelType?: ConstantType }>).modelType
|
|
334
328
|
) {
|
|
335
329
|
const buildField = secondRefOrFieldsOrBuildField as (builder: FieldBuilder) => FieldInfoObject;
|
|
336
330
|
const fieldMap = buildField(field);
|
|
337
|
-
|
|
331
|
+
|
|
338
332
|
if (ConstantRegistry.isScalar(firstRefOrBuildField as Cls<unknown, { modelType: ConstantType }>)) {
|
|
339
333
|
if (!thirdRefOrResolveField) return objectModelOf(firstRefOrBuildField as ConstantCls, fieldMap);
|
|
340
334
|
else
|
|
@@ -345,7 +339,7 @@ export function via(
|
|
|
345
339
|
...(extendRefs as ConstantCls[]),
|
|
346
340
|
);
|
|
347
341
|
}
|
|
348
|
-
|
|
342
|
+
|
|
349
343
|
if (ConstantRegistry.isFull(firstRefOrBuildField as Cls<unknown, { modelType: ConstantType }>)) {
|
|
350
344
|
const extendInsightRefs = [
|
|
351
345
|
...(thirdRefOrResolveField ? [thirdRefOrResolveField as Cls] : []),
|
|
@@ -73,14 +73,6 @@ export class DatabaseRegistry {
|
|
|
73
73
|
if (!model && !allowEmpty) throw new Error(`No scalar model for ${refName}`);
|
|
74
74
|
return model as AllowEmpty extends true ? DatabaseCls | undefined : DatabaseCls;
|
|
75
75
|
}
|
|
76
|
-
// TODO: Serialize filter query map to support admin page
|
|
77
|
-
// getSerializedFilter(refName: string) {
|
|
78
|
-
// const database = this.database.get(refName);
|
|
79
|
-
// if (!database) return undefined;
|
|
80
|
-
// const sortKeys = Object.keys(getFilterSortMap(database.filter));
|
|
81
|
-
// const filterQueryMap = getFilterQueryMap(database.filter);
|
|
82
|
-
// return { filter: {}, sortKeys };
|
|
83
|
-
// },
|
|
84
76
|
|
|
85
77
|
static buildModel<
|
|
86
78
|
T extends string,
|
package/document/into.ts
CHANGED
|
@@ -150,7 +150,6 @@ export const into = <
|
|
|
150
150
|
const DefaultModel = Object.assign(class DefaultModel {}, {
|
|
151
151
|
[LOADER_META]: Object.assign({}, ...addMdls.map((mdl) => mdl[LOADER_META]), loaderInfoMap),
|
|
152
152
|
_onSchema(schema: SchemaOf) {
|
|
153
|
-
//
|
|
154
153
|
},
|
|
155
154
|
_libsOnSchema(schema: SchemaOf) {
|
|
156
155
|
libsOnSchemaFns.map((libsOnSchema) => libsOnSchema(schema));
|
|
@@ -121,7 +121,6 @@ export class FetchClient {
|
|
|
121
121
|
if (token) return { Authorization: `Bearer ${token}` };
|
|
122
122
|
}
|
|
123
123
|
} catch {
|
|
124
|
-
// Tests and standalone clients can run without Akan public env. Fall back to instance JWT.
|
|
125
124
|
}
|
|
126
125
|
return this.jwt ? { Authorization: `Bearer ${this.jwt}` } : {};
|
|
127
126
|
}
|
|
@@ -129,7 +128,6 @@ export class FetchClient {
|
|
|
129
128
|
this.sortKeyMap.set(refName, sortKeys);
|
|
130
129
|
}
|
|
131
130
|
#registerFilterQuery(suffix: string, args: SerializedArg[]) {
|
|
132
|
-
// TODO: Implement
|
|
133
131
|
}
|
|
134
132
|
#makeHttpFn(key: string, endpoint: SerializedEndpoint, prefix?: string) {
|
|
135
133
|
const argLength = endpoint.args.length;
|
|
@@ -145,8 +143,7 @@ export class FetchClient {
|
|
|
145
143
|
const url = FetchClient.makeHttpUrl(key, endpoint, prefix, argMap);
|
|
146
144
|
const headers = this.#makeAuthHeaders(option);
|
|
147
145
|
const baseUrl = option?.origin;
|
|
148
|
-
|
|
149
|
-
// request-query cache (keyed by the client origin) must be bypassed.
|
|
146
|
+
|
|
150
147
|
const requestQuery = () => this.http.get(url, { headers, baseUrl });
|
|
151
148
|
const response = baseUrl
|
|
152
149
|
? await requestQuery()
|
|
@@ -420,14 +417,12 @@ export class FetchClient {
|
|
|
420
417
|
getInit: `get${capRefName}Init${capSuffix}`,
|
|
421
418
|
};
|
|
422
419
|
|
|
423
|
-
// 1. slice endpoints
|
|
424
420
|
const endpoint = FetchClient.getEndpointFromSlice(refName, suffix, slice);
|
|
425
421
|
const handler = Object.fromEntries(
|
|
426
422
|
Object.entries(endpoint).map(([key, value]) => [key, this.#makeHttpFn(key, value, prefix)]),
|
|
427
423
|
);
|
|
428
424
|
Object.assign(this.handler, handler);
|
|
429
425
|
|
|
430
|
-
// 2. slice utils
|
|
431
426
|
const argLength = slice.args.length;
|
|
432
427
|
this.slice[sliceName] = { refName, sliceName, argLength };
|
|
433
428
|
const listFn = this.handler[names.list] as (...args: unknown[]) => Promise<unknown[]>;
|
|
@@ -49,8 +49,7 @@ export class HttpClient {
|
|
|
49
49
|
return await this.#readJsonResponse<Returns>(res);
|
|
50
50
|
}
|
|
51
51
|
#makeReqContent(data: FormData | Record<string, unknown>): { body: BodyInit; headers: Record<string, string> } {
|
|
52
|
-
|
|
53
|
-
// "multipart/form-data" without boundary makes servers throw ERR_FORMDATA_PARSE_ERROR.
|
|
52
|
+
|
|
54
53
|
if (data instanceof FormData) return { body: data, headers: {} };
|
|
55
54
|
return { body: JSON.stringify(data), headers: { "Content-Type": "application/json" } };
|
|
56
55
|
}
|