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
package/signal/trace.ts
CHANGED
|
@@ -81,13 +81,6 @@ export class SignalTrace {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
// Shared across bundle chunks (see traceAggregator note) so that span/db/cache helpers
|
|
85
|
-
// invoked from other modules (database.resolver, middleware) observe the active trace.
|
|
86
|
-
// Shared store pinned to `process`. The akan worker loads the app server bundle and the
|
|
87
|
-
// framework runtime in separate module realms (each with its own `globalThis`), so the
|
|
88
|
-
// signal layer that records spans and the metrics collector that reads them would otherwise
|
|
89
|
-
// hold different singletons. `process` is the one object shared across realms in a single OS
|
|
90
|
-
// process, so we hang the trace ALS + aggregator off it to guarantee a single instance.
|
|
91
84
|
const traceProcessStore = process as unknown as {
|
|
92
85
|
__akanTraceAls?: AsyncLocalStorage<SignalTrace>;
|
|
93
86
|
__akanTraceAggregator?: TraceAggregator;
|
|
@@ -253,10 +246,6 @@ const round = (value: number, digits = 3): number => {
|
|
|
253
246
|
return Math.round(value * factor) / factor;
|
|
254
247
|
};
|
|
255
248
|
|
|
256
|
-
// The akan build can bundle this module into more than one chunk (e.g. the signal layer
|
|
257
|
-
// that writes spans vs. the metrics collector that reads them). A plain module-level
|
|
258
|
-
// singleton would then diverge per chunk, so pin it to globalThis to guarantee that every
|
|
259
|
-
// copy of this module shares one aggregator within the process.
|
|
260
249
|
let aggregatorInstance = traceProcessStore.__akanTraceAggregator;
|
|
261
250
|
if (!aggregatorInstance) {
|
|
262
251
|
aggregatorInstance = new TraceAggregator();
|
package/signal/types.ts
CHANGED
|
@@ -4,11 +4,6 @@ import type { GuardCls } from "./guard";
|
|
|
4
4
|
import type { MiddlewareCls } from "./middleware";
|
|
5
5
|
import type { SliceCls } from "./slice";
|
|
6
6
|
|
|
7
|
-
// --- ServiceModel projection helpers (D1) ---
|
|
8
|
-
// Use these instead of re-typing `NonNullable<SrvModule["cnst"]>["_Full"]` /
|
|
9
|
-
// `SlceCls["srv"]["cnst"]["_Full"]` everywhere. Centralizing the path keeps
|
|
10
|
-
// type derivations consistent and dramatically reduces the amount of text
|
|
11
|
-
// TypeScript has to re-evaluate at each callsite.
|
|
12
7
|
export type CnstOf<S extends ServiceModel> = NonNullable<S["cnst"]>;
|
|
13
8
|
export type DbOf<S extends ServiceModel> = NonNullable<S["db"]>;
|
|
14
9
|
|
|
@@ -28,8 +23,6 @@ export type CnstCapitalizedRefName<S extends ServiceModel> = CnstOf<S>["_Capital
|
|
|
28
23
|
export type DbFilter<S extends ServiceModel> = DbOf<S>["_Filter"];
|
|
29
24
|
export type DbSort<S extends ServiceModel> = DbOf<S>["_Sort"];
|
|
30
25
|
|
|
31
|
-
// Slice-cls shortcuts (common in store/state/action). The branches that
|
|
32
|
-
// include `SlceCls extends SliceCls` preserve `ServiceModel` inference.
|
|
33
26
|
export type SlceSrv<S extends SliceCls> = S["srv"];
|
|
34
27
|
export type SlceCnstRefName<S extends SliceCls> = S["srv"]["cnst"]["refName"];
|
|
35
28
|
export type SlceCnstInput<S extends SliceCls> = S["srv"]["cnst"]["_Input"];
|
|
@@ -80,13 +73,11 @@ export interface SignalOption<Response = any, Nullable extends boolean = false,
|
|
|
80
73
|
/** Marks this mutation as the framework file-upload endpoint (see resolveFileUploadCapability). */
|
|
81
74
|
fileUpload?: boolean;
|
|
82
75
|
|
|
83
|
-
// * ==================== Schedule ==================== * //
|
|
84
76
|
scheduleType?: "init" | "destroy" | "cron" | "interval" | "timeout";
|
|
85
77
|
scheduleCron?: string;
|
|
86
78
|
scheduleTime?: number;
|
|
87
79
|
lock?: boolean;
|
|
88
80
|
enabled?: boolean;
|
|
89
|
-
// * ==================== Schedule ==================== * //
|
|
90
81
|
}
|
|
91
82
|
|
|
92
83
|
interface SerializedSignalOption {
|
|
@@ -101,7 +92,7 @@ export interface SerializedSlice extends SerializedSignalOption {}
|
|
|
101
92
|
|
|
102
93
|
export interface SerializedReturns {
|
|
103
94
|
refName: Exclude<DefaultPrimitiveName, "Map" | "Upload"> | (string & {});
|
|
104
|
-
modelType?: "input" | "full" | "light" | "insight" | "scalar";
|
|
95
|
+
modelType?: "input" | "full" | "light" | "insight" | "scalar";
|
|
105
96
|
arrDepth?: number;
|
|
106
97
|
partial?: string[];
|
|
107
98
|
nullable?: boolean;
|
|
@@ -110,7 +101,7 @@ export interface SerializedArg {
|
|
|
110
101
|
type: ArgType;
|
|
111
102
|
refName: Exclude<DefaultPrimitiveName, "Map"> | (string & {});
|
|
112
103
|
name: string;
|
|
113
|
-
modelType?: "input" | "object" | "insight" | "scalar";
|
|
104
|
+
modelType?: "input" | "object" | "insight" | "scalar";
|
|
114
105
|
arrDepth?: number;
|
|
115
106
|
nullable?: boolean;
|
|
116
107
|
example?: string | number | boolean | Date;
|
package/store/action.ts
CHANGED
|
@@ -783,7 +783,6 @@ export const makeActions = (refName: string, slice: { [key: string]: SerializedS
|
|
|
783
783
|
const currentState = this.get() as { [key: string]: any };
|
|
784
784
|
if (fullOrLightModels.length === 0) return;
|
|
785
785
|
|
|
786
|
-
// set the first model to the model state
|
|
787
786
|
const firstModel = fullOrLightModels[0];
|
|
788
787
|
const model = currentState[names.model] as Full | null;
|
|
789
788
|
const isFull = firstModel instanceof modelRef;
|
|
@@ -798,7 +797,6 @@ export const makeActions = (refName: string, slice: { [key: string]: SerializedS
|
|
|
798
797
|
this.set({ [names.model]: crystalizedModel });
|
|
799
798
|
}
|
|
800
799
|
|
|
801
|
-
// set the rest of the models to the model list
|
|
802
800
|
const lightModels = fullOrLightModels.map(
|
|
803
801
|
(fullOrLightModel) => new cnst.light().set(fullOrLightModel) as unknown as Light,
|
|
804
802
|
);
|
|
@@ -907,7 +905,7 @@ export const makeActions = (refName: string, slice: { [key: string]: SerializedS
|
|
|
907
905
|
limit === limitOfModel &&
|
|
908
906
|
isQueryEqual(sort as unknown as object, sortOfModel as unknown as object)
|
|
909
907
|
)
|
|
910
|
-
return;
|
|
908
|
+
return;
|
|
911
909
|
else this.set({ [namesOfSlice.modelListLoading]: true });
|
|
912
910
|
const fetchQueryArgs = expandQueryArgs(queryArgs, slice.args);
|
|
913
911
|
const [modelDataList, modelInsight] = await Promise.all([
|
|
@@ -1046,7 +1044,7 @@ export const makeActions = (refName: string, slice: { [key: string]: SerializedS
|
|
|
1046
1044
|
const sortOfModel = currentState[namesOfSlice.sortOfModel] as Sort;
|
|
1047
1045
|
if (isQueryEqual(queryArgsOfModel, queryArgs)) {
|
|
1048
1046
|
Logger.trace(`${namesOfSlice.queryArgsOfModel} store-level cache hit`);
|
|
1049
|
-
return;
|
|
1047
|
+
return;
|
|
1050
1048
|
}
|
|
1051
1049
|
this.set({ [namesOfSlice.modelListLoading]: true });
|
|
1052
1050
|
const fetchQueryArgs = expandQueryArgs(queryArgs, slice.args);
|
|
@@ -1079,7 +1077,7 @@ export const makeActions = (refName: string, slice: { [key: string]: SerializedS
|
|
|
1079
1077
|
const queryArgsOfModel = currentState[namesOfSlice.queryArgsOfModel] as object[];
|
|
1080
1078
|
const limitOfModel = currentState[namesOfSlice.limitOfModel] as number;
|
|
1081
1079
|
const sortOfModel = currentState[namesOfSlice.sortOfModel] as Sort;
|
|
1082
|
-
if (sortOfModel === sort) return;
|
|
1080
|
+
if (sortOfModel === sort) return;
|
|
1083
1081
|
this.set({ [namesOfSlice.modelListLoading]: true });
|
|
1084
1082
|
const fetchQueryArgs = expandQueryArgs(queryArgsOfModel, slice.args);
|
|
1085
1083
|
const modelDataList = await (fetch[namesOfSlice.modelList] as (...args: any[]) => Promise<Light[]>)(
|
package/store/stateBuilder.ts
CHANGED
|
@@ -278,7 +278,6 @@ export const makeDefaultFactory = (value: unknown): StateInitializer => {
|
|
|
278
278
|
try {
|
|
279
279
|
return structuredClone(value);
|
|
280
280
|
} catch {
|
|
281
|
-
// Fall back to recursive clone for class-like plain data.
|
|
282
281
|
}
|
|
283
282
|
}
|
|
284
283
|
return Object.fromEntries(Object.entries(value).map(([key, val]) => [key, makeDefaultFactory(val)()]));
|
|
@@ -415,7 +414,6 @@ const getSessionKey = () => {
|
|
|
415
414
|
sessionStorage.setItem(key, next);
|
|
416
415
|
return next;
|
|
417
416
|
} catch {
|
|
418
|
-
// fall through
|
|
419
417
|
}
|
|
420
418
|
}
|
|
421
419
|
memorySessionKey ??= Math.random().toString(36).slice(2);
|
package/store/stateInfo.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { EnumInstance, PrimitiveScalar } from "akanjs/base";
|
|
2
2
|
import type { ConstantFieldTypeInput, PlainTypeToFieldType } from "akanjs/constant";
|
|
3
3
|
|
|
4
|
-
// not implemented
|
|
5
4
|
export type StateType = "normal" | "storage" | "cookie" | "param" | "searchParam";
|
|
6
5
|
|
|
7
6
|
export interface StateProps<FieldValue = any, MapValue = any, Nullable extends boolean = false> {
|
|
8
7
|
nullable: Nullable;
|
|
9
8
|
default?: FieldValue | ((doc: { id: string }) => FieldValue);
|
|
10
9
|
enum?: EnumInstance;
|
|
11
|
-
of?: MapValue;
|
|
10
|
+
of?: MapValue;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export class StateInfo<
|
package/store/types.ts
CHANGED
|
@@ -16,7 +16,7 @@ type PickFunc<
|
|
|
16
16
|
F extends keyof State = IsAny<State> extends true ? any : keyof State extends never ? any : keyof State,
|
|
17
17
|
> = (...fields: F[]) => {
|
|
18
18
|
[K in (typeof fields)[number]]: Exclude<State[K], null | undefined | "loading">;
|
|
19
|
-
};
|
|
19
|
+
};
|
|
20
20
|
export interface SetGet<State = any> {
|
|
21
21
|
set: (setState: Partial<State> | ((state: State) => void)) => void;
|
|
22
22
|
get: () => State;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
3
|
import { defineConfig, devices, type PlaywrightTestConfig } from "@playwright/test";
|
|
4
4
|
|
|
5
|
-
// For CI, you may want to set BASE_URL to the deployed application.
|
|
6
5
|
const baseURL = process.env.BASE_URL ?? "http://127.0.0.1:4200";
|
|
7
6
|
const projectName = process.env.AKAN_PUBLIC_APP_NAME ?? "unknown";
|
|
8
7
|
|
|
@@ -10,26 +9,23 @@ const projectName = process.env.AKAN_PUBLIC_APP_NAME ?? "unknown";
|
|
|
10
9
|
* Read environment variables from file.
|
|
11
10
|
* https://github.com/motdotla/dotenv
|
|
12
11
|
*/
|
|
13
|
-
// require('dotenv').config();
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* See https://playwright.dev/docs/test-configuration.
|
|
17
15
|
*/
|
|
18
16
|
export const withBase = (filename: string, config: PlaywrightTestConfig = {}) =>
|
|
19
17
|
defineConfig({
|
|
20
|
-
|
|
21
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
18
|
+
|
|
22
19
|
use: {
|
|
23
20
|
baseURL,
|
|
24
|
-
|
|
21
|
+
|
|
25
22
|
trace: "on-first-retry",
|
|
26
23
|
},
|
|
27
|
-
|
|
24
|
+
|
|
28
25
|
webServer: {
|
|
29
26
|
command: `akan serve ${projectName}`,
|
|
30
27
|
url: "http://127.0.0.1:4200",
|
|
31
28
|
reuseExistingServer: !process.env.CI,
|
|
32
|
-
// cwd: workspaceRoot,
|
|
33
29
|
},
|
|
34
30
|
projects: [
|
|
35
31
|
{
|
|
@@ -47,25 +43,6 @@ export const withBase = (filename: string, config: PlaywrightTestConfig = {}) =>
|
|
|
47
43
|
use: { ...devices["Desktop Safari"] },
|
|
48
44
|
},
|
|
49
45
|
|
|
50
|
-
// Uncomment for mobile browsers support
|
|
51
|
-
/* {
|
|
52
|
-
name: 'Mobile Chrome',
|
|
53
|
-
use: { ...devices['Pixel 5'] },
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'Mobile Safari',
|
|
57
|
-
use: { ...devices['iPhone 12'] },
|
|
58
|
-
}, */
|
|
59
|
-
|
|
60
|
-
// Uncomment for branded browsers
|
|
61
|
-
/* {
|
|
62
|
-
name: 'Microsoft Edge',
|
|
63
|
-
use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'Google Chrome',
|
|
67
|
-
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
68
|
-
} */
|
|
69
46
|
],
|
|
70
47
|
...config,
|
|
71
48
|
});
|
package/test/sampleOf.ts
CHANGED
|
@@ -60,7 +60,7 @@ export type SampleOf<Model> = DocumentModel<{
|
|
|
60
60
|
export const sampleOf = <Model>(
|
|
61
61
|
modelRef: ConstantCls<Model>,
|
|
62
62
|
): DocumentModel<{ [K in keyof Model as Model[K] extends BaseObject ? never : K]: NonNullable<Model[K]> }> => {
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
return Object.fromEntries(
|
|
65
65
|
Object.entries(modelRef[FIELD_META]).map(([key, field]) => [
|
|
66
66
|
key,
|
package/test/testServer.ts
CHANGED
|
@@ -149,7 +149,7 @@ export class TestServer {
|
|
|
149
149
|
async terminate() {
|
|
150
150
|
const now = Date.now();
|
|
151
151
|
const elapsed = now - this.#startAt;
|
|
152
|
-
await sleep(50);
|
|
152
|
+
await sleep(50);
|
|
153
153
|
await this.#server?.stop();
|
|
154
154
|
this.#server = undefined;
|
|
155
155
|
if (this.#tempDir) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Cls } from ".";
|
|
2
|
+
import { Float, Int } from "./primitiveRegistry.d.ts";
|
|
3
|
+
export type EnumInstance<RefName extends string = string, T = string | number> = Cls<{
|
|
4
|
+
refName: RefName;
|
|
5
|
+
value: T;
|
|
6
|
+
}, {
|
|
7
|
+
refName: RefName;
|
|
8
|
+
type: StringConstructor | typeof Int | typeof Float;
|
|
9
|
+
values: readonly T[];
|
|
10
|
+
valueMap: Map<T, number>;
|
|
11
|
+
has: (value: T) => boolean;
|
|
12
|
+
indexOf: (value: T) => number;
|
|
13
|
+
find: (callback: (value: T, index: number, array: readonly T[]) => boolean) => T;
|
|
14
|
+
findIndex: (callback: (value: T, index: number, array: readonly T[]) => boolean) => number;
|
|
15
|
+
filter: (callback: (value: T, index: number, array: readonly T[]) => boolean) => T[];
|
|
16
|
+
map: <R>(callback: (value: T, index: number, array: readonly T[]) => R) => R[];
|
|
17
|
+
forEach: (callback: (value: T, index: number, array: readonly T[]) => void) => void;
|
|
18
|
+
}>;
|
|
19
|
+
/** Returns true when a class was created by `enumOf`. */
|
|
20
|
+
export declare const isEnum: (enumRef: Cls) => boolean;
|
|
21
|
+
/** Creates a typed scalar enum class from a readonly list of string or number values. */
|
|
22
|
+
export declare const enumOf: <RefName extends string, T = string | number>(refName: RefName, values: readonly T[]) => EnumInstance<RefName, T>;
|
|
23
|
+
/** Id-keyed list helper used for light model collections and immutable-style list updates. */
|
|
24
|
+
export declare class DataList<Light extends {
|
|
25
|
+
id: string;
|
|
26
|
+
}> {
|
|
27
|
+
#private;
|
|
28
|
+
length: number;
|
|
29
|
+
values: Light[];
|
|
30
|
+
constructor(data?: Light[] | DataList<Light>);
|
|
31
|
+
indexOf(id: string): number;
|
|
32
|
+
set(value: Light): this;
|
|
33
|
+
delete(id: string): this;
|
|
34
|
+
get(id: string): Light | undefined;
|
|
35
|
+
at(idx: number): Light | undefined;
|
|
36
|
+
pickAt(idx: number): Light;
|
|
37
|
+
pick(id: string): Light;
|
|
38
|
+
has(id: string): boolean;
|
|
39
|
+
find(fn: (value: Light, idx: number) => boolean): Light | undefined;
|
|
40
|
+
findIndex(fn: (value: Light, idx: number) => boolean): number;
|
|
41
|
+
some(fn: (value: Light, idx: number) => boolean): boolean;
|
|
42
|
+
every(fn: (value: Light, idx: number) => boolean): boolean;
|
|
43
|
+
forEach(fn: (value: Light, idx: number) => void): void;
|
|
44
|
+
map<T>(fn: (value: Light, idx: number) => T): T[];
|
|
45
|
+
flatMap<T>(fn: (value: Light, idx: number, array: Light[]) => T | readonly T[]): T[];
|
|
46
|
+
sort(fn: (a: Light, b: Light) => number): DataList<Light>;
|
|
47
|
+
filter(fn: (value: Light, idx: number) => boolean): DataList<Light>;
|
|
48
|
+
reduce<T>(fn: (acc: T, value: Light, idx: number) => T, initialValue: T): T;
|
|
49
|
+
slice(start: number, end?: number): DataList<Light>;
|
|
50
|
+
save(): DataList<Light>;
|
|
51
|
+
[Symbol.iterator](): ArrayIterator<Light>;
|
|
52
|
+
}
|
|
53
|
+
export declare const logo = "\n _ _ _ \n / \\ | | ____ _ _ __ (_)___ \n / _ \\ | |/ / _' | '_ \\ | / __|\n / ___ \\| < (_| | | | |_ | \\__ \\\n /_/ \\_\\_|\\_\\__,_|_| |_(_)/ |___/\n |__/ \n? See more details on docs https://www.akanjs.com/docs\n\u2605 Star Akanjs on GitHub https://github.com/akan-team/akanjs\n\n";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type Environment = "testing" | "debug" | "develop" | "main" | "local";
|
|
2
|
+
export type DatabaseMode = "single" | "multiple" | "cluster";
|
|
3
|
+
export interface BaseEnv {
|
|
4
|
+
repoName: string;
|
|
5
|
+
serveDomain: string;
|
|
6
|
+
appName: string;
|
|
7
|
+
environment: Environment;
|
|
8
|
+
operationMode: "local" | "edge" | "cloud" | "module";
|
|
9
|
+
tunnelUsername: string;
|
|
10
|
+
tunnelPassword: string;
|
|
11
|
+
databaseMode?: DatabaseMode;
|
|
12
|
+
}
|
|
13
|
+
export type BackendEnv = BaseEnv & {
|
|
14
|
+
hostname?: string | null;
|
|
15
|
+
port?: number;
|
|
16
|
+
database?: {
|
|
17
|
+
mode?: DatabaseMode;
|
|
18
|
+
driver?: "sqlite" | "libsql" | "postgres";
|
|
19
|
+
sqlite?: {
|
|
20
|
+
filePath?: string;
|
|
21
|
+
journalMode?: string;
|
|
22
|
+
busyTimeoutMs?: number;
|
|
23
|
+
synchronous?: string;
|
|
24
|
+
foreignKeys?: boolean;
|
|
25
|
+
cacheSize?: number;
|
|
26
|
+
tempStore?: string;
|
|
27
|
+
};
|
|
28
|
+
libsql?: {
|
|
29
|
+
url?: string;
|
|
30
|
+
authToken?: string;
|
|
31
|
+
};
|
|
32
|
+
postgres?: {
|
|
33
|
+
url?: string;
|
|
34
|
+
host?: string;
|
|
35
|
+
port?: number;
|
|
36
|
+
database?: string;
|
|
37
|
+
user?: string;
|
|
38
|
+
password?: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
solid?: {
|
|
42
|
+
filePath?: string;
|
|
43
|
+
journalMode?: string;
|
|
44
|
+
busyTimeoutMs?: number;
|
|
45
|
+
synchronous?: string;
|
|
46
|
+
cleanupIntervalMs?: number;
|
|
47
|
+
queuePollIntervalMs?: number;
|
|
48
|
+
queueLeaseMs?: number;
|
|
49
|
+
};
|
|
50
|
+
onCleanup?: () => Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
export type ClientEnv = BaseEnv & {
|
|
53
|
+
side: "server" | "client";
|
|
54
|
+
renderMode: "ssr" | "csr";
|
|
55
|
+
websocket: boolean;
|
|
56
|
+
clientHost: string;
|
|
57
|
+
clientPort: number;
|
|
58
|
+
clientHttpProtocol: "http:" | "https:";
|
|
59
|
+
clientHttpUri: string;
|
|
60
|
+
serverHost: string;
|
|
61
|
+
serverPort: number;
|
|
62
|
+
serverHttpProtocol: "http:" | "https:";
|
|
63
|
+
serverHttpUri: string;
|
|
64
|
+
serverWsProtocol: "ws:" | "wss:";
|
|
65
|
+
serverWsUri: string;
|
|
66
|
+
};
|
|
67
|
+
/** Reads and caches Akan runtime environment values from process/browser environment settings. */
|
|
68
|
+
export declare const getEnv: () => ClientEnv;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import dayjsLib, { type Dayjs } from "dayjs";
|
|
2
|
+
import type { Cls } from "./types.d.ts";
|
|
3
|
+
export type { Dayjs };
|
|
4
|
+
/** Shared dayjs factory re-export used by Akan documents, services, stores, and UI. */
|
|
5
|
+
export declare const dayjs: typeof dayjsLib;
|
|
6
|
+
/** Registry that maps Akan primitive scalar names to their runtime scalar classes. */
|
|
7
|
+
export declare class PrimitiveRegistry {
|
|
8
|
+
#private;
|
|
9
|
+
static register(scalar: typeof PrimitiveScalar, { overwrite }?: {
|
|
10
|
+
overwrite?: boolean | undefined;
|
|
11
|
+
}): void;
|
|
12
|
+
static get(name: string): typeof PrimitiveScalar;
|
|
13
|
+
static getName(scalar: typeof PrimitiveScalar): string;
|
|
14
|
+
static has(modelRef: Cls): boolean;
|
|
15
|
+
static hasName(name: string): boolean;
|
|
16
|
+
static getNames(): string[];
|
|
17
|
+
static getAll(): (typeof PrimitiveScalar)[];
|
|
18
|
+
}
|
|
19
|
+
export declare const PRIMITIVE_SERVER_VALUE: unique symbol;
|
|
20
|
+
export declare const PRIMITIVE_CLIENT_VALUE: unique symbol;
|
|
21
|
+
export declare const PRIMITIVE_DEFAULT_VALUE: unique symbol;
|
|
22
|
+
export declare const PRIMITIVE_EXAMPLE_VALUE: unique symbol;
|
|
23
|
+
export type PrimitiveValue = string | number | boolean | Dayjs | Date | null | undefined;
|
|
24
|
+
export declare class PrimitiveScalar {
|
|
25
|
+
static refName: string;
|
|
26
|
+
static [PRIMITIVE_SERVER_VALUE]: unknown;
|
|
27
|
+
static [PRIMITIVE_CLIENT_VALUE]: unknown;
|
|
28
|
+
static [PRIMITIVE_DEFAULT_VALUE]: unknown;
|
|
29
|
+
static [PRIMITIVE_EXAMPLE_VALUE]: unknown;
|
|
30
|
+
static validate(value: PrimitiveValue): boolean;
|
|
31
|
+
static parseValue(value: PrimitiveValue): PrimitiveValue;
|
|
32
|
+
static serializeValue(value: PrimitiveValue): PrimitiveValue;
|
|
33
|
+
static _parse(this: typeof PrimitiveScalar, input: PrimitiveValue, { optional }?: {
|
|
34
|
+
optional?: boolean;
|
|
35
|
+
}): PrimitiveValue;
|
|
36
|
+
static _serialize(this: typeof PrimitiveScalar, value: PrimitiveValue, { optional }?: {
|
|
37
|
+
optional?: boolean;
|
|
38
|
+
}): PrimitiveValue;
|
|
39
|
+
static _checkValue(this: typeof PrimitiveScalar, value: PrimitiveValue, { optional }?: {
|
|
40
|
+
optional?: boolean;
|
|
41
|
+
}): void;
|
|
42
|
+
}
|
|
43
|
+
/** Integer primitive scalar. Accepts safe integer numbers after parsing. */
|
|
44
|
+
export declare class Int extends PrimitiveScalar {
|
|
45
|
+
static refName: "Int";
|
|
46
|
+
static [PRIMITIVE_SERVER_VALUE]: number;
|
|
47
|
+
static [PRIMITIVE_CLIENT_VALUE]: number;
|
|
48
|
+
static [PRIMITIVE_DEFAULT_VALUE]: number;
|
|
49
|
+
static [PRIMITIVE_EXAMPLE_VALUE]: number;
|
|
50
|
+
static validate(value: string | number): boolean;
|
|
51
|
+
static parseValue(input: string | number): number;
|
|
52
|
+
static serializeValue(value: number): number;
|
|
53
|
+
}
|
|
54
|
+
/** Floating point primitive scalar. Accepts finite numbers after parsing. */
|
|
55
|
+
export declare class Float extends PrimitiveScalar {
|
|
56
|
+
static refName: "Float";
|
|
57
|
+
static [PRIMITIVE_SERVER_VALUE]: number;
|
|
58
|
+
static [PRIMITIVE_CLIENT_VALUE]: number;
|
|
59
|
+
static [PRIMITIVE_DEFAULT_VALUE]: number;
|
|
60
|
+
static [PRIMITIVE_EXAMPLE_VALUE]: number;
|
|
61
|
+
static validate(value: string | number): boolean;
|
|
62
|
+
static parseValue(input: string | number): number;
|
|
63
|
+
static serializeValue(value: number): number;
|
|
64
|
+
}
|
|
65
|
+
/** 24-character hexadecimal id primitive used by Akan document and signal models. */
|
|
66
|
+
export declare class ID extends PrimitiveScalar {
|
|
67
|
+
static refName: "ID";
|
|
68
|
+
static [PRIMITIVE_SERVER_VALUE]: string;
|
|
69
|
+
static [PRIMITIVE_CLIENT_VALUE]: string;
|
|
70
|
+
static [PRIMITIVE_DEFAULT_VALUE]: string;
|
|
71
|
+
static [PRIMITIVE_EXAMPLE_VALUE]: string;
|
|
72
|
+
static validate(value: string): boolean;
|
|
73
|
+
static parseValue(input: string): string;
|
|
74
|
+
static serializeValue(value: string): string;
|
|
75
|
+
static _checkValue(value: PrimitiveValue, options?: {
|
|
76
|
+
optional?: boolean;
|
|
77
|
+
}): void;
|
|
78
|
+
}
|
|
79
|
+
/** Open object primitive for intentionally flexible payloads or metadata blobs. */
|
|
80
|
+
export declare class Any extends PrimitiveScalar {
|
|
81
|
+
static refName: "Any";
|
|
82
|
+
static [PRIMITIVE_DEFAULT_VALUE]: object | null;
|
|
83
|
+
static [PRIMITIVE_EXAMPLE_VALUE]: object;
|
|
84
|
+
}
|
|
85
|
+
export declare class Upload extends PrimitiveScalar {
|
|
86
|
+
static refName: "Upload";
|
|
87
|
+
static [PRIMITIVE_SERVER_VALUE]: File;
|
|
88
|
+
static [PRIMITIVE_CLIENT_VALUE]: File;
|
|
89
|
+
static [PRIMITIVE_DEFAULT_VALUE]: File | null;
|
|
90
|
+
static [PRIMITIVE_EXAMPLE_VALUE]: string;
|
|
91
|
+
__TEMP_TYPE__: "Upload";
|
|
92
|
+
}
|
|
93
|
+
declare global {
|
|
94
|
+
interface StringConstructor {
|
|
95
|
+
refName: "String";
|
|
96
|
+
[PRIMITIVE_SERVER_VALUE]: string;
|
|
97
|
+
[PRIMITIVE_CLIENT_VALUE]: string;
|
|
98
|
+
[PRIMITIVE_DEFAULT_VALUE]: string;
|
|
99
|
+
[PRIMITIVE_EXAMPLE_VALUE]: string;
|
|
100
|
+
validate(value: string): boolean;
|
|
101
|
+
parseValue(input: string): string;
|
|
102
|
+
serializeValue(value: string): string;
|
|
103
|
+
_parse(input: string): string;
|
|
104
|
+
_serialize(value: string): string;
|
|
105
|
+
_checkValue(value: string): void;
|
|
106
|
+
}
|
|
107
|
+
interface BooleanConstructor {
|
|
108
|
+
refName: "Boolean";
|
|
109
|
+
[PRIMITIVE_SERVER_VALUE]: boolean;
|
|
110
|
+
[PRIMITIVE_CLIENT_VALUE]: boolean;
|
|
111
|
+
[PRIMITIVE_DEFAULT_VALUE]: boolean;
|
|
112
|
+
[PRIMITIVE_EXAMPLE_VALUE]: boolean;
|
|
113
|
+
validate(value: boolean): boolean;
|
|
114
|
+
parseValue(input: boolean): boolean;
|
|
115
|
+
serializeValue(value: boolean): boolean;
|
|
116
|
+
_parse(input: boolean): boolean;
|
|
117
|
+
_serialize(value: boolean): boolean;
|
|
118
|
+
_checkValue(value: boolean): void;
|
|
119
|
+
}
|
|
120
|
+
interface DateConstructor {
|
|
121
|
+
refName: "Date";
|
|
122
|
+
[PRIMITIVE_SERVER_VALUE]: Dayjs;
|
|
123
|
+
[PRIMITIVE_CLIENT_VALUE]: Dayjs;
|
|
124
|
+
[PRIMITIVE_DEFAULT_VALUE]: Dayjs;
|
|
125
|
+
[PRIMITIVE_EXAMPLE_VALUE]: string;
|
|
126
|
+
validate(value: Date): boolean;
|
|
127
|
+
parseValue(input: Date): Dayjs;
|
|
128
|
+
serializeValue(value: Dayjs | Date): Date;
|
|
129
|
+
_parse(input: Date): Dayjs;
|
|
130
|
+
_serialize(value: Dayjs | Date): Date;
|
|
131
|
+
_checkValue(value: Date): void;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
export type DefaultPrimitiveName = "String" | "Boolean" | "Date" | "Int" | "Float" | "ID" | "Any" | "Upload";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FIELD_META: unique symbol;
|
|
2
|
+
export declare const SLICE_META: unique symbol;
|
|
3
|
+
export declare const FILTER_META: unique symbol;
|
|
4
|
+
export declare const LOADER_META: unique symbol;
|
|
5
|
+
export declare const INJECT_META: unique symbol;
|
|
6
|
+
export declare const ENDPOINT_META: unique symbol;
|
|
7
|
+
export declare const INTERNAL_META: unique symbol;
|
|
8
|
+
export declare const STATE_META: unique symbol;
|
|
9
|
+
export declare const STATE_INIT_META: unique symbol;
|
|
10
|
+
export declare const STATE_DERIVED_META: unique symbol;
|
|
11
|
+
export declare const ACTION_META: unique symbol;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Dayjs } from "dayjs";
|
|
2
|
+
export type SshOptions = {
|
|
3
|
+
host: string;
|
|
4
|
+
port: number;
|
|
5
|
+
username: string;
|
|
6
|
+
password: string;
|
|
7
|
+
dstPort?: number;
|
|
8
|
+
};
|
|
9
|
+
export type Cls<T = unknown, Statics = unknown> = (new (...args: never[]) => T) & Statics;
|
|
10
|
+
export type BufferLike = string | Buffer | DataView | number | ArrayBufferView | Uint8Array | ArrayBuffer | SharedArrayBuffer | readonly unknown[] | readonly number[];
|
|
11
|
+
export type GetObject<T> = {
|
|
12
|
+
[K in keyof T as K extends "prototype" ? never : K]: T[K];
|
|
13
|
+
};
|
|
14
|
+
export type OptionOf<Obj> = Partial<{
|
|
15
|
+
[K in keyof Obj]: Obj[K] | null;
|
|
16
|
+
}>;
|
|
17
|
+
export type UnCls<T> = T extends new (...args: infer _Args) => infer U ? U : never;
|
|
18
|
+
export type Prettify<T> = {
|
|
19
|
+
[K in keyof T]: T[K];
|
|
20
|
+
} & {};
|
|
21
|
+
export type GetStateObject<T> = {
|
|
22
|
+
[K in keyof T as T[K] extends (...args: never[]) => unknown ? never : K extends "prototype" ? never : K]: T[K];
|
|
23
|
+
};
|
|
24
|
+
export type GetActionObject<T> = {
|
|
25
|
+
[K in keyof T as T[K] extends (...args: never[]) => unknown ? (K extends "prototype" ? never : K) : never]: T[K];
|
|
26
|
+
};
|
|
27
|
+
export type PromiseOrObject<T> = T | Promise<T>;
|
|
28
|
+
type MergeObjectValues<T> = T extends Record<string, infer V> ? (V extends object ? V : never) : never;
|
|
29
|
+
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
30
|
+
export type MergedValues<T> = UnionToIntersection<MergeObjectValues<T>>;
|
|
31
|
+
export type Assign<A, B> = Omit<A, keyof B> & B;
|
|
32
|
+
export type ObjectAssign<Objects extends object[], Acc = unknown> = Objects extends [
|
|
33
|
+
infer First extends object,
|
|
34
|
+
...infer Rest extends object[]
|
|
35
|
+
] ? ObjectAssign<Rest, Assign<Acc, First>> : Acc;
|
|
36
|
+
export type MergeAll<T extends object[], Acc = unknown> = T extends [
|
|
37
|
+
infer First extends object,
|
|
38
|
+
...infer Rest extends object[]
|
|
39
|
+
] ? MergeAll<Rest, Acc & First> : Acc;
|
|
40
|
+
export type MergeAllActionTypes<T extends Cls[], OmitKey extends string = never, Acc = unknown> = T extends [
|
|
41
|
+
infer First extends Cls,
|
|
42
|
+
...infer Rest extends Cls[]
|
|
43
|
+
] ? Rest extends [] ? Acc & Omit<GetActionObject<UnCls<First>>, OmitKey> : MergeAllActionTypes<Rest, OmitKey, Acc & Omit<UnCls<First>, OmitKey>> : Acc;
|
|
44
|
+
export type MergeAllTypes<T extends Cls[], OmitKey extends string = never, Acc = unknown> = T extends [
|
|
45
|
+
infer First extends Cls,
|
|
46
|
+
...infer Rest extends Cls[]
|
|
47
|
+
] ? MergeAllTypes<Rest, OmitKey, Acc & Omit<UnCls<First>, OmitKey>> : Acc;
|
|
48
|
+
export type MergeAllKeyOfTypes<T extends Cls<object>[], Key extends PropertyKey, Acc = unknown> = T extends [
|
|
49
|
+
infer First extends Cls<object>,
|
|
50
|
+
...infer Rest extends Cls<object>[]
|
|
51
|
+
] ? Key extends keyof UnCls<First> ? MergeAllKeyOfTypes<Rest, Key, Acc & UnCls<First>[Key]> : MergeAllKeyOfTypes<Rest, Key, Acc> : Acc;
|
|
52
|
+
export type MergeAllKeyOfObjects<T extends object[], Key extends PropertyKey, Acc = unknown> = T extends [
|
|
53
|
+
infer First extends object,
|
|
54
|
+
...infer Rest extends object[]
|
|
55
|
+
] ? Key extends keyof First ? MergeAllKeyOfObjects<Rest, Key, Acc & First[Key]> : MergeAllKeyOfObjects<Rest, Key, Acc> : Acc;
|
|
56
|
+
export type MergeAllDoubleKeyOfObjects<T extends object[], Key extends PropertyKey, SubKey extends PropertyKey, Acc = unknown> = T extends [infer First extends object, ...infer Rest extends object[]] ? Key extends keyof First ? First[Key] extends object ? SubKey extends keyof First[Key] ? MergeAllDoubleKeyOfObjects<Rest, Key, SubKey, Acc & First[Key][SubKey]> : MergeAllDoubleKeyOfObjects<Rest, Key, SubKey, Acc> : MergeAllDoubleKeyOfObjects<Rest, Key, SubKey, Acc> : MergeAllDoubleKeyOfObjects<Rest, Key, SubKey, Acc> : Acc;
|
|
57
|
+
export type Primitive = string | number | boolean | null | undefined;
|
|
58
|
+
export type NestedKeysWithAllowed<T, Allowed = Primitive> = T extends Primitive ? never : T extends unknown[] ? never : T extends (...args: never[]) => unknown ? never : {
|
|
59
|
+
[K in keyof T & string]: T[K] extends Allowed ? K : T[K] extends Dayjs ? never : T[K] extends readonly unknown[] ? never : T[K] extends (...args: never[]) => unknown ? never : T[K] extends object ? K | `${K}.${NestedKeysWithAllowed<T[K], Allowed>}` : never;
|
|
60
|
+
}[keyof T & string];
|
|
61
|
+
export type SingleValue<Value> = Value extends (infer V)[] ? SingleValue<V> : Value;
|
|
62
|
+
export type StrArrToObject<Arr, Value> = Arr extends [infer First, ...infer Rest] ? {
|
|
63
|
+
[K in First & string]: Value;
|
|
64
|
+
} & StrArrToObject<Rest, Value> : unknown;
|
|
65
|
+
export type GetValueOfKey<Model, Key extends string, Fallback = never> = Model extends {
|
|
66
|
+
[key in Key]: unknown;
|
|
67
|
+
} ? Model[Key] : Fallback;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getNonArrayModel: <T>(arraiedModel: T | T[]) => [T, number];
|
|
2
|
+
export declare const arraiedModel: <T = unknown>(modelRef: T, arrDepth?: number) => T | T[];
|
|
3
|
+
export type ApplyFnToArrayObjectsResult<Input, Output> = Input extends readonly (infer Item)[] ? ApplyFnToArrayObjectsResult<Item, Output>[] : Output;
|
|
4
|
+
export declare const applyFnToArrayObjects: <Input, Fn extends (arg: never) => unknown>(arraiedData: Input, fn: Fn) => ApplyFnToArrayObjectsResult<Input, ReturnType<Fn>>;
|
package/types/base.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./base/index.d.ts";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CapacitorConfig } from "@capacitor/cli";
|
|
2
|
+
import type { AkanMobileTargetConfig, AppScanResult } from "akanjs";
|
|
3
|
+
export declare const withBase: (configImp?: (config: CapacitorConfig, target: AkanMobileTargetConfig) => CapacitorConfig, appData?: AppScanResult, targetName?: string) => CapacitorConfig;
|