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
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from "bun:test";
|
|
2
|
-
import type { FilterInfo } from "akanjs/document";
|
|
3
|
-
import type { EndpointInfo, SliceInfo } from "akanjs/signal";
|
|
4
|
-
import { modelDictionary, scalarDictionary, serviceDictionary } from "./dictInfo";
|
|
5
|
-
import { makeDictionary, makeTrans } from "./trans";
|
|
6
|
-
|
|
7
|
-
type TestModel = {
|
|
8
|
-
title: string;
|
|
9
|
-
status: string;
|
|
10
|
-
};
|
|
11
|
-
type TestInsight = {
|
|
12
|
-
total: number;
|
|
13
|
-
};
|
|
14
|
-
type TestFilter = {
|
|
15
|
-
query: {
|
|
16
|
-
byTitle: FilterInfo<["title"]>;
|
|
17
|
-
};
|
|
18
|
-
sort: {
|
|
19
|
-
popular: -1;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
type TestEnum = {
|
|
23
|
-
refName: "dictionaryTestStatus";
|
|
24
|
-
value: "active" | "archived";
|
|
25
|
-
};
|
|
26
|
-
type TestSlice = {
|
|
27
|
-
active: SliceInfo<
|
|
28
|
-
"dictionaryTestItem",
|
|
29
|
-
unknown,
|
|
30
|
-
unknown,
|
|
31
|
-
unknown,
|
|
32
|
-
unknown,
|
|
33
|
-
TestFilter,
|
|
34
|
-
Record<string, unknown>,
|
|
35
|
-
["status"]
|
|
36
|
-
>;
|
|
37
|
-
};
|
|
38
|
-
type TestEndpoint = {
|
|
39
|
-
publish: EndpointInfo<"query", Record<string, unknown>, ["payload"]>;
|
|
40
|
-
};
|
|
41
|
-
type TestScalar = {
|
|
42
|
-
value: number;
|
|
43
|
-
};
|
|
44
|
-
type TestScalarEnum = {
|
|
45
|
-
refName: "dictionaryTestScalarUnit";
|
|
46
|
-
value: "byte";
|
|
47
|
-
};
|
|
48
|
-
type TestServiceEndpoint = {
|
|
49
|
-
ping: EndpointInfo<"query", Record<string, unknown>, ["body"]>;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const languages: [string, string, string, string] = ["en", "ko", "zhChs", "ja"];
|
|
53
|
-
|
|
54
|
-
const modelDict = modelDictionary(languages)
|
|
55
|
-
.of((t) =>
|
|
56
|
-
t(["Dictionary Test Item", "사전 테스트 항목", "字典测试项目", "辞書テスト項目"]).desc([
|
|
57
|
-
"Dictionary test item description",
|
|
58
|
-
"사전 테스트 항목 설명",
|
|
59
|
-
"字典测试项目说明",
|
|
60
|
-
"辞書テスト項目の説明",
|
|
61
|
-
]),
|
|
62
|
-
)
|
|
63
|
-
.model<TestModel>((t) => ({
|
|
64
|
-
title: t(["Title", "제목", "标题", "タイトル"]).desc([
|
|
65
|
-
"Title description",
|
|
66
|
-
"제목 설명",
|
|
67
|
-
"标题说明",
|
|
68
|
-
"タイトルの説明",
|
|
69
|
-
]),
|
|
70
|
-
status: t(["Status", "상태", "状态", "ステータス"]).desc([
|
|
71
|
-
"Status description",
|
|
72
|
-
"상태 설명",
|
|
73
|
-
"状态说明",
|
|
74
|
-
"ステータスの説明",
|
|
75
|
-
]),
|
|
76
|
-
}))
|
|
77
|
-
.insight<TestInsight>((t) => ({
|
|
78
|
-
total: t(["Total", "합계", "总计", "合計"]).desc(["Total description", "합계 설명", "总计说明", "合計の説明"]),
|
|
79
|
-
}))
|
|
80
|
-
.query<TestFilter>((fn) => ({
|
|
81
|
-
byTitle: fn(["By Title", "제목별 조회", "按标题查询", "タイトルで検索"])
|
|
82
|
-
.desc(["Search by title", "제목으로 조회", "按标题搜索", "タイトルで検索する"])
|
|
83
|
-
.arg((t) => ({
|
|
84
|
-
title: t(["Title Query", "제목 쿼리", "标题查询", "タイトルクエリ"]).desc([
|
|
85
|
-
"Title query description",
|
|
86
|
-
"제목 쿼리 설명",
|
|
87
|
-
"标题查询说明",
|
|
88
|
-
"タイトルクエリの説明",
|
|
89
|
-
]),
|
|
90
|
-
})),
|
|
91
|
-
}))
|
|
92
|
-
.sort<TestFilter>((t) => ({
|
|
93
|
-
popular: t(["Popular", "인기순", "热门", "人気順"]).desc([
|
|
94
|
-
"Popular description",
|
|
95
|
-
"인기순 설명",
|
|
96
|
-
"热门说明",
|
|
97
|
-
"人気順の説明",
|
|
98
|
-
]),
|
|
99
|
-
}))
|
|
100
|
-
.enum<TestEnum>("dictionaryTestStatus", (t) => ({
|
|
101
|
-
active: t(["Active", "활성", "启用", "有効"]).desc(["Active status", "활성 상태", "启用状态", "有効状態"]),
|
|
102
|
-
archived: t(["Archived", "보관됨", "已归档", "アーカイブ済み"]).desc([
|
|
103
|
-
"Archived status",
|
|
104
|
-
"보관된 상태",
|
|
105
|
-
"已归档状态",
|
|
106
|
-
"アーカイブ済み状態",
|
|
107
|
-
]),
|
|
108
|
-
}))
|
|
109
|
-
.applyBaseSignal("dictionaryTestItem")
|
|
110
|
-
.slice<TestSlice>((fn) => ({
|
|
111
|
-
active: fn(["Active Items", "활성 항목", "启用项目", "有効な項目"])
|
|
112
|
-
.desc(["Active item slice", "활성 항목 슬라이스", "启用项目切片", "有効な項目スライス"])
|
|
113
|
-
.arg((t) => ({
|
|
114
|
-
status: t(["Status Arg", "상태 인자", "状态参数", "ステータス引数"]).desc([
|
|
115
|
-
"Status arg description",
|
|
116
|
-
"상태 인자 설명",
|
|
117
|
-
"状态参数说明",
|
|
118
|
-
"ステータス引数の説明",
|
|
119
|
-
]),
|
|
120
|
-
})),
|
|
121
|
-
}))
|
|
122
|
-
.endpoint<TestEndpoint>((fn) => ({
|
|
123
|
-
publish: fn(["Publish", "게시", "发布", "公開"])
|
|
124
|
-
.desc(["Publish description", "게시 설명", "发布说明", "公開の説明"])
|
|
125
|
-
.arg((t) => ({
|
|
126
|
-
payload: t(["Payload", "페이로드", "负载", "ペイロード"]).desc([
|
|
127
|
-
"Payload description",
|
|
128
|
-
"페이로드 설명",
|
|
129
|
-
"负载说明",
|
|
130
|
-
"ペイロードの説明",
|
|
131
|
-
]),
|
|
132
|
-
})),
|
|
133
|
-
}))
|
|
134
|
-
.error({
|
|
135
|
-
notFound: ["Item not found", "항목을 찾을 수 없습니다", "找不到项目", "項目が見つかりません"],
|
|
136
|
-
})
|
|
137
|
-
.translate({
|
|
138
|
-
empty: ["Empty item", "빈 항목", "空项目", "空の項目"],
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
const scalarDict = scalarDictionary(languages)
|
|
142
|
-
.of((t) =>
|
|
143
|
-
t(["Dictionary Test Scalar", "사전 테스트 스칼라", "字典测试标量", "辞書テストスカラー"]).desc([
|
|
144
|
-
"Scalar description",
|
|
145
|
-
"스칼라 설명",
|
|
146
|
-
"标量说明",
|
|
147
|
-
"スカラーの説明",
|
|
148
|
-
]),
|
|
149
|
-
)
|
|
150
|
-
.model<TestScalar>((t) => ({
|
|
151
|
-
value: t(["Value", "값", "值", "値"]).desc(["Value description", "값 설명", "值说明", "値の説明"]),
|
|
152
|
-
}))
|
|
153
|
-
.enum<TestScalarEnum>("dictionaryTestScalarUnit", (t) => ({
|
|
154
|
-
byte: t(["Byte", "바이트", "字节", "バイト"]).desc(["Byte description", "바이트 설명", "字节说明", "バイトの説明"]),
|
|
155
|
-
}))
|
|
156
|
-
.error({
|
|
157
|
-
invalid: ["Invalid scalar", "유효하지 않은 스칼라", "无效标量", "無効なスカラー"],
|
|
158
|
-
})
|
|
159
|
-
.translate({
|
|
160
|
-
summary: ["Scalar summary", "스칼라 요약", "标量摘要", "スカラー概要"],
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
const serviceDict = serviceDictionary(languages)
|
|
164
|
-
.endpoint<TestServiceEndpoint>((fn) => ({
|
|
165
|
-
ping: fn(["Ping", "핑", "Ping", "Ping"])
|
|
166
|
-
.desc(["Ping description", "핑 설명", "Ping说明", "Pingの説明"])
|
|
167
|
-
.arg((t) => ({
|
|
168
|
-
body: t(["Body", "본문", "正文", "本文"]).desc(["Body description", "본문 설명", "正文说明", "本文の説明"]),
|
|
169
|
-
})),
|
|
170
|
-
}))
|
|
171
|
-
.error({
|
|
172
|
-
unavailable: ["Service unavailable", "서비스를 사용할 수 없습니다", "服务不可用", "サービスを利用できません"],
|
|
173
|
-
})
|
|
174
|
-
.translate({
|
|
175
|
-
ready: ["Service ready", "서비스 준비됨", "服务已就绪", "サービス準備完了"],
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
const trans = makeTrans({
|
|
179
|
-
dictionaryTestItem: { dict: modelDict } as never,
|
|
180
|
-
dictionaryTestScalar: { dict: scalarDict } as never,
|
|
181
|
-
dictionaryTestService: { dict: serviceDict } as never,
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
describe("makeTrans", () => {
|
|
185
|
-
test("translates registered model dictionary paths", () => {
|
|
186
|
-
expect(trans.translate("en", "dictionaryTestItem.modelName" as never)).toBe("Dictionary Test Item");
|
|
187
|
-
expect(trans.translate("ko", "dictionaryTestItem.modelName" as never)).toBe("사전 테스트 항목");
|
|
188
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.modelName" as never)).toBe("字典测试项目");
|
|
189
|
-
expect(trans.translate("ja", "dictionaryTestItem.modelName" as never)).toBe("辞書テスト項目");
|
|
190
|
-
expect(trans.translate("en", "dictionaryTestItem.modelDesc" as never)).toBe("Dictionary test item description");
|
|
191
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.modelDesc" as never)).toBe("字典测试项目说明");
|
|
192
|
-
expect(trans.translate("ja", "dictionaryTestItem.modelDesc" as never)).toBe("辞書テスト項目の説明");
|
|
193
|
-
|
|
194
|
-
expect(trans.translate("en", "dictionaryTestItem.title" as never)).toBe("Title");
|
|
195
|
-
expect(trans.translate("ko", "dictionaryTestItem.title.desc" as never)).toBe("제목 설명");
|
|
196
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.title" as never)).toBe("标题");
|
|
197
|
-
expect(trans.translate("ja", "dictionaryTestItem.title.desc" as never)).toBe("タイトルの説明");
|
|
198
|
-
expect(trans.translate("en", "dictionaryTestItem.id" as never)).toBe("ID");
|
|
199
|
-
expect(trans.translate("ko", "dictionaryTestItem.createdAt.desc" as never)).toBe("데이터 생성 시각");
|
|
200
|
-
|
|
201
|
-
expect(trans.translate("en", "dictionaryTestItem.insight.total" as never)).toBe("Total");
|
|
202
|
-
expect(trans.translate("ko", "dictionaryTestItem.insight.total.desc" as never)).toBe("합계 설명");
|
|
203
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.insight.total.desc" as never)).toBe("总计说明");
|
|
204
|
-
expect(trans.translate("ja", "dictionaryTestItem.insight.total" as never)).toBe("合計");
|
|
205
|
-
expect(trans.translate("en", "dictionaryTestItem.insight.count" as never)).toBe("Count");
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
test("translates model query, sort, enum, and signal paths", () => {
|
|
209
|
-
expect(trans.translate("en", "dictionaryTestItem.query.byTitle" as never)).toBe("By Title");
|
|
210
|
-
expect(trans.translate("ko", "dictionaryTestItem.query.byTitle.desc" as never)).toBe("제목으로 조회");
|
|
211
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.query.byTitle" as never)).toBe("按标题查询");
|
|
212
|
-
expect(trans.translate("ja", "dictionaryTestItem.query.byTitle.desc" as never)).toBe("タイトルで検索する");
|
|
213
|
-
expect(trans.translate("en", "dictionaryTestItem.query.byTitle.arg.title" as never)).toBe("Title Query");
|
|
214
|
-
expect(trans.translate("ko", "dictionaryTestItem.query.byTitle.arg.title.desc" as never)).toBe("제목 쿼리 설명");
|
|
215
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.query.byTitle.arg.title.desc" as never)).toBe("标题查询说明");
|
|
216
|
-
expect(trans.translate("ja", "dictionaryTestItem.query.byTitle.arg.title" as never)).toBe("タイトルクエリ");
|
|
217
|
-
expect(trans.translate("en", "dictionaryTestItem.query.any" as never)).toBe("Any");
|
|
218
|
-
|
|
219
|
-
expect(trans.translate("en", "dictionaryTestItem.sort.popular" as never)).toBe("Popular");
|
|
220
|
-
expect(trans.translate("ko", "dictionaryTestItem.sort.latest" as never)).toBe("최신순");
|
|
221
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.sort.popular.desc" as never)).toBe("热门说明");
|
|
222
|
-
expect(trans.translate("ja", "dictionaryTestItem.sort.popular" as never)).toBe("人気順");
|
|
223
|
-
|
|
224
|
-
expect(trans.translate("en", "dictionaryTestStatus.active" as never)).toBe("Active");
|
|
225
|
-
expect(trans.translate("ko", "dictionaryTestStatus.archived.desc" as never)).toBe("보관된 상태");
|
|
226
|
-
expect(trans.translate("zhChs", "dictionaryTestStatus.active.desc" as never)).toBe("启用状态");
|
|
227
|
-
expect(trans.translate("ja", "dictionaryTestStatus.archived" as never)).toBe("アーカイブ済み");
|
|
228
|
-
|
|
229
|
-
expect(trans.translate("en", "dictionaryTestItem.signal.createDictionaryTestItem" as never)).toBe(
|
|
230
|
-
"Create DictionaryTestItem",
|
|
231
|
-
);
|
|
232
|
-
expect(trans.translate("ko", "dictionaryTestItem.signal.createDictionaryTestItem.arg.data" as never)).toBe(
|
|
233
|
-
"데이터",
|
|
234
|
-
);
|
|
235
|
-
expect(trans.translate("en", "dictionaryTestItem.signal.dictionaryTestItemListActive" as never)).toBe(
|
|
236
|
-
"Slice List - Active Items",
|
|
237
|
-
);
|
|
238
|
-
expect(trans.translate("en", "dictionaryTestItem.signal.dictionaryTestItemListActive.arg.skip" as never)).toBe(
|
|
239
|
-
"skip",
|
|
240
|
-
);
|
|
241
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.signal.dictionaryTestItemListActive" as never)).toBe(
|
|
242
|
-
"Slice List - 启用项目",
|
|
243
|
-
);
|
|
244
|
-
expect(trans.translate("ja", "dictionaryTestItem.signal.dictionaryTestItemInsightActive" as never)).toBe(
|
|
245
|
-
"Slice Insight - 有効な項目",
|
|
246
|
-
);
|
|
247
|
-
expect(
|
|
248
|
-
trans.translate("ko", "dictionaryTestItem.signal.dictionaryTestItemInsightActive.arg.status.desc" as never),
|
|
249
|
-
).toBe("상태 인자 설명");
|
|
250
|
-
expect(
|
|
251
|
-
trans.translate("zhChs", "dictionaryTestItem.signal.dictionaryTestItemInsightActive.arg.status.desc" as never),
|
|
252
|
-
).toBe("状态参数说明");
|
|
253
|
-
expect(trans.translate("ja", "dictionaryTestItem.signal.dictionaryTestItemListActive.arg.status" as never)).toBe(
|
|
254
|
-
"ステータス引数",
|
|
255
|
-
);
|
|
256
|
-
expect(trans.translate("en", "dictionaryTestItem.signal.publish.arg.payload.desc" as never)).toBe(
|
|
257
|
-
"Payload description",
|
|
258
|
-
);
|
|
259
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.signal.publish.desc" as never)).toBe("发布说明");
|
|
260
|
-
expect(trans.translate("ja", "dictionaryTestItem.signal.publish.arg.payload.desc" as never)).toBe(
|
|
261
|
-
"ペイロードの説明",
|
|
262
|
-
);
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
test("translates scalar and service dictionaries", () => {
|
|
266
|
-
expect(trans.translate("en", "dictionaryTestScalar.modelName" as never)).toBe("Dictionary Test Scalar");
|
|
267
|
-
expect(trans.translate("ko", "dictionaryTestScalar.modelDesc" as never)).toBe("스칼라 설명");
|
|
268
|
-
expect(trans.translate("zhChs", "dictionaryTestScalar.modelName" as never)).toBe("字典测试标量");
|
|
269
|
-
expect(trans.translate("ja", "dictionaryTestScalar.modelDesc" as never)).toBe("スカラーの説明");
|
|
270
|
-
expect(trans.translate("en", "dictionaryTestScalar.value.desc" as never)).toBe("Value description");
|
|
271
|
-
expect(trans.translate("ko", "dictionaryTestScalarUnit.byte" as never)).toBe("바이트");
|
|
272
|
-
expect(trans.translate("zhChs", "dictionaryTestScalar.value.desc" as never)).toBe("值说明");
|
|
273
|
-
expect(trans.translate("ja", "dictionaryTestScalarUnit.byte.desc" as never)).toBe("バイトの説明");
|
|
274
|
-
expect(trans.translate("en", "dictionaryTestScalar.summary" as never)).toBe("Scalar summary");
|
|
275
|
-
expect(trans.translate("zhChs", "dictionaryTestScalar.summary" as never)).toBe("标量摘要");
|
|
276
|
-
expect(trans.translate("ja", "dictionaryTestScalar.summary" as never)).toBe("スカラー概要");
|
|
277
|
-
|
|
278
|
-
expect(trans.translate("en", "dictionaryTestService.signal.ping" as never)).toBe("Ping");
|
|
279
|
-
expect(trans.translate("ko", "dictionaryTestService.signal.ping.desc" as never)).toBe("핑 설명");
|
|
280
|
-
expect(trans.translate("zhChs", "dictionaryTestService.signal.ping.desc" as never)).toBe("Ping说明");
|
|
281
|
-
expect(trans.translate("ja", "dictionaryTestService.signal.ping.arg.body" as never)).toBe("本文");
|
|
282
|
-
expect(trans.translate("en", "dictionaryTestService.signal.ping.arg.body.desc" as never)).toBe("Body description");
|
|
283
|
-
expect(trans.translate("ko", "dictionaryTestService.ready" as never)).toBe("서비스 준비됨");
|
|
284
|
-
expect(trans.translate("zhChs", "dictionaryTestService.ready" as never)).toBe("服务已就绪");
|
|
285
|
-
expect(trans.translate("ja", "dictionaryTestService.ready" as never)).toBe("サービス準備完了");
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
test("returns fallback key for missing translations and exposes dictionaries", () => {
|
|
289
|
-
expect(trans.translate("en", "dictionaryTestItem.unknown.path" as never)).toBe("dictionaryTestItem.unknown.path");
|
|
290
|
-
|
|
291
|
-
const enDict = trans.getDictionary("en") as Record<string, Record<string, unknown>>;
|
|
292
|
-
const allDict = trans.getAllDictionary();
|
|
293
|
-
|
|
294
|
-
expect(enDict.dictionaryTestItem.modelName).toEqual({ t: "Dictionary Test Item" });
|
|
295
|
-
expect(allDict.ko.dictionaryTestService.ready).toEqual({ t: "서비스 준비됨" });
|
|
296
|
-
expect(allDict.zhChs.dictionaryTestItem.modelName).toEqual({ t: "字典测试项目" });
|
|
297
|
-
expect(allDict.ja.dictionaryTestService.ready).toEqual({ t: "サービス準備完了" });
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
test("creates Err exceptions with dictionary error keys", () => {
|
|
301
|
-
const err = new trans.Err("dictionaryTestItem.error.notFound" as never, { id: "1" });
|
|
302
|
-
const conflict = new trans.Err.Conflict("dictionaryTestItem.error.notFound" as never);
|
|
303
|
-
const restored = trans.Err.fromJSON({
|
|
304
|
-
error: "dictionaryTestItem.error.notFound",
|
|
305
|
-
statusCode: 404,
|
|
306
|
-
data: { id: "1" },
|
|
307
|
-
path: "/dictionary-test",
|
|
308
|
-
timestamp: "2026-05-25T00:00:00.000Z",
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
expect(err).toBeInstanceOf(Error);
|
|
312
|
-
expect(err.message).toBe("dictionaryTestItem.error.notFound");
|
|
313
|
-
expect(err.statusCode).toBe(400);
|
|
314
|
-
expect(err.toJSON()).toMatchObject({
|
|
315
|
-
error: "dictionaryTestItem.error.notFound",
|
|
316
|
-
statusCode: 400,
|
|
317
|
-
data: { id: "1" },
|
|
318
|
-
});
|
|
319
|
-
expect(conflict.statusCode).toBe(409);
|
|
320
|
-
expect(restored).toBeInstanceOf(trans.Err);
|
|
321
|
-
expect(restored.message).toBe("dictionaryTestItem.error.notFound");
|
|
322
|
-
expect(restored.statusCode).toBe(404);
|
|
323
|
-
expect(restored.toJSON()).toMatchObject({
|
|
324
|
-
error: "dictionaryTestItem.error.notFound",
|
|
325
|
-
statusCode: 404,
|
|
326
|
-
data: { id: "1" },
|
|
327
|
-
path: "/dictionary-test",
|
|
328
|
-
timestamp: "2026-05-25T00:00:00.000Z",
|
|
329
|
-
});
|
|
330
|
-
expect(trans.translate("ko", "dictionaryTestItem.error.notFound" as never)).toBe("항목을 찾을 수 없습니다");
|
|
331
|
-
expect(trans.translate("zhChs", "dictionaryTestItem.error.notFound" as never)).toBe("找不到项目");
|
|
332
|
-
expect(trans.translate("ja", "dictionaryTestItem.error.notFound" as never)).toBe("項目が見つかりません");
|
|
333
|
-
expect(trans.translate("en", "dictionaryTestScalar.error.invalid" as never)).toBe("Invalid scalar");
|
|
334
|
-
expect(trans.translate("zhChs", "dictionaryTestScalar.error.invalid" as never)).toBe("无效标量");
|
|
335
|
-
expect(trans.translate("ja", "dictionaryTestScalar.error.invalid" as never)).toBe("無効なスカラー");
|
|
336
|
-
expect(trans.translate("ko", "dictionaryTestService.error.unavailable" as never)).toBe(
|
|
337
|
-
"서비스를 사용할 수 없습니다",
|
|
338
|
-
);
|
|
339
|
-
expect(trans.translate("zhChs", "dictionaryTestService.error.unavailable" as never)).toBe("服务不可用");
|
|
340
|
-
expect(trans.translate("ja", "dictionaryTestService.error.unavailable" as never)).toBe("サービスを利用できません");
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
describe("makeDictionary", () => {
|
|
345
|
-
test("merges dictionary fragments from left to right", () => {
|
|
346
|
-
expect(makeDictionary({ a: "A", nested: { left: true } }, { b: "B", nested: { right: true } })).toEqual({
|
|
347
|
-
a: "A",
|
|
348
|
-
b: "B",
|
|
349
|
-
nested: { right: true },
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
});
|