├── MAINTAINERS.md ├── dist └── esm │ ├── uc │ ├── def.js │ ├── ext.js │ ├── opi.js │ ├── sec.js │ ├── auth.js │ ├── client.js │ ├── data.js │ ├── file.js │ ├── init.js │ ├── input.js │ ├── main.js │ ├── manager.js │ ├── policy.js │ ├── server.js │ ├── settings.js │ ├── value.js │ ├── data-store.js │ ├── opi-layout.js │ ├── output-field.js │ ├── output-part.js │ ├── transporter.js │ ├── value.d.ts │ ├── sec │ │ ├── consts.js │ │ └── consts.d.ts │ ├── data.d.ts │ ├── init.d.ts │ ├── settings │ │ ├── consts.d.ts │ │ └── consts.js │ ├── policies │ │ ├── funcs.d.ts │ │ ├── funcs.js │ │ ├── NobodyUCPolicy.d.ts │ │ ├── AnonymousUCPolicy.d.ts │ │ ├── EverybodyUCPolicy.d.ts │ │ ├── RoleAdminUCPolicy.d.ts │ │ ├── RoleRegularUCPolicy.d.ts │ │ └── AuthenticatedUCPolicy.d.ts │ ├── auth │ │ ├── consts.d.ts │ │ └── consts.js │ ├── UCOutputField.js │ ├── file.d.ts │ ├── output.js │ ├── io │ │ ├── output │ │ │ ├── AggregateOutput.d.ts │ │ │ └── AggregateOutput.js │ │ └── input │ │ │ ├── AggregateInput.d.ts │ │ │ ├── AggregateInput.js │ │ │ └── ListInput.d.ts │ ├── utils │ │ ├── ucMountingPoint.js │ │ ├── ucifcoIsForArray.d.ts │ │ ├── appendUCInputToURL.d.ts │ │ ├── recIs.js │ │ ├── ucifcoIsForArray.js │ │ ├── appendUCInputToURL.js │ │ └── ucMountingPoint.d.ts │ ├── auth.d.ts │ ├── UCOutputField.d.ts │ ├── lifecycle │ │ ├── client │ │ │ └── IdleClientMain.d.ts │ │ └── server │ │ │ └── IdleServerMain.d.ts │ ├── sec.d.ts │ └── opi.d.ts │ ├── app │ ├── i18n.js │ ├── installer.js │ ├── manifest.js │ ├── i18n.d.ts │ ├── installer.d.ts │ ├── index.js │ ├── manifest.d.ts │ └── index.d.ts │ ├── dt │ ├── DataType.js │ ├── targets │ │ ├── rn.js │ │ ├── web.js │ │ ├── rn.d.ts │ │ └── web.d.ts │ ├── final │ │ ├── TNumIndex.js │ │ ├── TURLPath.js │ │ ├── TBarCode.js │ │ ├── TUIntDuration.js │ │ ├── TUIntQuantity.js │ │ ├── TUsername.js │ │ ├── TCompanyName.js │ │ ├── TFileName.js │ │ ├── TEmoji.d.ts │ │ ├── TFileMimeType.js │ │ ├── TFreeTextShort.js │ │ ├── TJobTitle.js │ │ ├── TNumIndex.d.ts │ │ ├── TAddress.d.ts │ │ ├── TBarCode.d.ts │ │ ├── TURLPath.d.ts │ │ ├── TExternalServiceId.js │ │ ├── TFileName.d.ts │ │ ├── TJobTitle.d.ts │ │ ├── TUsername.d.ts │ │ ├── TAddress.js │ │ ├── TCSS.d.ts │ │ ├── TUIntDuration.d.ts │ │ ├── TUIntQuantity.d.ts │ │ ├── TCompanyName.d.ts │ │ ├── TErrorMessage.js │ │ ├── THTML.d.ts │ │ ├── THostAddress.d.ts │ │ ├── TErrorMessage.d.ts │ │ ├── TColor.js │ │ ├── TFreeTextShort.d.ts │ │ ├── TDateTimeFormat.d.ts │ │ ├── TMarkdown.d.ts │ │ ├── TSQLQuery.d.ts │ │ ├── TCSS.js │ │ ├── TExternalServiceId.d.ts │ │ ├── THTML.js │ │ ├── TJavaScript.d.ts │ │ ├── TJavaScript.js │ │ ├── TFreeTextLong.d.ts │ │ ├── TMarkdown.js │ │ ├── TShellCommand.d.ts │ │ ├── TTimestamp.d.ts │ │ ├── TYesNo.d.ts │ │ ├── TTransportType.d.ts │ │ ├── TColor.d.ts │ │ ├── TPassword.js │ │ ├── TDateTimeFormat.js │ │ ├── TApiKey.js │ │ ├── THostAddress.js │ │ ├── TSlug.d.ts │ │ ├── TDirPath.d.ts │ │ ├── TApiKey.d.ts │ │ ├── TYear.d.ts │ │ ├── TPassword.d.ts │ │ ├── TIPv4.d.ts │ │ ├── TJSONString.d.ts │ │ ├── TQRCode.d.ts │ │ ├── TSQLQuery.js │ │ ├── TShellCommand.js │ │ ├── THostPort.d.ts │ │ ├── TUUID.d.ts │ │ ├── TGeolocation.d.ts │ │ ├── TEncryptionKey.d.ts │ │ ├── THTTPMethod.d.ts │ │ ├── TPersonInitials.d.ts │ │ ├── TPersonLastname.d.ts │ │ ├── TEmbeddedObject.d.ts │ │ ├── TPersonFirstname.d.ts │ │ ├── TSemVerVersion.d.ts │ │ ├── TIPv6.d.ts │ │ ├── TSlug.js │ │ ├── TEmbeddedObject.js │ │ ├── TJWT.d.ts │ │ ├── TTransportType.js │ │ ├── TFileExtension.js │ │ ├── TDirPath.js │ │ ├── THTTPContentType.d.ts │ │ ├── TCountryISO3166Alpha2.d.ts │ │ ├── TFreeTextLong.js │ │ ├── TColorRGBA.d.ts │ │ ├── TEncryptionKey.js │ │ ├── TPercentage.d.ts │ │ ├── TEmoji.js │ │ ├── TDateISO8601.d.ts │ │ ├── TGitSSHURL.d.ts │ │ ├── TColorRGBA.js │ │ ├── TPersonInitials.js │ │ ├── TTimestamp.js │ │ ├── TPersonLastname.js │ │ ├── TPersonFirstname.js │ │ ├── TPersonFullname.js │ │ ├── TSearchQuery.js │ │ ├── TYesNo.js │ │ ├── TEmail.d.ts │ │ ├── TCurrencyISO4217.d.ts │ │ ├── TPersonFullname.d.ts │ │ ├── TIPv4.js │ │ ├── TDomainName.d.ts │ │ └── TTime.js │ └── base │ │ ├── TBoolean.d.ts │ │ ├── TUInt.d.ts │ │ └── TUInt.js │ ├── i18n │ ├── types.js │ ├── consts.js │ ├── index.js │ ├── consts.d.ts │ ├── locales │ │ ├── de.d.ts │ │ ├── en.d.ts │ │ ├── es.d.ts │ │ └── fr.d.ts │ └── index.d.ts │ ├── icon │ ├── Icon.js │ ├── index.js │ ├── index.d.ts │ └── Icon.d.ts │ ├── std │ ├── Logger.js │ ├── Worker.js │ ├── ClockManager.js │ ├── EmailManager.js │ ├── I18nManager.js │ ├── JWTManager.js │ ├── JobManager.js │ ├── LLMManager.js │ ├── XMLManager.js │ ├── BufferManager.js │ ├── CryptoManager.js │ ├── FormDataBuilder.js │ ├── HTTPAPICaller.js │ ├── PromptManager.js │ ├── EnvironmentManager.js │ ├── HTTPAPICallExecutor.js │ ├── ShellCommandExecutor.js │ ├── ExternalResourceManager.js │ ├── Worker.d.ts │ ├── FSManager.js │ ├── ExternalResourceManager.d.ts │ ├── impl │ │ ├── NoopXMLManager.d.ts │ │ ├── NodeFormDataBuilder.d.ts │ │ ├── SimpleFormDataBuilder.d.ts │ │ ├── NodePromptManager.d.ts │ │ ├── FakeLLMManager.d.ts │ │ ├── FakeClockManager.d.ts │ │ ├── StaticSettingsManager.d.ts │ │ ├── StdDateClockManager.d.ts │ │ ├── NodeSpawnShellCommandExecutor.d.ts │ │ ├── NoopHTTPAPICallExecutorAgentBuilder.d.ts │ │ ├── NodeEnvironmentManager.d.ts │ │ ├── UCDataStoreExternalResourceManager.d.ts │ │ ├── FakeJobManager.d.ts │ │ ├── NodeHTTPAPICallExecutorAgentBuilder.d.ts │ │ ├── EnvSettingsManager.d.ts │ │ ├── FakeHTTPAPICallExecutor.d.ts │ │ └── NodeBufferManager.d.ts │ ├── XMLManager.d.ts │ ├── FormDataBuilder.d.ts │ ├── ClockManager.d.ts │ ├── PromptManager.d.ts │ ├── consts.d.ts │ └── Logger.d.ts │ ├── testing │ ├── ctx.js │ ├── flow.js │ ├── AppTesterConfigurator.js │ ├── workers │ │ ├── AppDocsEmitter.js │ │ ├── AppTestReportEmitter.js │ │ ├── AppTestSuiteEmitter.js │ │ ├── AppTestSuiteRunner.js │ │ ├── AppDocsEmitter.d.ts │ │ ├── AppTestSuiteRunner.d.ts │ │ └── AppTestReportEmitter.d.ts │ ├── impl │ │ ├── SimpleAppDocsEmitter │ │ │ ├── markdown.d.ts │ │ │ ├── uc-summary.d.ts │ │ │ ├── tech-summary.d.ts │ │ │ ├── sequence-diagram.d.ts │ │ │ ├── markdown.js │ │ │ └── SimpleAppDocsEmitter.d.ts │ │ ├── newNodeAppTester.d.ts │ │ ├── SimpleAppDocsEmitter.d.ts │ │ ├── VitestAppTestSuiteEmitter.d.ts │ │ └── SimpleHTMLAppTestReportEmitter.d.ts │ ├── utils.d.ts │ ├── uc-auth.js │ ├── utils.js │ ├── index.js │ └── uc-auth.d.ts │ ├── product │ ├── i18n.js │ ├── manifest.js │ ├── i18n.d.ts │ ├── index.js │ └── index.d.ts │ ├── utils │ ├── http │ │ ├── types.js │ │ ├── nd-json.d.ts │ │ ├── json.js │ │ ├── toJSON.js │ │ ├── nd-json.js │ │ ├── types.d.ts │ │ ├── toQueryParams.d.ts │ │ ├── toQueryParams.js │ │ ├── toFormData.js │ │ ├── json.d.ts │ │ ├── toJSON.d.ts │ │ ├── appendData.d.ts │ │ ├── query-params.d.ts │ │ ├── status.js │ │ ├── toFormData.d.ts │ │ ├── status.d.ts │ │ ├── form-data.d.ts │ │ └── SSEStreamManager.d.ts │ ├── ioc │ │ ├── types.js │ │ ├── types.d.ts │ │ ├── bindRN.d.ts │ │ ├── bindWeb.d.ts │ │ ├── container.d.ts │ │ ├── bindNodeCLI.d.ts │ │ ├── bindServer.d.ts │ │ ├── bindNodeCore.d.ts │ │ ├── bindCloudflareWorker.d.ts │ │ ├── bindProvider.d.ts │ │ ├── container.js │ │ ├── bindProvider.js │ │ ├── bindProduct.d.ts │ │ ├── bindProduct.js │ │ ├── bindRN.js │ │ ├── bindNodeCLI.js │ │ ├── bindServer.js │ │ ├── bindCommon.d.ts │ │ └── ContainerPrinter.d.ts │ ├── async │ │ ├── types.js │ │ ├── types.d.ts │ │ ├── sleep.d.ts │ │ └── sleep.js │ ├── esm │ │ ├── srcImporter.js │ │ └── srcImporter.d.ts │ ├── streams │ │ ├── types.js │ │ └── types.d.ts │ ├── concerns │ │ ├── Clearable.js │ │ ├── Initializable.js │ │ ├── Clearable.d.ts │ │ └── Initializable.d.ts │ ├── strings │ │ ├── humanize.d.ts │ │ ├── truncate.js │ │ ├── truncate.d.ts │ │ ├── capitalize.d.ts │ │ ├── humanize.js │ │ └── capitalize.js │ ├── types │ │ └── utility-types.js │ ├── bundling │ │ ├── babel │ │ │ └── plugin.d.ts │ │ ├── webpack │ │ │ ├── loader.d.ts │ │ │ └── loader.js │ │ ├── vite │ │ │ ├── StripUCDLifecycleServerPlugin.d.ts │ │ │ ├── plugin.d.ts │ │ │ └── plugin.js │ │ ├── typescript.d.ts │ │ └── funcs.d.ts │ ├── numbers │ │ └── fmt.d.ts │ └── terminal │ │ ├── fmt.d.ts │ │ └── fmt.js │ ├── target │ ├── lib │ │ ├── shared.js │ │ ├── cli │ │ │ ├── CLIManager.js │ │ │ ├── renderer.d.ts │ │ │ └── CLIManager.d.ts │ │ ├── react │ │ │ ├── common.js │ │ │ ├── loader.js │ │ │ ├── panel.js │ │ │ ├── touchable.js │ │ │ ├── entrypoint.js │ │ │ ├── loader.d.ts │ │ │ ├── UCOutputFieldValueFragment.js │ │ │ ├── common.d.ts │ │ │ ├── UCEntrypoint.js │ │ │ ├── UCOutputFieldValueFragment.d.ts │ │ │ ├── entrypoint.d.ts │ │ │ └── form.js │ │ ├── server-node │ │ │ ├── types.js │ │ │ ├── stop.d.ts │ │ │ ├── types.d.ts │ │ │ └── funcs.d.ts │ │ ├── server │ │ │ ├── ServerManager.js │ │ │ ├── RequestHandler.js │ │ │ ├── consts.d.ts │ │ │ ├── funcs.d.ts │ │ │ ├── funcs.js │ │ │ ├── RequestLogger.d.ts │ │ │ └── CustomerFacingErrorBuilder.d.ts │ │ ├── client │ │ │ ├── ServerClientManager.js │ │ │ ├── consts.d.ts │ │ │ └── consts.js │ │ ├── shared.d.ts │ │ └── server-express │ │ │ └── HelmetMiddlewareBuilder.d.ts │ ├── node-mcp-server │ │ ├── types.js │ │ └── funcs.d.ts │ ├── react-web-pure │ │ ├── UCAutoExecLoader.d.ts │ │ ├── UCFormFieldErr.d.ts │ │ ├── UCFormFieldDesc.d.ts │ │ ├── UCFormFieldHelp.d.ts │ │ ├── UCFormFieldLabel.d.ts │ │ ├── UCFormField.d.ts │ │ ├── UCAutoExecLoader.js │ │ ├── UCFormFieldControl.d.ts │ │ ├── UCOutputFieldValue.d.ts │ │ ├── UCFormFieldErr.js │ │ ├── UCEntrypointTouchable.js │ │ ├── UCForm.d.ts │ │ ├── UCExecTouchable.d.ts │ │ ├── UCEntrypointTouchable.d.ts │ │ ├── UCFormSubmitControl.d.ts │ │ ├── UCOutputFieldValue.js │ │ ├── UCFormFieldDesc.js │ │ └── UCFormSubmitControl.js │ ├── react-native-pure │ │ ├── UCAutoExecLoader.d.ts │ │ ├── UCFormFieldErr.d.ts │ │ ├── UCFormFieldLabel.d.ts │ │ ├── UCFormFieldDesc.d.ts │ │ ├── UCFormFieldHelp.d.ts │ │ ├── UCFormField.d.ts │ │ ├── UCFormFieldControl.d.ts │ │ ├── UCAutoExecLoader.js │ │ ├── UCOutputFieldValue.d.ts │ │ ├── UCForm.d.ts │ │ ├── UCFormFieldErr.js │ │ ├── UCEntrypointTouchable.js │ │ ├── UCExecTouchable.d.ts │ │ ├── UCEntrypointTouchable.d.ts │ │ ├── UCFormSubmitControl.d.ts │ │ └── UCOutputFieldValue.js │ ├── node-core-cli │ │ └── commands.d.ts │ └── node-express-server │ │ └── middlewares │ │ ├── RequestCheckerMiddlewareBuilder.d.ts │ │ ├── HelmetMiddlewareBuilder.d.ts │ │ ├── RequestLoggerMiddlewareBuilder.d.ts │ │ └── ErrorMiddlewareBuilder.d.ts │ ├── products │ └── Helper │ │ ├── index.d.ts │ │ ├── i18n.d.ts │ │ ├── manifest.js │ │ ├── container.d.ts │ │ ├── manifest.d.ts │ │ └── i18n.js │ ├── index.babel.d.ts │ ├── index.babel.js │ ├── index.vite.d.ts │ ├── index.vite.js │ ├── index.webpack.d.ts │ ├── index.webpack.js │ ├── index.std-jwt-manager-jose.d.ts │ ├── index.std-jwt-manager-jose.js │ ├── index.uc-data-store-knex.js │ ├── apps │ └── Helper │ │ ├── index.d.ts │ │ ├── src │ │ ├── i18n.d.ts │ │ ├── lib │ │ │ ├── project.d.ts │ │ │ ├── app.d.ts │ │ │ └── app.js │ │ └── ucds │ │ │ ├── DeleteGeneratedAppsTestsUCD.d.ts │ │ │ └── TestAppUCD.d.ts │ │ └── index.js │ ├── index.uc-data-store-knex.d.ts │ ├── error │ ├── internal │ │ ├── NotAvailableError.d.ts │ │ ├── NotImplementedError.d.ts │ │ ├── NotCallableError.d.ts │ │ ├── NotAvailableError.js │ │ ├── NotImplementedError.js │ │ └── NotCallableError.js │ ├── funcs.d.ts │ ├── ForbiddenError.d.ts │ ├── NotFoundError.d.ts │ ├── UnauthorizedError.d.ts │ ├── IllegalArgumentError.d.ts │ ├── InternalServerError.d.ts │ ├── ForbiddenAsNotFoundError.d.ts │ ├── ForbiddenError.js │ ├── NotFoundError.js │ ├── UnauthorizedError.js │ ├── IllegalArgumentError.js │ ├── InternalServerError.js │ ├── ForbiddenAsNotFoundError.js │ ├── CustomError.d.ts │ └── CustomError.js │ ├── bundlers │ └── vite │ │ └── StripUCDLifecycleServerPlugin.d.ts │ ├── index.node-stricli-cli.js │ ├── index.node-stricli-cli.d.ts │ ├── index.node-test.js │ ├── index.node-mcp.d.ts │ ├── index.node-mcp.js │ ├── index.rn.d.ts │ ├── index.rn.js │ ├── index.node-test.d.ts │ ├── index.nextjs.d.ts │ ├── index.nextjs.js │ ├── index.node-hono.js │ ├── index.node-hono.d.ts │ ├── index.web.js │ ├── index.web.d.ts │ ├── index.node-express.js │ ├── index.node-express.d.ts │ ├── index.cloudflare-worker-hono.js │ └── index.cloudflare-worker-hono.d.ts ├── examples ├── products │ ├── Basic │ │ └── README.md │ └── Playground │ │ ├── README.md │ │ ├── server-nextjs │ │ ├── .gitignore │ │ ├── next-env.d.ts │ │ └── src │ │ │ ├── app │ │ │ └── page.tsx │ │ │ └── instrumentation.ts │ │ ├── rn │ │ ├── assets │ │ │ ├── icon.png │ │ │ ├── favicon.png │ │ │ ├── splash-icon.png │ │ │ └── adaptive-icon.png │ │ ├── lib │ │ │ └── uc │ │ │ │ ├── AuthDataStore.ts │ │ │ │ └── InMemoryAuthDataStore.ts │ │ ├── babel.config.esm-bridge.js │ │ ├── components │ │ │ ├── UCAutoExecLoader.tsx │ │ │ ├── Loader.tsx │ │ │ ├── base │ │ │ │ ├── H1.tsx │ │ │ │ ├── H2.tsx │ │ │ │ ├── H3.tsx │ │ │ │ └── Hr.tsx │ │ │ └── ErrMessage.tsx │ │ └── tsconfig.json │ │ ├── spa │ │ ├── public │ │ │ └── favicon.png │ │ └── components │ │ │ ├── UCAutoExecLoader.tsx │ │ │ └── ErrMessage.tsx │ │ ├── manifest.ts │ │ ├── server-node-hono │ │ └── index.ts │ │ ├── server-node-express │ │ └── index.ts │ │ ├── mcp-server │ │ └── index.ts │ │ ├── cli-node-core │ │ └── index.ts │ │ └── cli-node-stricli │ │ └── index.ts ├── @types │ └── global.d.ts └── apps │ ├── Strava │ ├── index.ts │ └── src │ │ ├── lib │ │ ├── ActivityProcessor.ts │ │ └── FakeActivityProcessor.ts │ │ └── manifest.ts │ ├── Toolbox │ └── src │ │ └── lib │ │ └── geocoding │ │ └── GeocodingManager.ts │ ├── Auth │ ├── index.ts │ └── src │ │ └── manifest.ts │ ├── MyTrip │ ├── src │ │ ├── lib │ │ │ └── TAccomodationRate.ts │ │ └── manifest.ts │ └── index.ts │ └── MyRunningMap │ └── src │ └── lib │ └── geospatial │ └── GeospatialManager.ts ├── .npmignore ├── .gitignore ├── scripts └── examples │ └── clean.sh ├── .gitattributes ├── pnpm-workspace.yaml ├── tsconfig.build.examples.json ├── .github └── ISSUE_TEMPLATE │ └── generic-issue.md └── vitest.config.ts /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | c100k 2 | -------------------------------------------------------------------------------- /dist/esm/uc/def.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/ext.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/opi.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/sec.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/app/i18n.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/dt/DataType.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/i18n/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/icon/Icon.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/icon/index.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/Logger.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/Worker.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/ctx.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/auth.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/client.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/data.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/file.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/init.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/input.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/main.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/manager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/policy.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/server.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/settings.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/value.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/app/installer.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/app/manifest.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/dt/targets/rn.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/dt/targets/web.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/product/i18n.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/product/manifest.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/ClockManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/EmailManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/I18nManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/JWTManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/JobManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/LLMManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/XMLManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/flow.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/data-store.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/opi-layout.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/output-field.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/output-part.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/transporter.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/http/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/BufferManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/CryptoManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/FormDataBuilder.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/HTTPAPICaller.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/PromptManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/shared.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/async/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/esm/srcImporter.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/streams/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /examples/products/Basic/README.md: -------------------------------------------------------------------------------- 1 | # Basic 2 | -------------------------------------------------------------------------------- /dist/esm/products/Helper/index.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/EnvironmentManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/HTTPAPICallExecutor.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/ShellCommandExecutor.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/cli/CLIManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/common.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/loader.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/panel.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/touchable.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/concerns/Clearable.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/std/ExternalResourceManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/entrypoint.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server-node/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/ServerManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/target/node-mcp-server/types.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/AppTesterConfigurator.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppDocsEmitter.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/concerns/Initializable.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /examples/products/Playground/README.md: -------------------------------------------------------------------------------- 1 | # Playground 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/RequestHandler.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppTestReportEmitter.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppTestSuiteEmitter.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppTestSuiteRunner.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/i18n/consts.js: -------------------------------------------------------------------------------- 1 | export const I18N_DEFAULT_LANG = 'en'; 2 | -------------------------------------------------------------------------------- /dist/esm/target/lib/client/ServerClientManager.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /dist/esm/icon/index.d.ts: -------------------------------------------------------------------------------- 1 | export type { IconCode } from './Icon.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/uc/value.d.ts: -------------------------------------------------------------------------------- 1 | export type Value = T | T[] | null | undefined; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/http/nd-json.d.ts: -------------------------------------------------------------------------------- 1 | export declare const NDJSON_DATA_SEP = "\n"; 2 | -------------------------------------------------------------------------------- /dist/esm/index.babel.d.ts: -------------------------------------------------------------------------------- 1 | export { Plugin } from './utils/bundling/babel/plugin.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.babel.js: -------------------------------------------------------------------------------- 1 | export { Plugin } from './utils/bundling/babel/plugin.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.vite.d.ts: -------------------------------------------------------------------------------- 1 | export { Plugin } from './utils/bundling/vite/plugin.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.vite.js: -------------------------------------------------------------------------------- 1 | export { Plugin } from './utils/bundling/vite/plugin.js'; 2 | -------------------------------------------------------------------------------- /examples/products/Playground/server-nextjs/.gitignore: -------------------------------------------------------------------------------- 1 | .next 2 | .env 3 | *.sqlite 4 | -------------------------------------------------------------------------------- /dist/esm/index.webpack.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from './utils/bundling/webpack/loader.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.webpack.js: -------------------------------------------------------------------------------- 1 | export { default } from './utils/bundling/webpack/loader.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/std/Worker.d.ts: -------------------------------------------------------------------------------- 1 | export interface Worker { 2 | exec(input: I): O; 3 | } 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github 2 | dist-examples 3 | examples 4 | tmp 5 | .gitattributes 6 | biome.json 7 | -------------------------------------------------------------------------------- /dist/esm/utils/strings/humanize.d.ts: -------------------------------------------------------------------------------- 1 | export declare function humanize(value: string): string; 2 | -------------------------------------------------------------------------------- /dist/esm/app/i18n.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18n } from '../i18n/index.js'; 2 | export type AppI18n = I18n; 3 | -------------------------------------------------------------------------------- /dist/esm/index.std-jwt-manager-jose.d.ts: -------------------------------------------------------------------------------- 1 | export { JoseJWTManager } from './std/impl/JoseJWTManager.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.std-jwt-manager-jose.js: -------------------------------------------------------------------------------- 1 | export { JoseJWTManager } from './std/impl/JoseJWTManager.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.uc-data-store-knex.js: -------------------------------------------------------------------------------- 1 | export { KnexUCDataStore, } from './uc/impl/KnexUCDataStore.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/http/json.js: -------------------------------------------------------------------------------- 1 | export function toJSON(data) { 2 | return JSON.stringify(data); 3 | } 4 | -------------------------------------------------------------------------------- /dist/esm/utils/http/toJSON.js: -------------------------------------------------------------------------------- 1 | export function toJSON(data) { 2 | return JSON.stringify(data); 3 | } 4 | -------------------------------------------------------------------------------- /dist/esm/product/i18n.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18n } from '../i18n/index.js'; 2 | export type ProductI18n = I18n; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/concerns/Clearable.d.ts: -------------------------------------------------------------------------------- 1 | export interface Clearable { 2 | clear(): Promise; 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist-examples 2 | examples/**/test/reports 3 | examples/**/test/App.test.ts 4 | node_modules 5 | tmp 6 | -------------------------------------------------------------------------------- /dist/esm/uc/sec/consts.js: -------------------------------------------------------------------------------- 1 | export const DEFAULT_UC_SEC_AT = 'jwt'; 2 | export const DEFAULT_UC_SEC_PAKCT = 'on'; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/http/nd-json.js: -------------------------------------------------------------------------------- 1 | // https://github.com/ndjson/ndjson-spec 2 | export const NDJSON_DATA_SEP = '\n'; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/types.d.ts: -------------------------------------------------------------------------------- 1 | import type { Newable } from 'inversify'; 2 | export type Class = Newable; 3 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/index.d.ts: -------------------------------------------------------------------------------- 1 | export { I18n } from './src/i18n.js'; 2 | export { Manifest } from './src/manifest.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/src/i18n.d.ts: -------------------------------------------------------------------------------- 1 | import type { AppI18n } from '../../../index.js'; 2 | export declare const I18n: AppI18n; 3 | -------------------------------------------------------------------------------- /dist/esm/products/Helper/i18n.d.ts: -------------------------------------------------------------------------------- 1 | import type { AppI18n } from '../../index.js'; 2 | export declare const I18n: AppI18n; 3 | -------------------------------------------------------------------------------- /scripts/examples/clean.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | 3 | buildDir=dist-examples 4 | 5 | echo "Removing $buildDir" 6 | rm -rf $buildDir 7 | -------------------------------------------------------------------------------- /dist/esm/i18n/index.js: -------------------------------------------------------------------------------- 1 | export { I18N_DEFAULT_LANG } from './consts.js'; 2 | export { WordingManager } from './WordingManager.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/types/utility-types.js: -------------------------------------------------------------------------------- 1 | // Some Utility Types that are not provided by TypeScript out of the box 2 | export {}; 3 | -------------------------------------------------------------------------------- /dist/esm/dt/targets/rn.d.ts: -------------------------------------------------------------------------------- 1 | export type RNInputMode = 'decimal' | 'email' | 'none' | 'numeric' | 'search' | 'tel' | 'text' | 'url'; 2 | -------------------------------------------------------------------------------- /dist/esm/index.uc-data-store-knex.d.ts: -------------------------------------------------------------------------------- 1 | export { KnexUCDataStore, type KnexUCDataStoreSettings, } from './uc/impl/KnexUCDataStore.js'; 2 | -------------------------------------------------------------------------------- /dist/esm/products/Helper/manifest.js: -------------------------------------------------------------------------------- 1 | export const Manifest = { 2 | appReg: [{ name: 'Helper' }], 3 | name: 'Helper', 4 | }; 5 | -------------------------------------------------------------------------------- /dist/esm/utils/async/types.d.ts: -------------------------------------------------------------------------------- 1 | export type AbortFunc = () => void; 2 | export type RegisterAbortFunc = (func: AbortFunc) => void; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/babel/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { type PluginObj } from '@babel/core'; 2 | export declare const Plugin: PluginObj; 3 | -------------------------------------------------------------------------------- /dist/esm/i18n/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18nLanguageCode } from './types.js'; 2 | export declare const I18N_DEFAULT_LANG: I18nLanguageCode; 3 | -------------------------------------------------------------------------------- /dist/esm/std/FSManager.js: -------------------------------------------------------------------------------- 1 | export const FSManagerItemInfoType = { 2 | DIR: 'DIR', 3 | FILE: 'FILE', 4 | OTHER: 'OTHER', 5 | }; 6 | -------------------------------------------------------------------------------- /dist/esm/target/lib/shared.d.ts: -------------------------------------------------------------------------------- 1 | export type AuthCookieName = 'auth'; 2 | export type PublicApiKeyHeaderName = 'X-API-Key' | (string & {}); 3 | -------------------------------------------------------------------------------- /dist/esm/uc/data.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Base interface all the use case data interfaces must extend 3 | */ 4 | export interface UCData { 5 | } 6 | -------------------------------------------------------------------------------- /dist/esm/utils/concerns/Initializable.d.ts: -------------------------------------------------------------------------------- 1 | export interface Initializable { 2 | init(): Promise; 3 | initSync(): void; 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindRN.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindRN(container: Container): void; 3 | -------------------------------------------------------------------------------- /dist/esm/app/installer.d.ts: -------------------------------------------------------------------------------- 1 | export interface AppInstaller { 2 | setupFixtures(): Promise; 3 | setupSeeds(): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/i18n/locales/de.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18nCoreTranslations } from '../types.js'; 2 | export declare const I18nDE: I18nCoreTranslations; 3 | -------------------------------------------------------------------------------- /dist/esm/i18n/locales/en.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18nCoreTranslations } from '../types.js'; 2 | export declare const I18nEN: I18nCoreTranslations; 3 | -------------------------------------------------------------------------------- /dist/esm/i18n/locales/es.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18nCoreTranslations } from '../types.js'; 2 | export declare const I18nES: I18nCoreTranslations; 3 | -------------------------------------------------------------------------------- /dist/esm/i18n/locales/fr.d.ts: -------------------------------------------------------------------------------- 1 | import type { I18nCoreTranslations } from '../types.js'; 2 | export declare const I18nFR: I18nCoreTranslations; 3 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/loader.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | export type RenderUCAutoExecLoader = () => ReactElement; 3 | -------------------------------------------------------------------------------- /dist/esm/uc/init.d.ts: -------------------------------------------------------------------------------- 1 | import type { Worker } from '../std/index.js'; 2 | export interface UCInit extends Worker> { 3 | } 4 | -------------------------------------------------------------------------------- /dist/esm/uc/settings/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCSettings } from '../settings.js'; 2 | export declare const UC_DEFAULT_SETTINGS: UCSettings; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindWeb.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindWeb(container: Container): void; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/container.d.ts: -------------------------------------------------------------------------------- 1 | import type { ContainerOptions } from 'inversify'; 2 | export declare const CONTAINER_OPTS: ContainerOptions; 3 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c100k/libmodulor/HEAD/examples/products/Playground/rn/assets/icon.png -------------------------------------------------------------------------------- /dist/esm/products/Helper/container.d.ts: -------------------------------------------------------------------------------- 1 | import { Container } from 'inversify'; 2 | declare const container: Container; 3 | export default container; 4 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server-node/stop.d.ts: -------------------------------------------------------------------------------- 1 | import type { Server } from './types.js'; 2 | export declare function stop(server: Server): Promise; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindNodeCLI.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindNodeCLI(container: Container): void; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindServer.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindServer(container: Container): void; 3 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c100k/libmodulor/HEAD/examples/products/Playground/rn/assets/favicon.png -------------------------------------------------------------------------------- /dist/esm/apps/Helper/index.js: -------------------------------------------------------------------------------- 1 | // Expose only what's necessary 2 | export { I18n } from './src/i18n.js'; 3 | export { Manifest } from './src/manifest.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/error/internal/NotAvailableError.d.ts: -------------------------------------------------------------------------------- 1 | export declare class NotAvailableError extends Error { 2 | constructor(calledFn: keyof T); 3 | } 4 | -------------------------------------------------------------------------------- /dist/esm/error/internal/NotImplementedError.d.ts: -------------------------------------------------------------------------------- 1 | export declare class NotImplementedError extends Error { 2 | constructor(calledFn: keyof T); 3 | } 4 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/funcs.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCPolicyOutput } from '../policy.js'; 2 | export declare function defaultUCPolicyOutput(): UCPolicyOutput; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindNodeCore.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindNodeCore(container: Container): void; 3 | -------------------------------------------------------------------------------- /examples/products/Playground/spa/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c100k/libmodulor/HEAD/examples/products/Playground/spa/public/favicon.png -------------------------------------------------------------------------------- /dist/esm/products/Helper/manifest.d.ts: -------------------------------------------------------------------------------- 1 | export declare const Manifest: { 2 | appReg: { 3 | name: "Helper"; 4 | }[]; 5 | name: string; 6 | }; 7 | -------------------------------------------------------------------------------- /dist/esm/target/lib/cli/renderer.d.ts: -------------------------------------------------------------------------------- 1 | export declare function print(line: string): void; 2 | export declare function printError(err: string | Error): void; 3 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCAutoExecLoader.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | export declare function UCAutoExecLoader(): ReactElement; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/http/types.d.ts: -------------------------------------------------------------------------------- 1 | export type HTTPDataEnvelope = 'form-data' | 'json' | 'query-params'; 2 | export type HTTPReqData = Record; 3 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/assets/splash-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c100k/libmodulor/HEAD/examples/products/Playground/rn/assets/splash-icon.png -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCAutoExecLoader.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | export declare function UCAutoExecLoader(): ReactElement; 3 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/c100k/libmodulor/HEAD/examples/products/Playground/rn/assets/adaptive-icon.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.cjs linguist-documentation 2 | *.mjs linguist-documentation 3 | *.css linguist-documentation 4 | *.mdx linguist-documentation 5 | *.sh linguist-vendored 6 | -------------------------------------------------------------------------------- /dist/esm/bundlers/vite/StripUCDLifecycleServerPlugin.d.ts: -------------------------------------------------------------------------------- 1 | import type { PluginOption } from 'vite'; 2 | export declare const StripUCDLifecycleServerPlugin: PluginOption; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindCloudflareWorker.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindCloudflareWorker(container: Container): void; 3 | -------------------------------------------------------------------------------- /dist/esm/product/index.js: -------------------------------------------------------------------------------- 1 | export { ProductUCsLoader } from './workers/ProductUCsLoader.js'; 2 | export { SyncProductUCsLoader, } from './workers/SyncProductUCsLoader.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/uc/auth/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCAuth } from '../auth.js'; 2 | export declare const FAKE_USER_ADMIN: UCAuth; 3 | export declare const FAKE_USER_REGULAR: UCAuth; 4 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/webpack/loader.d.ts: -------------------------------------------------------------------------------- 1 | import { type InputCode, type OutputCode } from '../funcs.js'; 2 | export default function loader(source: InputCode): OutputCode; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindProvider.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | export declare function bindProvider(container: Container, identifier: string): void; 3 | -------------------------------------------------------------------------------- /dist/esm/dt/targets/web.d.ts: -------------------------------------------------------------------------------- 1 | export type HTMLInputType = 'checkbox' | 'color' | 'date' | 'email' | 'file' | 'number' | 'password' | 'radio' | 'search' | 'text' | 'time' | 'url'; 2 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/vite/StripUCDLifecycleServerPlugin.d.ts: -------------------------------------------------------------------------------- 1 | import type { PluginOption } from 'vite'; 2 | export declare const StripUCDLifecycleServerPlugin: PluginOption; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/esm/srcImporter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../../dt/index.js'; 2 | export type SrcImporter = (path: FilePath) => Promise; 3 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter/markdown.d.ts: -------------------------------------------------------------------------------- 1 | export declare function pre(val: string | null | undefined): string; 2 | export declare function thead(cols: string[]): string; 3 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter/uc-summary.d.ts: -------------------------------------------------------------------------------- 1 | import type { OutputItem } from '../../UCDefASTParser.js'; 2 | export declare function ucSummary(item: OutputItem): string; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/strings/truncate.js: -------------------------------------------------------------------------------- 1 | export function truncate(value, length, ellipsis = '...') { 2 | return value.length > length ? value.slice(0, length) + ellipsis : value; 3 | } 4 | -------------------------------------------------------------------------------- /dist/esm/index.node-stricli-cli.js: -------------------------------------------------------------------------------- 1 | export { NodeStricliCLIManager } from './target/node-stricli-cli/NodeStricliCLIManager.js'; 2 | export { bindNodeCLI } from './utils/ioc/bindNodeCLI.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter/tech-summary.d.ts: -------------------------------------------------------------------------------- 1 | import { type OutputItem } from '../../UCDefASTParser.js'; 2 | export declare function techSummary(items: OutputItem[]): string; 3 | -------------------------------------------------------------------------------- /dist/esm/uc/UCOutputField.js: -------------------------------------------------------------------------------- 1 | export class UCOutputField { 2 | key; 3 | def; 4 | constructor(key, def) { 5 | this.key = key; 6 | this.def = def; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | minimumReleaseAge: 2880 2 | onlyBuiltDependencies: 3 | - '@biomejs/biome' 4 | - '@tailwindcss/oxide' 5 | - esbuild 6 | - sharp 7 | - sqlite3 8 | - workerd 9 | -------------------------------------------------------------------------------- /dist/esm/index.node-stricli-cli.d.ts: -------------------------------------------------------------------------------- 1 | export { NodeStricliCLIManager } from './target/node-stricli-cli/NodeStricliCLIManager.js'; 2 | export { bindNodeCLI } from './utils/ioc/bindNodeCLI.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/strings/truncate.d.ts: -------------------------------------------------------------------------------- 1 | import type { UIntQuantity } from '../../dt/index.js'; 2 | export declare function truncate(value: string, length: UIntQuantity, ellipsis?: string): string; 3 | -------------------------------------------------------------------------------- /dist/esm/error/funcs.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | export declare function throwCustomError(message: ErrorMessage, status: HTTPStatusNumber): never; 3 | -------------------------------------------------------------------------------- /dist/esm/index.node-test.js: -------------------------------------------------------------------------------- 1 | export { newNodeAppTester } from './testing/impl/newNodeAppTester.js'; 2 | export { SimpleAppTesterConfigurator } from './testing/impl/SimpleAppTesterConfigurator.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter/sequence-diagram.d.ts: -------------------------------------------------------------------------------- 1 | import type { OutputItem } from '../../UCDefASTParser.js'; 2 | export declare function ucSequenceDiagram(item: OutputItem): string; 3 | -------------------------------------------------------------------------------- /dist/esm/uc/file.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../dt/index.js'; 2 | export type UCFileInputFieldRefPrefix = '$ref:'; 3 | export type UCFileInputFieldRef = `${UCFileInputFieldRefPrefix}${FilePath}`; 4 | -------------------------------------------------------------------------------- /dist/esm/utils/http/toQueryParams.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPReqData } from './types.js'; 2 | export declare function toQueryParams(data: T | undefined | null, url: URL): Promise; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/strings/capitalize.d.ts: -------------------------------------------------------------------------------- 1 | export declare function capitalize(value: T): Capitalize; 2 | export declare function isCapitalized(value: string): value is Capitalize; 3 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/funcs.js: -------------------------------------------------------------------------------- 1 | export function defaultUCPolicyOutput() { 2 | const out = { 3 | // The stricter, the better for security 4 | allowed: false, 5 | }; 6 | return out; 7 | } 8 | -------------------------------------------------------------------------------- /examples/@types/global.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | namespace NodeJS { 3 | interface ProcessEnv { 4 | readonly NEXT_RUNTIME?: string; 5 | } 6 | } 7 | } 8 | 9 | export {}; 10 | -------------------------------------------------------------------------------- /tsconfig.build.examples.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": false, 4 | "outDir": "dist-examples" 5 | }, 6 | "extends": "./tsconfig.json", 7 | "include": ["examples"] 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/index.node-mcp.d.ts: -------------------------------------------------------------------------------- 1 | export { MCPServerBooter } from './target/lib/mcp-server/MCPServerBooter.js'; 2 | export { NodeLocalStdioMCPServerManager } from './target/node-mcp-server/NodeLocalStdioMCPServerManager.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/index.node-mcp.js: -------------------------------------------------------------------------------- 1 | export { MCPServerBooter } from './target/lib/mcp-server/MCPServerBooter.js'; 2 | export { NodeLocalStdioMCPServerManager } from './target/node-mcp-server/NodeLocalStdioMCPServerManager.js'; 3 | -------------------------------------------------------------------------------- /dist/esm/utils/http/toQueryParams.js: -------------------------------------------------------------------------------- 1 | import { appendData } from './appendData.js'; 2 | export async function toQueryParams(data, url) { 3 | await appendData(data, async (k, v) => url.searchParams.append(k, v)); 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/utils/strings/humanize.js: -------------------------------------------------------------------------------- 1 | export function humanize(value) { 2 | let res = value.replace(/([a-z])([A-Z])/g, '$1 $2').trim(); 3 | res = res.charAt(0).toUpperCase() + res.slice(1); 4 | return res; 5 | } 6 | -------------------------------------------------------------------------------- /dist/esm/utils/http/toFormData.js: -------------------------------------------------------------------------------- 1 | import { appendData } from './appendData.js'; 2 | export async function toFormData(data, fd, formDataBuilder) { 3 | await appendData(data, (k, v) => formDataBuilder.append(fd, k, v)); 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/utils/http/json.d.ts: -------------------------------------------------------------------------------- 1 | import type { JSONString } from '../../dt/index.js'; 2 | import type { HTTPReqData } from './types.js'; 3 | export declare function toJSON(data: T | undefined | null): JSONString; 4 | -------------------------------------------------------------------------------- /dist/esm/utils/http/toJSON.d.ts: -------------------------------------------------------------------------------- 1 | import type { JSONString } from '../../dt/index.js'; 2 | import type { HTTPReqData } from './types.js'; 3 | export declare function toJSON(data: T | undefined | null): JSONString; 4 | -------------------------------------------------------------------------------- /examples/apps/Strava/index.ts: -------------------------------------------------------------------------------- 1 | // Expose only what's necessary 2 | 3 | export { I18n } from './src/i18n.js'; 4 | export { Manifest } from './src/manifest.js'; 5 | export { CreateActivityUCD } from './src/ucds/CreateActivityUCD.js'; 6 | -------------------------------------------------------------------------------- /dist/esm/index.rn.d.ts: -------------------------------------------------------------------------------- 1 | export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js'; 2 | export { RNUCClientConfirmManager } from './uc/impl/RNUCClientConfirmManager.js'; 3 | export { bindRN } from './utils/ioc/bindRN.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/index.rn.js: -------------------------------------------------------------------------------- 1 | export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js'; 2 | export { RNUCClientConfirmManager } from './uc/impl/RNUCClientConfirmManager.js'; 3 | export { bindRN } from './utils/ioc/bindRN.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/std/ExternalResourceManager.d.ts: -------------------------------------------------------------------------------- 1 | export interface ExternalResourceManager { 2 | create(autoGenerate: boolean): Promise; 3 | delete(): Promise; 4 | exists(): Promise; 5 | name(): string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/target/node-core-cli/commands.d.ts: -------------------------------------------------------------------------------- 1 | import type { WordingManager } from '../../i18n/index.js'; 2 | import { type UC } from '../../uc/index.js'; 3 | export declare function showHelp(ucs: UC[], wordingManager: WordingManager): void; 4 | -------------------------------------------------------------------------------- /dist/esm/uc/sec/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCSecAuthType, UCSecPublicApiKeyCheckType } from '../sec.js'; 2 | export declare const DEFAULT_UC_SEC_AT: UCSecAuthType; 3 | export declare const DEFAULT_UC_SEC_PAKCT: UCSecPublicApiKeyCheckType; 4 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/typescript.d.ts: -------------------------------------------------------------------------------- 1 | import type { FileName } from '../../dt/index.js'; 2 | import type { InputCode, OutputCode } from './funcs.js'; 3 | export declare function transform(code: InputCode, fileName: FileName): OutputCode; 4 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/vite/plugin.d.ts: -------------------------------------------------------------------------------- 1 | export declare const Plugin: { 2 | name: string; 3 | transform: (this: import("rollup").TransformPluginContext, code: string, id: string) => { 4 | code: string; 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /dist/esm/utils/http/appendData.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPReqData } from './types.js'; 2 | export declare function appendData(data: T | undefined | null, func: (key: string, val: any) => Promise): Promise; 3 | -------------------------------------------------------------------------------- /examples/apps/Strava/src/lib/ActivityProcessor.ts: -------------------------------------------------------------------------------- 1 | import type { CreateActivityInput } from '../ucds/CreateActivityUCD.js'; 2 | 3 | export interface ActivityProcessor { 4 | dispatch(input: CreateActivityInput): Promise; 5 | } 6 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/src/lib/project.d.ts: -------------------------------------------------------------------------------- 1 | import type { FileName, Slug } from '../../../../dt/index.js'; 2 | export declare const PACKAGE_JSON: (name: Slug) => string; 3 | export declare function projectFiles(name: Slug): Map; 4 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TNumIndex.js: -------------------------------------------------------------------------------- 1 | import { TUInt } from '../base/TUInt.js'; 2 | export class TNumIndex extends TUInt { 3 | tName() { 4 | return 'NumIndex'; 5 | } 6 | example() { 7 | return 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/uc/settings/consts.js: -------------------------------------------------------------------------------- 1 | export const UC_DEFAULT_SETTINGS = { 2 | uc_data_store_ucs_dataset_name: 'uc_executions', 3 | uc_disabled_use_cases: [], 4 | uc_file_ref_prefix: '$ref:', 5 | uc_files_directory_path: 'tmp', 6 | }; 7 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/lib/uc/AuthDataStore.ts: -------------------------------------------------------------------------------- 1 | import type { JWT } from '../../../../../../dist/esm/index.js'; 2 | 3 | export interface AuthDataStore { 4 | get(): Promise; 5 | set(jwt: JWT | null): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TURLPath.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TURLPath extends TString { 3 | tName() { 4 | return 'URLPath'; 5 | } 6 | example() { 7 | return '/posts/1'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/index.node-test.d.ts: -------------------------------------------------------------------------------- 1 | export { newNodeAppTester } from './testing/impl/newNodeAppTester.js'; 2 | export { SimpleAppTesterConfigurator } from './testing/impl/SimpleAppTesterConfigurator.js'; 3 | export type { TestData } from './testing/index.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/uc/output.js: -------------------------------------------------------------------------------- 1 | export function buildSingleItemOutput(item) { 2 | return { 3 | parts: { 4 | _0: { 5 | items: [item], 6 | total: 1, 7 | }, 8 | }, 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/utils/numbers/fmt.d.ts: -------------------------------------------------------------------------------- 1 | import type { UIntQuantity } from '../../dt/index.js'; 2 | import { type Unit } from './units.js'; 3 | export declare function fmt(value: number, unit?: Unit | undefined, decimalsCount?: UIntQuantity | undefined): string; 4 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TBarCode.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TBarCode extends TString { 3 | tName() { 4 | return 'BarCode'; 5 | } 6 | example() { 7 | return '3046920029759'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUIntDuration.js: -------------------------------------------------------------------------------- 1 | import { TUInt } from '../base/TUInt.js'; 2 | export class TUIntDuration extends TUInt { 3 | tName() { 4 | return 'UIntDuration'; 5 | } 6 | example() { 7 | return 3600; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUIntQuantity.js: -------------------------------------------------------------------------------- 1 | import { TUInt } from '../base/TUInt.js'; 2 | export class TUIntQuantity extends TUInt { 3 | tName() { 4 | return 'UIntQuantity'; 5 | } 6 | example() { 7 | return 10; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUsername.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TUsername extends TString { 3 | tName() { 4 | return 'Username'; 5 | } 6 | example() { 7 | return 'dmorgan'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/apps/Toolbox/src/lib/geocoding/GeocodingManager.ts: -------------------------------------------------------------------------------- 1 | import type { Address, Geolocation } from '../../../../../../dist/esm/index.js'; 2 | 3 | export interface GeocodingManager { 4 | geocode(address: Address): Promise; 5 | } 6 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TCompanyName.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TCompanyName extends TString { 3 | tName() { 4 | return 'CompanyName'; 5 | } 6 | example() { 7 | return 'Google'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFileName.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TFileName extends TString { 3 | tName() { 4 | return 'FileName'; 5 | } 6 | example() { 7 | return 'picture.png'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/index.nextjs.d.ts: -------------------------------------------------------------------------------- 1 | export { NextJSAPIRouteHandler } from './target/nextjs-server/NextJSAPIRouteHandler.js'; 2 | export { NextJSServerManager } from './target/nextjs-server/NextJSServerManager.js'; 3 | export { bindServer } from './utils/ioc/bindServer.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/index.nextjs.js: -------------------------------------------------------------------------------- 1 | export { NextJSAPIRouteHandler } from './target/nextjs-server/NextJSAPIRouteHandler.js'; 2 | export { NextJSServerManager } from './target/nextjs-server/NextJSServerManager.js'; 3 | export { bindServer } from './utils/ioc/bindServer.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormFieldErr.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCFormFieldErrProps } from '../lib/react/form.js'; 3 | export declare function UCFormFieldErr({ errMsg, }: UCFormFieldErrProps): ReactElement | null; 4 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldErr.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCFormFieldErrProps } from '../lib/react/form.js'; 3 | export declare function UCFormFieldErr({ errMsg, }: UCFormFieldErrProps): ReactElement | null; 4 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/container.js: -------------------------------------------------------------------------------- 1 | export const CONTAINER_OPTS = { 2 | /** 3 | * Allows us to avoid binding concrete classes 4 | * 5 | * @see https://inversify.io/docs/fundamentals/binding/#autobinding 6 | */ 7 | autobind: true, 8 | }; 9 | -------------------------------------------------------------------------------- /examples/products/Playground/spa/components/UCAutoExecLoader.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | 3 | import Loader from './Loader.js'; 4 | 5 | export default function UCAutoExecLoader(): ReactElement { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { ServerManagerSettings } from './ServerManager.js'; 2 | /** 3 | * @see TARGET_DEFAULT_SERVER_CLIENT_MANAGER_SETTINGS 4 | */ 5 | export declare const TARGET_DEFAULT_SERVER_MANAGER_SETTINGS: ServerManagerSettings; 6 | -------------------------------------------------------------------------------- /dist/esm/testing/utils.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath, UIntDuration } from '../dt/index.js'; 2 | export type TestData = { 3 | i: I; 4 | o: O; 5 | }[]; 6 | export declare function awaitForSrcImport(path: FilePath, timeoutInMs?: UIntDuration): Promise; 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEmoji.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type Emoji = string; 4 | export declare class TEmoji extends TString { 5 | tName(): TName; 6 | example(): Emoji; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFileMimeType.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TFileMimeType extends TString { 3 | tName() { 4 | return 'FileMimeType'; 5 | } 6 | example() { 7 | return 'image/png'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFreeTextShort.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TFreeTextShort extends TString { 3 | tName() { 4 | return 'FreeTextShort'; 5 | } 6 | example() { 7 | return 'Papillon'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TJobTitle.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TJobTitle extends TString { 3 | tName() { 4 | return 'JobTitle'; 5 | } 6 | example() { 7 | return 'Senior Software Engineer'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/error/internal/NotCallableError.d.ts: -------------------------------------------------------------------------------- 1 | export type NotCallableErrorReason = 'async-only' | 'sync-only'; 2 | export declare class NotCallableError extends Error { 3 | constructor(calledFn: keyof T, callableFn: keyof T, reason: NotCallableErrorReason); 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TNumIndex.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TUInt, type UInt } from '../base/TUInt.js'; 3 | export type NumIndex = UInt; 4 | export declare class TNumIndex extends TUInt { 5 | tName(): TName; 6 | example(): NumIndex; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/uc/io/output/AggregateOutput.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCOPIBase } from '../../opi.js'; 2 | import type { UCOutputDef } from '../../output.js'; 3 | export interface AggregateOPI0 extends UCOPIBase { 4 | } 5 | export declare const AggregateOutputDef: UCOutputDef; 6 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TAddress.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type Address = string; 4 | export declare class TAddress extends TString
{ 5 | tName(): TName; 6 | example(): Address; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TBarCode.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type BarCode = string; 4 | export declare class TBarCode extends TString { 5 | tName(): TName; 6 | example(): BarCode; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TURLPath.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type URLPath = string; 4 | export declare class TURLPath extends TString { 5 | tName(): TName; 6 | example(): URLPath; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/index.node-hono.js: -------------------------------------------------------------------------------- 1 | export { buildHandler, init, mountHandler, toReq, toRes, } from './target/lib/server-hono/funcs.js'; 2 | export { NodeHonoServerManager } from './target/node-hono-server/NodeHonoServerManager.js'; 3 | export { bindServer } from './utils/ioc/bindServer.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NoopXMLManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { XMLManager, XMLManagerParseOpts, XMLManagerRawXML } from '../XMLManager.js'; 2 | export declare class NoopXMLManager implements XMLManager { 3 | parse(_xml: XMLManagerRawXML, _opts?: XMLManagerParseOpts): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/target/lib/client/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { ServerClientManagerSettings } from './ServerClientManager.js'; 2 | /** 3 | * @see TARGET_DEFAULT_SERVER_MANAGER_SETTINGS 4 | */ 5 | export declare const TARGET_DEFAULT_SERVER_CLIENT_MANAGER_SETTINGS: ServerClientManagerSettings; 6 | -------------------------------------------------------------------------------- /dist/esm/utils/http/query-params.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPReqData } from './types.js'; 2 | export declare function fromQueryParams(url: URL): Promise; 3 | export declare function toQueryParams(data: T | undefined | null, url: URL): Promise; 4 | -------------------------------------------------------------------------------- /examples/products/Playground/server-nextjs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /examples/products/Playground/server-nextjs/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import type { ReactElement } from 'react'; 4 | 5 | import Root from '../../../spa/components/Root.js'; 6 | 7 | export default function Page(): ReactElement { 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TExternalServiceId.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TExternalServiceId extends TString { 3 | tName() { 4 | return 'ExternalServiceId'; 5 | } 6 | example() { 7 | return 'ZNHD34AQW4CV7'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFileName.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type FileName = string; 4 | export declare class TFileName extends TString { 5 | tName(): TName; 6 | example(): FileName; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TJobTitle.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type JobTitle = string; 4 | export declare class TJobTitle extends TString { 5 | tName(): TName; 6 | example(): JobTitle; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUsername.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type Username = string; 4 | export declare class TUsername extends TString { 5 | tName(): TName; 6 | example(): Username; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/index.node-hono.d.ts: -------------------------------------------------------------------------------- 1 | export { buildHandler, init, mountHandler, toReq, toRes, } from './target/lib/server-hono/funcs.js'; 2 | export { NodeHonoServerManager } from './target/node-hono-server/NodeHonoServerManager.js'; 3 | export { bindServer } from './utils/ioc/bindServer.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NodeFormDataBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { FormDataBuilder, FormDataBuilderVal } from '../FormDataBuilder.js'; 2 | export declare class NodeFormDataBuilder implements FormDataBuilder { 3 | append(fd: FormData, key: string, val: FormDataBuilderVal): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/utils/http/status.js: -------------------------------------------------------------------------------- 1 | export function isError(status) { 2 | return status >= 400; 3 | } 4 | export function isClientError(status) { 5 | return status >= 400 && status < 500; 6 | } 7 | export function isServerError(status) { 8 | return status >= 500; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TAddress.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TAddress extends TString { 3 | tName() { 4 | return 'Address'; 5 | } 6 | example() { 7 | return '55 Rue du Faubourg Saint-Honoré, 75008 Paris'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/std/impl/SimpleFormDataBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { FormDataBuilder, FormDataBuilderVal } from '../FormDataBuilder.js'; 2 | export declare class SimpleFormDataBuilder implements FormDataBuilder { 3 | append(fd: FormData, key: string, val: FormDataBuilderVal): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/babel.config.esm-bridge.js: -------------------------------------------------------------------------------- 1 | import { createRequire } from 'node:module'; 2 | 3 | const require = createRequire(import.meta.url); 4 | const { Plugin } = require('../../../../dist/esm/index.babel.js'); 5 | const bridge = { Plugin }; 6 | 7 | export default bridge; 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TCSS.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type CSS = string; 4 | export declare class TCSS extends TString { 5 | tName(): TName; 6 | example(): CSS; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUIntDuration.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TUInt, type UInt } from '../base/TUInt.js'; 3 | export type UIntDuration = UInt; 4 | export declare class TUIntDuration extends TUInt { 5 | tName(): TName; 6 | example(): UIntDuration; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUIntQuantity.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TUInt, type UInt } from '../base/TUInt.js'; 3 | export type UIntQuantity = UInt; 4 | export declare class TUIntQuantity extends TUInt { 5 | tName(): TName; 6 | example(): UIntQuantity; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NodePromptManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { PromptManager, PromptManagerPromptOpts } from '../PromptManager.js'; 2 | export declare class NodePromptManager implements PromptManager { 3 | prompt(invite: string, opts?: PromptManagerPromptOpts): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/utils/http/toFormData.d.ts: -------------------------------------------------------------------------------- 1 | import type { FormDataBuilder } from '../../std/index.js'; 2 | import type { HTTPReqData } from './types.js'; 3 | export declare function toFormData(data: T | undefined | null, fd: FormData, formDataBuilder: FormDataBuilder): Promise; 4 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TCompanyName.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type CompanyName = string; 4 | export declare class TCompanyName extends TString { 5 | tName(): TName; 6 | example(): CompanyName; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TErrorMessage.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TErrorMessage extends TString { 3 | tName() { 4 | return 'ErrorMessage'; 5 | } 6 | example() { 7 | return 'You are not allowed to access this resource'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THTML.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type HTML = string; 4 | export declare class THTML extends TString { 5 | tName(): TName; 6 | example(): HTML; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THostAddress.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type HostAddress = string; 4 | export declare class THostAddress extends TString { 5 | tName(): TName; 6 | example(): HostAddress; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TErrorMessage.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type ErrorMessage = string; 4 | export declare class TErrorMessage extends TString { 5 | tName(): TName; 6 | example(): ErrorMessage; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/error/ForbiddenError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | import { CustomError } from './CustomError.js'; 3 | export declare class ForbiddenError extends CustomError { 4 | httpStatus: HTTPStatusNumber; 5 | constructor(message?: ErrorMessage); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/error/NotFoundError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | import { CustomError } from './CustomError.js'; 3 | export declare class NotFoundError extends CustomError { 4 | httpStatus: HTTPStatusNumber; 5 | constructor(message?: ErrorMessage); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/target/lib/cli/CLIManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { AppUCsLoaderInput } from '../../../app/index.js'; 2 | export type Input = Pick; 3 | export type Output = void; 4 | export interface CLIManager { 5 | handleCommand(input: Input): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter/markdown.js: -------------------------------------------------------------------------------- 1 | export function pre(val) { 2 | if (!val) { 3 | return '-'; 4 | } 5 | return `\`${val}\``; 6 | } 7 | export function thead(cols) { 8 | return `|#|${cols.join('|')}| 9 | |---|${cols.map(() => '---').join('|')}|`; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TColor.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TColor extends TString { 3 | tName() { 4 | return 'Color'; 5 | } 6 | example() { 7 | return '#000000'; 8 | } 9 | htmlInputType() { 10 | return 'color'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFreeTextShort.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type FreeTextShort = string; 4 | export declare class TFreeTextShort extends TString { 5 | tName(): TName; 6 | example(): FreeTextShort; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/error/UnauthorizedError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | import { CustomError } from './CustomError.js'; 3 | export declare class UnauthorizedError extends CustomError { 4 | httpStatus: HTTPStatusNumber; 5 | constructor(message?: ErrorMessage); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/std/impl/FakeLLMManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { LLMManager, LLMManagerSendOpts, LLMManagerSendReq, LLMManagerSendRes } from '../LLMManager.js'; 2 | export declare class FakeLLMManager implements LLMManager { 3 | send(req: LLMManagerSendReq, opts?: LLMManagerSendOpts): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindProvider.js: -------------------------------------------------------------------------------- 1 | export function bindProvider(container, identifier) { 2 | container 3 | .bind(`Provider<${identifier}>`) 4 | .toProvider((context) => { 5 | return async (clazz) => { 6 | return context.get(clazz); 7 | }; 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/utils/terminal/fmt.d.ts: -------------------------------------------------------------------------------- 1 | export declare function fmtBold(s: string): string; 2 | export declare function fmtCommand(cmd: string, details: string | undefined, padEnd: number): string; 3 | export declare function fmtPadEndFor(s: string[]): number; 4 | export declare function fmtSection(s: string): string; 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TDateTimeFormat.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type DateTimeFormat = string; 4 | export declare class TDateTimeFormat extends TString { 5 | tName(): TName; 6 | example(): DateTimeFormat; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/error/IllegalArgumentError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | import { CustomError } from './CustomError.js'; 3 | export declare class IllegalArgumentError extends CustomError { 4 | httpStatus: HTTPStatusNumber; 5 | constructor(message?: ErrorMessage); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/error/InternalServerError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | import { CustomError } from './CustomError.js'; 3 | export declare class InternalServerError extends CustomError { 4 | httpStatus: HTTPStatusNumber; 5 | constructor(message?: ErrorMessage); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/ucMountingPoint.js: -------------------------------------------------------------------------------- 1 | import { formatFQUCName, parseFQUCName } from '../metadata.js'; 2 | export function ucMountingPoint(uc) { 3 | return formatFQUCName(uc.appManifest.name, uc.def.metadata.name); 4 | } 5 | export function parseUCMountingPoint(value) { 6 | return parseFQUCName(value); 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/utils/http/status.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPStatusNumber } from '../../dt/index.js'; 2 | export declare function isError(status: HTTPStatusNumber): boolean; 3 | export declare function isClientError(status: HTTPStatusNumber): boolean; 4 | export declare function isServerError(status: HTTPStatusNumber): boolean; 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TMarkdown.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type Markdown = string; 4 | export declare class TMarkdown extends TString { 5 | tName(): TName; 6 | example(): Markdown; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TSQLQuery.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type SQLQuery = string; 4 | export declare class TSQLQuery extends TString { 5 | tName(): TName; 6 | example(): SQLQuery; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/error/internal/NotAvailableError.js: -------------------------------------------------------------------------------- 1 | export class NotAvailableError extends Error { 2 | constructor(calledFn) { 3 | super(`Method ${calledFn.toString()} is not available`); 4 | this.name = 'NotAvailableError'; 5 | Object.setPrototypeOf(this, NotAvailableError.prototype); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/std/impl/FakeClockManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { DateISO8601 } from '../../dt/index.js'; 2 | import { StdDateClockManager } from './StdDateClockManager.js'; 3 | export declare const FAKE_CLOCK_MANAGER_NOW: DateISO8601; 4 | export declare class FakeClockManager extends StdDateClockManager { 5 | now(): Date; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/UCOutputFieldValueFragment.js: -------------------------------------------------------------------------------- 1 | import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime"; 2 | export function UCOutputFieldValueFragment({ f, value }) { 3 | const { def: { type }, } = f; 4 | type.assign(value); 5 | return _jsx(_Fragment, { children: type.fmt() }); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TCSS.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TCSS extends TString { 3 | tName() { 4 | return 'CSS'; 5 | } 6 | example() { 7 | return 'body { font-size: 30px; }'; 8 | } 9 | isPotentiallyLong() { 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/error/ForbiddenAsNotFoundError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | import { CustomError } from './CustomError.js'; 3 | export declare class ForbiddenAsNotFoundError extends CustomError { 4 | httpStatus: HTTPStatusNumber; 5 | constructor(message?: ErrorMessage); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/i18n/index.d.ts: -------------------------------------------------------------------------------- 1 | export { I18N_DEFAULT_LANG } from './consts.js'; 2 | export type { I18n, I18nCoreKey, I18nCoreTranslations, I18nEntry, I18nLanguageCode, I18nSource, I18nSourceSafe, I18nTranslation, I18nTranslationKey, } from './types.js'; 3 | export { WordingManager, type WordingManagerKey } from './WordingManager.js'; 4 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TExternalServiceId.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type ExternalServiceId = string; 4 | export declare class TExternalServiceId extends TString { 5 | tName(): TName; 6 | example(): ExternalServiceId; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THTML.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class THTML extends TString { 3 | tName() { 4 | return 'HTML'; 5 | } 6 | example() { 7 | return '

This is a paragraph

'; 8 | } 9 | isPotentiallyLong() { 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TJavaScript.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type JavaScript = string; 4 | export declare class TJavaScript extends TString { 5 | tName(): TName; 6 | example(): JavaScript; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TJavaScript.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TJavaScript extends TString { 3 | tName() { 4 | return 'JavaScript'; 5 | } 6 | example() { 7 | return '(()=>{})();'; 8 | } 9 | isPotentiallyLong() { 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/common.d.ts: -------------------------------------------------------------------------------- 1 | export interface Stylable { 2 | /** 3 | * Although it's not applicable to all the targets (e.g. React Native), we generalize `className` to make it more convenient for targets that accept it as it is a pretty common and standard property 4 | */ 5 | className?: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/src/ucds/DeleteGeneratedAppsTestsUCD.d.ts: -------------------------------------------------------------------------------- 1 | import { type UCDef } from '../../../../uc/index.js'; 2 | import { type AppInput } from '../lib/app.js'; 3 | export interface DeleteGeneratedAppsTestsInput extends AppInput { 4 | } 5 | export declare const DeleteGeneratedAppsTestsUCD: UCDef; 6 | -------------------------------------------------------------------------------- /dist/esm/error/internal/NotImplementedError.js: -------------------------------------------------------------------------------- 1 | export class NotImplementedError extends Error { 2 | constructor(calledFn) { 3 | super(`Method ${calledFn.toString()} is not implemented yet`); 4 | this.name = 'NotImplementedError'; 5 | Object.setPrototypeOf(this, NotImplementedError.prototype); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormFieldLabel.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldLabelProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldLabel({ f, }: UCFormFieldLabelProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldDesc.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldDescProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldDesc({ f, }: UCFormFieldDescProps): ReactElement | null; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldHelp.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldDescProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldHelp({ f, }: UCFormFieldDescProps): ReactElement | null; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldLabel.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldLabelProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldLabel({ f, }: UCFormFieldLabelProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindProduct.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | import type { ProductI18n } from '../../product/i18n.js'; 3 | import type { ProductManifest } from '../../product/index.js'; 4 | export declare function bindProduct(container: Container, productManifest: ProductManifest, productI18n: ProductI18n): void; 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFreeTextLong.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type FreeTextLong = string; 4 | export declare class TFreeTextLong extends TString { 5 | tName(): TName; 6 | example(): FreeTextLong; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TMarkdown.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TMarkdown extends TString { 3 | tName() { 4 | return 'Markdown'; 5 | } 6 | example() { 7 | return '**Some important stuff**'; 8 | } 9 | isPotentiallyLong() { 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TShellCommand.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type ShellCommand = string; 4 | export declare class TShellCommand extends TString { 5 | tName(): TName; 6 | example(): ShellCommand; 7 | isPotentiallyLong(): boolean; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TTimestamp.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TUInt, type UInt } from '../base/TUInt.js'; 3 | export type Timestamp = UInt; 4 | export declare class TTimestamp extends TUInt { 5 | tName(): TName; 6 | example(): Timestamp; 7 | fmt(ifNullOrUndefined?: string | undefined): string; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/std/impl/StaticSettingsManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { Settings, SettingsGetter, SettingsManager } from '../SettingsManager.js'; 2 | export declare class StaticSettingsManager implements SettingsManager { 3 | private settings; 4 | constructor(settings: S); 5 | get(): SettingsGetter; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/std/impl/StdDateClockManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { Timestamp } from '../../dt/index.js'; 2 | import type { ClockManager, ClockManagerDateKey } from '../ClockManager.js'; 3 | export declare class StdDateClockManager implements ClockManager { 4 | now(): Date; 5 | nowToKey(): ClockManagerDateKey; 6 | time(): Timestamp; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormFieldDesc.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldDescProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldDesc({ f, }: UCFormFieldDescProps): ReactElement | null; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormFieldHelp.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldDescProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldHelp({ f, }: UCFormFieldDescProps): ReactElement | null; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormField.d.ts: -------------------------------------------------------------------------------- 1 | import { type ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import { type UCFormFieldProps } from '../lib/react/form.js'; 4 | export declare function UCFormField({ disabled, execState, f, only, }: UCFormFieldProps): ReactElement; 5 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/UCAutoExecLoader.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | 3 | import { UCAutoExecLoader as UCAutoExecLoaderBase } from '../../../../../dist/esm/index.react-native-pure.js'; 4 | 5 | export default function UCAutoExecLoader(): ReactElement { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TYesNo.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type YesNo = 'N' | 'Y'; 4 | export declare class TYesNo extends TString { 5 | static readonly OPTIONS: YesNo[]; 6 | constructor(); 7 | tName(): TName; 8 | example(): YesNo; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormField.d.ts: -------------------------------------------------------------------------------- 1 | import { type ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import { type UCFormFieldProps } from '../lib/react/form.js'; 4 | export declare function UCFormField({ disabled, execState, f, only, }: UCFormFieldProps): ReactElement; 5 | -------------------------------------------------------------------------------- /examples/apps/Auth/index.ts: -------------------------------------------------------------------------------- 1 | // Expose only what's necessary 2 | 3 | export { I18n } from './src/i18n.js'; 4 | export { Manifest } from './src/manifest.js'; 5 | export { 6 | type SignInInput, 7 | type SignInOPI0, 8 | SignInUCD, 9 | } from './src/ucds/SignInUCD.js'; 10 | export { SignOutUCD } from './src/ucds/SignOutUCD.js'; 11 | -------------------------------------------------------------------------------- /dist/esm/index.web.js: -------------------------------------------------------------------------------- 1 | export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js'; 2 | export { WebCryptoManager } from './std/impl/WebCryptoManager.js'; 3 | export { WebFSManager } from './std/impl/WebFSManager.js'; 4 | export { htmlInputDef } from './target/lib/web/input.js'; 5 | export { bindWeb } from './utils/ioc/bindWeb.js'; 6 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/newNodeAppTester.d.ts: -------------------------------------------------------------------------------- 1 | import { type HostPort, type NumIndex } from '../../dt/index.js'; 2 | import { AppTester, type AppTesterInitArgs } from '../AppTester.js'; 3 | export declare function newNodeAppTester(serverPortRangeStart: HostPort, idx: NumIndex, args: Omit): Promise; 4 | -------------------------------------------------------------------------------- /examples/apps/MyTrip/src/lib/TAccomodationRate.ts: -------------------------------------------------------------------------------- 1 | import { TNumber } from '../../../../../dist/esm/index.js'; 2 | 3 | export type AccomodationRate = number; 4 | 5 | export class TAccomodationRate extends TNumber { 6 | constructor() { 7 | super({ 8 | max: 10, 9 | min: 0, 10 | }); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/Loader.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { ActivityIndicator } from 'react-native'; 3 | 4 | interface Props { 5 | size?: number; 6 | } 7 | 8 | export default function Loader({ size = 40 }: Props): ReactElement { 9 | return ; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/app/index.js: -------------------------------------------------------------------------------- 1 | export { AppManifestLoader } from './workers/AppManifestLoader.js'; 2 | export { AppSrcBrowser } from './workers/AppSrcBrowser.js'; 3 | export { AppSrcFilePathBuilder } from './workers/AppSrcFilePathBuilder.js'; 4 | export { AppUCsLoader, } from './workers/AppUCsLoader.js'; 5 | export { UCDefLoader } from './workers/UCDefLoader.js'; 6 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/src/lib/app.d.ts: -------------------------------------------------------------------------------- 1 | import { type DirPath } from '../../../../dt/index.js'; 2 | import type { UCInput, UCInputDef, UCInputFieldValue } from '../../../../uc/index.js'; 3 | export interface AppInput extends UCInput { 4 | appsPath: UCInputFieldValue; 5 | } 6 | export declare const AppInputFieldsDef: UCInputDef['fields']; 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TTransportType.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type TransportType = 'standard' | 'stream'; 4 | export declare class TTransportType extends TString { 5 | constructor(); 6 | tName(): TName; 7 | example(): TransportType; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/error/ForbiddenError.js: -------------------------------------------------------------------------------- 1 | import { CustomError } from './CustomError.js'; 2 | export class ForbiddenError extends CustomError { 3 | httpStatus = 403; 4 | constructor(message) { 5 | super(message ?? 'Forbidden'); 6 | this.name = 'ForbiddenError'; 7 | Object.setPrototypeOf(this, ForbiddenError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/error/NotFoundError.js: -------------------------------------------------------------------------------- 1 | import { CustomError } from './CustomError.js'; 2 | export class NotFoundError extends CustomError { 3 | httpStatus = 404; 4 | constructor(message) { 5 | super(message ?? 'Not found'); 6 | this.name = 'NotFoundError'; 7 | Object.setPrototypeOf(this, NotFoundError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NodeSpawnShellCommandExecutor.d.ts: -------------------------------------------------------------------------------- 1 | import type { ShellCommandExecutor, ShellCommandExecutorInput, ShellCommandExecutorOutput } from '../ShellCommandExecutor.js'; 2 | export declare class NodeSpawnShellCommandExecutor implements ShellCommandExecutor { 3 | exec({ bin, opts, }: ShellCommandExecutorInput): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/base/H1.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | interface Props { 5 | value: string; 6 | } 7 | 8 | export default function H1({ value }: Props): ReactElement { 9 | return {value}; 10 | } 11 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/base/H2.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | interface Props { 5 | value: string; 6 | } 7 | 8 | export default function H2({ value }: Props): ReactElement { 9 | return {value}; 10 | } 11 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/base/H3.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | interface Props { 5 | value: string; 6 | } 7 | 8 | export default function H3({ value }: Props): ReactElement { 9 | return {value}; 10 | } 11 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "emitDecoratorMetadata": true, 4 | "experimentalDecorators": true, 5 | "jsx": "preserve", 6 | "module": "NodeNext", 7 | "moduleResolution": "NodeNext", 8 | "strict": true 9 | }, 10 | "extends": "expo/tsconfig.base" 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/index.web.d.ts: -------------------------------------------------------------------------------- 1 | export { BufferLibBufferManager } from './std/impl/BufferLibBufferManager.js'; 2 | export { WebCryptoManager } from './std/impl/WebCryptoManager.js'; 3 | export { WebFSManager } from './std/impl/WebFSManager.js'; 4 | export { type HTMLInputDef, htmlInputDef } from './target/lib/web/input.js'; 5 | export { bindWeb } from './utils/ioc/bindWeb.js'; 6 | -------------------------------------------------------------------------------- /examples/products/Playground/manifest.ts: -------------------------------------------------------------------------------- 1 | import type { ProductManifest } from '../../../dist/esm/index.js'; 2 | 3 | export const Manifest = { 4 | appReg: [ 5 | { name: 'Auth' }, 6 | { name: 'Spotify' }, 7 | { name: 'Strava' }, 8 | { name: 'Trading' }, 9 | ], 10 | name: 'Playground', 11 | } satisfies ProductManifest; 12 | -------------------------------------------------------------------------------- /dist/esm/icon/Icon.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The icon code (e.g. https://fontawesome.com/v6/search?o=s&m=free) 3 | * 4 | * There are thousands of them so we voluntarily keep it a simple string and not a union type that would become unmaintainable. 5 | * 6 | * You can naturally use a different icon library as long as the renderer handles it. 7 | */ 8 | export type IconCode = string; 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TColor.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | export type Color = string; 5 | export declare class TColor extends TString { 6 | tName(): TName; 7 | example(): Color; 8 | htmlInputType(): HTMLInputType; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/std/XMLManager.d.ts: -------------------------------------------------------------------------------- 1 | export type XMLManagerRawXML = string; 2 | export interface XMLManagerParseOpts { 3 | attributeNamePrefix?: string; 4 | isArray?: (tagName: string) => boolean; 5 | isObject?: (tagName: string) => boolean; 6 | } 7 | export interface XMLManager { 8 | parse(xml: XMLManagerRawXML, opts?: XMLManagerParseOpts): Promise; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/uc/io/output/AggregateOutput.js: -------------------------------------------------------------------------------- 1 | import { TUUID } from '../../../dt/index.js'; 2 | export const AggregateOutputDef = { 3 | parts: { 4 | _0: { 5 | fields: { 6 | id: { 7 | key: 'id', 8 | type: new TUUID(), 9 | }, 10 | }, 11 | }, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /dist/esm/uc/io/input/AggregateInput.d.ts: -------------------------------------------------------------------------------- 1 | import { type UUID } from '../../../dt/index.js'; 2 | import type { UCInput, UCInputDef } from '../../input.js'; 3 | import { type UCInputFieldValue } from '../../input-field.js'; 4 | export interface AggregateInput extends UCInput { 5 | id: UCInputFieldValue; 6 | } 7 | export declare const AggregateInputDef: UCInputDef; 8 | -------------------------------------------------------------------------------- /dist/esm/utils/http/form-data.d.ts: -------------------------------------------------------------------------------- 1 | import type { FormDataBuilder } from '../../std/index.js'; 2 | import type { HTTPReqData } from './types.js'; 3 | export declare function fromFormData(fd: FormData): Promise; 4 | export declare function toFormData(data: T | undefined | null, fd: FormData, formDataBuilder: FormDataBuilder): Promise; 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPassword.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TPassword extends TString { 3 | tName() { 4 | return 'Password'; 5 | } 6 | example() { 7 | return 'fmUUNWXazWH4'; 8 | } 9 | htmlInputType() { 10 | return 'password'; 11 | } 12 | isSensitive() { 13 | return true; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dist/esm/error/UnauthorizedError.js: -------------------------------------------------------------------------------- 1 | import { CustomError } from './CustomError.js'; 2 | export class UnauthorizedError extends CustomError { 3 | httpStatus = 401; 4 | constructor(message) { 5 | super(message ?? 'Invalid credentials'); 6 | this.name = 'UnauthorizedError'; 7 | Object.setPrototypeOf(this, UnauthorizedError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/error/internal/NotCallableError.js: -------------------------------------------------------------------------------- 1 | export class NotCallableError extends Error { 2 | constructor(calledFn, callableFn, reason) { 3 | super(`Do not call ${calledFn.toString()}(). Call ${callableFn.toString()}() instead (reason : ${reason})`); 4 | this.name = 'NotCallableError'; 5 | Object.setPrototypeOf(this, NotCallableError.prototype); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/ucifcoIsForArray.d.ts: -------------------------------------------------------------------------------- 1 | import { UCInputFieldChangeOperator } from '../input-field.js'; 2 | /** 3 | * Check whether a {@link UCInputFieldChangeOperator} is for an array or not. 4 | * 5 | * @param op 6 | * @returns 7 | */ 8 | export declare function ucifcoIsForArray(op: UCInputFieldChangeOperator): op is UCInputFieldChangeOperator.ADD | UCInputFieldChangeOperator.REMOVE; 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TDateTimeFormat.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | // TODO : Validate this model with some simple heuristics. Do not make it too complicated, it's not really worth it. 3 | export class TDateTimeFormat extends TString { 4 | tName() { 5 | return 'DateTimeFormat'; 6 | } 7 | example() { 8 | return 'ccc LLL dd'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/error/IllegalArgumentError.js: -------------------------------------------------------------------------------- 1 | import { CustomError } from './CustomError.js'; 2 | export class IllegalArgumentError extends CustomError { 3 | httpStatus = 400; 4 | constructor(message) { 5 | super(message ?? 'Bad request'); 6 | this.name = 'IllegalArgumentError'; 7 | Object.setPrototypeOf(this, IllegalArgumentError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormFieldControl.d.ts: -------------------------------------------------------------------------------- 1 | import { type ReactElement } from 'react'; 2 | import { type DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldControlProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldControl({ disabled, errMsg, execState, f, onChange: onChangeBase, }: UCFormFieldControlProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCAutoExecLoader.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 3 | export function UCAutoExecLoader() { 4 | const { autoExecLoader } = useStyleContext(); 5 | return (_jsx("div", { className: autoExecLoader?.className, style: autoExecLoader?.style, children: "..." })); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldControl.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { type DataType } from '../../dt/index.js'; 3 | import type { UCFormFieldControlProps } from '../lib/react/form.js'; 4 | export declare function UCFormFieldControl({ disabled, errMsg, execState, f, onChange: onChangeBase, }: UCFormFieldControlProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/appendUCInputToURL.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UC } from '../UC.js'; 4 | export declare function appendUCInputToURL(uc: UC, url: URL): void; 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TApiKey.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TApiKey extends TString { 3 | tName() { 4 | return 'ApiKey'; 5 | } 6 | example() { 7 | return 'pk_bxa2HCdsT7CKwVSdem8fjS8rW'; 8 | } 9 | htmlInputType() { 10 | return 'password'; 11 | } 12 | isSensitive() { 13 | return true; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THostAddress.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | // TODO : Validate using IPv4, DomainName, etc. rules 3 | // But watch out, hostname can be as simple as "localhost" as well 4 | export class THostAddress extends TString { 5 | tName() { 6 | return 'HostAddress'; 7 | } 8 | example() { 9 | return '123.45.67.89'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/error/InternalServerError.js: -------------------------------------------------------------------------------- 1 | import { CustomError } from './CustomError.js'; 2 | export class InternalServerError extends CustomError { 3 | httpStatus = 500; 4 | constructor(message) { 5 | super(message ?? CustomError.ERROR_UNKNOWN); 6 | this.name = 'InternalServerError'; 7 | Object.setPrototypeOf(this, InternalServerError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/products/Helper/i18n.js: -------------------------------------------------------------------------------- 1 | import { I18n as HelperI18n } from '../../apps/Helper/index.js'; 2 | import { I18nEN } from '../../i18n/locales/en.js'; 3 | export const I18n = { 4 | en: { 5 | ...I18nEN, 6 | ...HelperI18n.en, 7 | p_desc: 'Helper to perform actions related to apps, use cases, etc.', 8 | p_slogan: 'A Helper to help you', 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /dist/esm/target/lib/client/consts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @see TARGET_DEFAULT_SERVER_MANAGER_SETTINGS 3 | */ 4 | export const TARGET_DEFAULT_SERVER_CLIENT_MANAGER_SETTINGS = { 5 | server_cookies_name_auth: 'auth', 6 | server_public_api_key: 'PublicApiKeyToBeChangedWhenDeploying', 7 | server_public_api_key_header_name: 'X-API-Key', 8 | server_public_url: 'http://localhost:7443', 9 | }; 10 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/funcs.d.ts: -------------------------------------------------------------------------------- 1 | import { type UCDef, type UCInput, type UCOPIBase } from '../../../uc/index.js'; 2 | export type ShouldNotMountReason = string; 3 | export declare function shouldMountUC(ucd: UCDef): ShouldNotMountReason | null; 4 | -------------------------------------------------------------------------------- /dist/esm/testing/uc-auth.js: -------------------------------------------------------------------------------- 1 | import { FAKE_USER_ADMIN, FAKE_USER_REGULAR, } from '../uc/index.js'; 2 | export const DEFAULT_UC_AUTH_SETTERS = [ 3 | 'ANONYMOUS', 4 | 'ADMIN', 5 | 'REGULAR', 6 | ]; 7 | export function defaultUCAuthSetters() { 8 | return { 9 | ADMIN: FAKE_USER_ADMIN, 10 | ANONYMOUS: null, 11 | REGULAR: FAKE_USER_REGULAR, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/uc/io/input/AggregateInput.js: -------------------------------------------------------------------------------- 1 | import { TUUID } from '../../../dt/index.js'; 2 | import { UCInputFieldFillingMode, } from '../../input-field.js'; 3 | export const AggregateInputDef = { 4 | fields: { 5 | id: { 6 | fillingMode: UCInputFieldFillingMode.AUTO_PRE, 7 | transient: true, 8 | type: new TUUID(), 9 | }, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /examples/products/Playground/spa/components/ErrMessage.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | 3 | import type { ErrorMessage } from '../../../../../dist/esm/index.js'; 4 | 5 | interface Props { 6 | errMsg: ErrorMessage; 7 | } 8 | 9 | export default function ErrMessage({ errMsg }: Props): ReactElement { 10 | return {errMsg}; 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TSlug.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type Slug = Lowercase; 4 | export declare class TSlug extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): Slug; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/error/ForbiddenAsNotFoundError.js: -------------------------------------------------------------------------------- 1 | import { CustomError } from './CustomError.js'; 2 | export class ForbiddenAsNotFoundError extends CustomError { 3 | httpStatus = 404; 4 | constructor(message) { 5 | super(message ?? 'Not found'); 6 | this.name = 'ForbiddenAsNotFoundError'; 7 | Object.setPrototypeOf(this, ForbiddenAsNotFoundError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/index.node-express.js: -------------------------------------------------------------------------------- 1 | export { buildHandler, init, mountHandler, toFile, toReq, toRes, } from './target/lib/server-express/funcs.js'; 2 | export { HelmetMiddlewareBuilder } from './target/lib/server-express/HelmetMiddlewareBuilder.js'; 3 | export { NodeExpressServerManager } from './target/node-express-server/NodeExpressServerManager.js'; 4 | export { bindServer } from './utils/ioc/bindServer.js'; 5 | -------------------------------------------------------------------------------- /dist/esm/product/index.d.ts: -------------------------------------------------------------------------------- 1 | export type { ProductI18n } from './i18n.js'; 2 | export type { ProductAppReg, ProductManifest, ProductName, ProductWording, } from './manifest.js'; 3 | export { ProductUCsLoader } from './workers/ProductUCsLoader.js'; 4 | export { type Input as SyncProductUCsLoaderInput, type Output as SyncProductUCsLoaderOutput, SyncProductUCsLoader, } from './workers/SyncProductUCsLoader.js'; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCAutoExecLoader.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { ActivityIndicator } from 'react-native'; 3 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 4 | export function UCAutoExecLoader() { 5 | const { autoExecLoader } = useStyleContext(); 6 | return _jsx(ActivityIndicator, { style: autoExecLoader?.style }); 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TDirPath.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type DirPath = string; 4 | export declare class TDirPath extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): DirPath; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/index.node-express.d.ts: -------------------------------------------------------------------------------- 1 | export { buildHandler, init, mountHandler, toFile, toReq, toRes, } from './target/lib/server-express/funcs.js'; 2 | export { HelmetMiddlewareBuilder } from './target/lib/server-express/HelmetMiddlewareBuilder.js'; 3 | export { NodeExpressServerManager } from './target/node-express-server/NodeExpressServerManager.js'; 4 | export { bindServer } from './utils/ioc/bindServer.js'; 5 | -------------------------------------------------------------------------------- /dist/esm/std/FormDataBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { FileMimeType, FileName, FilePath } from '../dt/index.js'; 2 | export interface BlobLike { 3 | name: FileName; 4 | type: FileMimeType; 5 | uri: FilePath; 6 | } 7 | export type FormDataBuilderVal = BlobLike | string; 8 | export interface FormDataBuilder { 9 | append(fd: FormData, key: string, val: FormDataBuilderVal): Promise; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/funcs.js: -------------------------------------------------------------------------------- 1 | import { UCExecMode, } from '../../../uc/index.js'; 2 | export function shouldMountUC(ucd) { 3 | const { lifecycle: { server }, } = ucd; 4 | if (typeof server !== 'object') { 5 | return 'no ucd.lifecycle.server'; 6 | } 7 | if (server.execMode === UCExecMode.AUTO) { 8 | return 'execMode is AUTO'; 9 | } 10 | return null; 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCOutputFieldValue.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCOPIBase } from '../../uc/index.js'; 4 | import { type Props } from '../lib/react/UCOutputFieldValueFragment.js'; 5 | export declare function UCOutputFieldValue(props: Props): ReactElement; 6 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TApiKey.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | export type ApiKey = string; 5 | export declare class TApiKey extends TString { 6 | tName(): TName; 7 | example(): ApiKey; 8 | htmlInputType(): HTMLInputType; 9 | isSensitive(): boolean; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TYear.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TUInt, type TUIntConstraints, type UInt } from '../base/TUInt.js'; 3 | export type Year = UInt; 4 | export declare class TYear extends TUInt { 5 | constructor(constraints?: TUIntConstraints); 6 | tName(): TName; 7 | example(): Year; 8 | fmt(ifNullOrUndefined?: string | undefined): string; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/std/ClockManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { Timestamp } from '../dt/index.js'; 2 | /** 3 | * A key representing the date (e.g. 20241125141012) 4 | * 5 | * Useful to set a prefix when naming files in order to sort them 6 | */ 7 | export type ClockManagerDateKey = string; 8 | export interface ClockManager { 9 | now(): Date; 10 | nowToKey(): ClockManagerDateKey; 11 | time(): Timestamp; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCOutputFieldValue.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../dt/index.js'; 3 | import type { UCOPIBase } from '../../uc/index.js'; 4 | import { type Props } from '../lib/react/UCOutputFieldValueFragment.js'; 5 | export declare function UCOutputFieldValue(props: Props): ReactElement; 6 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FSManager } from '../../std/index.js'; 2 | import type { AppDocsEmitter, Input, Output } from '../workers/AppDocsEmitter.js'; 3 | export declare class SimpleAppDocsEmitter implements AppDocsEmitter { 4 | private fsManager; 5 | constructor(fsManager: FSManager); 6 | exec({ appPath, ucDefSourcesCheckerOutput, }: Input): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/testing/utils.js: -------------------------------------------------------------------------------- 1 | const ERR_SRC_IMPORTER_TIMEOUT = (path) => `Importing ${path} did not resolve within 5000ms. Check for any circular dependencies.`; 2 | export function awaitForSrcImport(path, timeoutInMs = 5000) { 3 | return new Promise((_resolve, reject) => { 4 | setTimeout(() => { 5 | reject(new Error(ERR_SRC_IMPORTER_TIMEOUT(path))); 6 | }, timeoutInMs); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/recIs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check whether a data store records corresponds to the passed type 3 | * 4 | * Useful when fetching multiple records at once and looping over them to build an aggregate 5 | * 6 | * @param rec 7 | * @param name 8 | * @returns 9 | */ 10 | export const recIs = ( 11 | // biome-ignore lint/suspicious/noExplicitAny: can be anything 12 | rec, name) => rec.name === name; 13 | -------------------------------------------------------------------------------- /dist/esm/uc/auth.d.ts: -------------------------------------------------------------------------------- 1 | import type { PersonFirstname, PersonInitials, UUID } from '../dt/index.js'; 2 | export type UCAuthRole = 'admin' | 'regular' | (string & {}); 3 | export interface UCAuth { 4 | organization: { 5 | id: UUID; 6 | }; 7 | role: UCAuthRole; 8 | user: { 9 | firstname: PersonFirstname; 10 | id: UUID; 11 | initials: PersonInitials; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /examples/apps/MyRunningMap/src/lib/geospatial/GeospatialManager.ts: -------------------------------------------------------------------------------- 1 | import type { Geolocation } from '../../../../../../dist/esm/index.js'; 2 | 3 | export interface GeospatialManagerDistance { 4 | u: 'km'; 5 | v: number; 6 | } 7 | 8 | export interface GeospatialManager { 9 | distanceBetween( 10 | p1: Geolocation, 11 | p2: Geolocation, 12 | ): GeospatialManagerDistance; 13 | } 14 | -------------------------------------------------------------------------------- /examples/apps/MyTrip/index.ts: -------------------------------------------------------------------------------- 1 | // Expose only what's necessary 2 | 3 | export { I18n } from './src/i18n.js'; 4 | export type { AccomodationRepository } from './src/lib/AccomodationRepository.js'; 5 | export { InMemoryAccomodationRepository } from './src/lib/InMemoryAccomodationRepository.js'; 6 | export { Manifest } from './src/manifest.js'; 7 | export { SearchAccomodationUCD } from './src/ucds/SearchAccomodationUCD.js'; 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPassword.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | export type Password = string; 5 | export declare class TPassword extends TString { 6 | tName(): TName; 7 | example(): Password; 8 | htmlInputType(): HTMLInputType; 9 | isSensitive(): boolean; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/error/CustomError.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorMessage, HTTPStatusNumber } from '../dt/index.js'; 2 | export interface ServerError { 3 | message: ErrorMessage; 4 | } 5 | export declare abstract class CustomError extends Error { 6 | static readonly ERROR_UNKNOWN: ErrorMessage; 7 | abstract httpStatus: HTTPStatusNumber; 8 | constructor(message?: ErrorMessage); 9 | toObj(): ServerError; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NoopHTTPAPICallExecutorAgentBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPAPICallExecutorAgentBuilder, HTTPAPICallExecutorAgentBuilderInput, HTTPAPICallExecutorAgentBuilderOutput } from '../HTTPAPICallExecutor.js'; 2 | export declare class NoopHTTPAPICallExecutorAgentBuilder implements HTTPAPICallExecutorAgentBuilder { 3 | exec(_input: HTTPAPICallExecutorAgentBuilderInput): HTTPAPICallExecutorAgentBuilderOutput; 4 | } 5 | -------------------------------------------------------------------------------- /examples/apps/Strava/src/manifest.ts: -------------------------------------------------------------------------------- 1 | import type { AppManifest } from '../../../../dist/esm/index.js'; 2 | 3 | export const Manifest = { 4 | languageCodes: ['en', 'fr'], 5 | name: 'Strava', 6 | ucReg: { 7 | CreateActivity: { 8 | action: 'Create', 9 | icon: 'circle-plus', 10 | name: 'CreateActivity', 11 | }, 12 | }, 13 | } satisfies AppManifest; 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TIPv4.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type IPv4 = `${number}.${number}.${number}.${number}`; 4 | export declare class TIPv4 extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): IPv4; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TJSONString.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { Validation } from '../Validation.js'; 4 | export type JSONString = string; 5 | export declare class TJSONString extends TString { 6 | tName(): TName; 7 | example(): JSONString; 8 | isPotentiallyLong(): boolean; 9 | validate(): Validation; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TQRCode.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type QRCode = `data:image/png;base64,${string}`; 4 | export declare class TQRCode extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): QRCode; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TSQLQuery.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | // TODO : Add basic syntax validation (without adding any dependencies) 3 | export class TSQLQuery extends TString { 4 | tName() { 5 | return 'SQLQuery'; 6 | } 7 | example() { 8 | return 'select id, name from users limit 10;'; 9 | } 10 | isPotentiallyLong() { 11 | return true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TShellCommand.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | // TODO : Add basic syntax validation (without adding any dependencies) 3 | export class TShellCommand extends TString { 4 | tName() { 5 | return 'ShellCommand'; 6 | } 7 | example() { 8 | return 'sudo systemctl restart nginx'; 9 | } 10 | isPotentiallyLong() { 11 | return true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/ucifcoIsForArray.js: -------------------------------------------------------------------------------- 1 | import { UCInputFieldChangeOperator } from '../input-field.js'; 2 | /** 3 | * Check whether a {@link UCInputFieldChangeOperator} is for an array or not. 4 | * 5 | * @param op 6 | * @returns 7 | */ 8 | export function ucifcoIsForArray(op) { 9 | return [ 10 | UCInputFieldChangeOperator.ADD, 11 | UCInputFieldChangeOperator.REMOVE, 12 | ].includes(op); 13 | } 14 | -------------------------------------------------------------------------------- /examples/apps/MyTrip/src/manifest.ts: -------------------------------------------------------------------------------- 1 | import type { AppManifest } from '../../../../dist/esm/index.js'; 2 | 3 | export const Manifest = { 4 | languageCodes: ['en'], 5 | name: 'MyTrip', 6 | ucReg: { 7 | SearchAccomodation: { 8 | action: 'Search', 9 | icon: 'magnifying-glass', 10 | name: 'SearchAccomodation', 11 | }, 12 | }, 13 | } satisfies AppManifest; 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THostPort.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TUInt, type TUIntConstraints, type UInt } from '../base/TUInt.js'; 3 | export type HostPort = UInt; 4 | export declare class THostPort extends TUInt { 5 | constructor(constraints?: TUIntConstraints); 6 | tName(): TName; 7 | example(): HostPort; 8 | fmt(ifNullOrUndefined?: string | undefined): string; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server-node/types.d.ts: -------------------------------------------------------------------------------- 1 | import type http from 'node:http'; 2 | import type https from 'node:https'; 3 | import type { ServerManagerSettings } from '../server/ServerManager.js'; 4 | export type Server = http.Server | https.Server; 5 | export type ListenSettings = Pick; 6 | export type StopSettings = Pick; 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TUUID.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type UUID = `${string}-${string}-${string}-${string}-${string}`; 4 | export declare class TUUID extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): UUID; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleAppDocsEmitter/SimpleAppDocsEmitter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FSManager } from '../../../std/index.js'; 2 | import type { AppDocsEmitter, Input, Output } from '../../workers/AppDocsEmitter.js'; 3 | export declare class SimpleAppDocsEmitter implements AppDocsEmitter { 4 | private fsManager; 5 | constructor(fsManager: FSManager); 6 | exec({ appPath, ucDefSourcesCheckerOutput, }: Input): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindProduct.js: -------------------------------------------------------------------------------- 1 | export function bindProduct(container, productManifest, productI18n) { 2 | // Using rebind because these are already bound by default in {@link bindCommon}. 3 | // The goal is to make it easier to get started for a user. 4 | container.rebindSync('I18n').toConstantValue(productI18n); 5 | container 6 | .rebindSync('ProductManifest') 7 | .toConstantValue(productManifest); 8 | } 9 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/ErrMessage.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | import type { ErrorMessage } from '../../../../../dist/esm/index.js'; 5 | 6 | interface Props { 7 | errMsg: ErrorMessage; 8 | } 9 | 10 | export default function ErrMessage({ errMsg }: Props): ReactElement { 11 | return {errMsg}; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TGeolocation.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TObject } from '../base/TObject.js'; 3 | import type { Validation } from '../Validation.js'; 4 | export type Geolocation = { 5 | lat: number; 6 | lng: number; 7 | }; 8 | export declare class TGeolocation extends TObject { 9 | tName(): TName; 10 | example(): Geolocation; 11 | validate(): Validation; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/testing/index.js: -------------------------------------------------------------------------------- 1 | export { DEFAULT_APP_TESTER_OPTS, } from './opts.js'; 2 | export { UCDataStoreTester } from './UCDataStoreTester.js'; 3 | export { DEFAULT_UC_AUTH_SETTERS, defaultUCAuthSetters, } from './uc-auth.js'; 4 | export { allWithExamples, DEFAULT_UC_INPUT_FILLERS, defaultUCInputFillers, onlyMandatoryWithExamples, onlySetProgrammaticallyWithExamples, } from './uc-input.js'; 5 | export { awaitForSrcImport } from './utils.js'; 6 | -------------------------------------------------------------------------------- /dist/esm/utils/strings/capitalize.js: -------------------------------------------------------------------------------- 1 | export function capitalize(value) { 2 | const firstChar = value[0]; 3 | if (!firstChar) { 4 | return ''; 5 | } 6 | return (firstChar.toUpperCase() + value.slice(1)); 7 | } 8 | export function isCapitalized(value) { 9 | const firstChar = value[0]; 10 | if (!firstChar) { 11 | return true; 12 | } 13 | return firstChar === firstChar.toUpperCase(); 14 | } 15 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEncryptionKey.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | export type EncryptionKey = string; 5 | export declare class TEncryptionKey extends TString { 6 | tName(): TName; 7 | example(): EncryptionKey; 8 | htmlInputType(): HTMLInputType; 9 | isSensitive(): boolean; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/funcs.d.ts: -------------------------------------------------------------------------------- 1 | import type { FileName } from '../../dt/index.js'; 2 | export type InputCode = string; 3 | export type OutputCode = string; 4 | export type StrippableFileExtension = 'js' | 'ts'; 5 | export declare function isFileEligible(fileName: FileName | undefined, exts: StrippableFileExtension[]): boolean; 6 | export declare function assertTransformedCorrectly(transformed: OutputCode, fileName: FileName | undefined): void; 7 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/src/lib/app.js: -------------------------------------------------------------------------------- 1 | import { APPS_ROOT_PATH } from '../../../../convention.js'; 2 | import { TDirPath } from '../../../../dt/index.js'; 3 | export const AppInputFieldsDef = { 4 | appsPath: { 5 | cardinality: { 6 | min: 0, 7 | }, 8 | type: new TDirPath() 9 | .setDefaultValue(APPS_ROOT_PATH.join('/')) 10 | .setExamples([APPS_ROOT_PATH.join('/')]), 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THTTPMethod.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type HTTPMethod = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE'; 4 | export declare class THTTPMethod extends TString { 5 | static readonly OPTIONS: HTTPMethod[]; 6 | constructor(); 7 | tName(): TName; 8 | example(): HTTPMethod; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonInitials.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type PersonInitials = Uppercase; 4 | export declare class TPersonInitials extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): PersonInitials; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonLastname.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type PersonLastname = Capitalize; 4 | export declare class TPersonLastname extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): PersonLastname; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/error/CustomError.js: -------------------------------------------------------------------------------- 1 | export class CustomError extends Error { 2 | static ERROR_UNKNOWN = 'An unexpected error occurred'; 3 | constructor(message) { 4 | super(message ?? CustomError.ERROR_UNKNOWN); 5 | this.name = 'CustomError'; 6 | Object.setPrototypeOf(this, CustomError.prototype); 7 | } 8 | toObj() { 9 | return { 10 | message: this.message, 11 | }; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEmbeddedObject.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TObject, type TObjectConstraints } from '../base/TObject.js'; 3 | export type EmbeddedObject = E; 4 | export declare class TEmbeddedObject extends TObject> { 5 | protected constraints: TObjectConstraints; 6 | constructor(constraints?: TObjectConstraints); 7 | tName(): TName; 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonFirstname.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type PersonFirstname = Capitalize; 4 | export declare class TPersonFirstname extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): PersonFirstname; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TSemVerVersion.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type SemVerVersion = `${number}.${number}.${number}`; 4 | export declare class TSemVerVersion extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): SemVerVersion; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldErr.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 3 | export function UCFormFieldErr({ errMsg, }) { 4 | const { formFieldErr } = useStyleContext(); 5 | if (!errMsg) { 6 | return null; 7 | } 8 | return (_jsx("div", { className: formFieldErr?.className, style: formFieldErr?.style, children: errMsg })); 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindRN.js: -------------------------------------------------------------------------------- 1 | import { BufferLibBufferManager } from '../../std/impl/BufferLibBufferManager.js'; 2 | import { RNUCClientConfirmManager } from '../../uc/impl/RNUCClientConfirmManager.js'; 3 | export function bindRN(container) { 4 | // std 5 | container.bind('BufferManager').to(BufferLibBufferManager); 6 | // uc 7 | container 8 | .rebindSync('UCClientConfirmManager') 9 | .to(RNUCClientConfirmManager); 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TIPv6.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type IPv6 = `${string}:${string}:${string}:${string}:${string}:${string}:${string}:${string}`; 4 | export declare class TIPv6 extends TString { 5 | static readonly FORMAT: RegExp; 6 | constructor(constraints?: TStringConstraints); 7 | tName(): TName; 8 | example(): IPv6; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCForm.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCFormProps } from '../lib/react/form.js'; 4 | export declare function UCForm({ disabled, execState, onSubmit, uc, }: UCFormProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormFieldErr.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { Text } from 'react-native'; 3 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 4 | export function UCFormFieldErr({ errMsg, }) { 5 | const { formFieldErr } = useStyleContext(); 6 | if (!errMsg) { 7 | return null; 8 | } 9 | return _jsx(Text, { style: formFieldErr?.style, children: errMsg }); 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindNodeCLI.js: -------------------------------------------------------------------------------- 1 | import { NodePromptManager } from '../../std/impl/NodePromptManager.js'; 2 | import { PromptUCClientConfirmManager } from '../../uc/impl/PromptUCClientConfirmManager.js'; 3 | export function bindNodeCLI(container) { 4 | // std 5 | container.bind('PromptManager').to(NodePromptManager); 6 | // uc 7 | container 8 | .rebindSync('UCClientConfirmManager') 9 | .to(PromptUCClientConfirmManager); 10 | } 11 | -------------------------------------------------------------------------------- /examples/products/Playground/server-node-hono/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | APPS_ROOT_DIR_NAME, 3 | type FSManager, 4 | ServerBooter, 5 | } from '../../../../dist/esm/index.js'; 6 | import container from './container.js'; 7 | 8 | await container.get(ServerBooter).exec({ 9 | appsRootPath: container 10 | .get('FSManager') 11 | .path('..', '..', '..', APPS_ROOT_DIR_NAME), 12 | srcImporter: (path) => import(path), 13 | }); 14 | -------------------------------------------------------------------------------- /examples/products/Playground/server-node-express/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | APPS_ROOT_DIR_NAME, 3 | type FSManager, 4 | ServerBooter, 5 | } from '../../../../dist/esm/index.js'; 6 | import container from './container.js'; 7 | 8 | await container.get(ServerBooter).exec({ 9 | appsRootPath: container 10 | .get('FSManager') 11 | .path('..', '..', '..', APPS_ROOT_DIR_NAME), 12 | srcImporter: (path) => import(path), 13 | }); 14 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/VitestAppTestSuiteEmitter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FSManager } from '../../std/index.js'; 2 | import type { AppTestSuiteEmitter, Input, Output } from '../workers/AppTestSuiteEmitter.js'; 3 | export declare class VitestAppTestSuiteEmitter implements AppTestSuiteEmitter { 4 | private fsManager; 5 | constructor(fsManager: FSManager); 6 | exec({ appPath, depsMapping, idx, monkeyTestingTimeoutInMs, serverPortRangeStart, }: Input): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/utils/terminal/fmt.js: -------------------------------------------------------------------------------- 1 | export function fmtBold(s) { 2 | return `\x1b[1m${s}\x1b[0m`; 3 | } 4 | export function fmtCommand(cmd, details, padEnd) { 5 | return ` ${cmd.padEnd(padEnd)}${details ?? ''}`; 6 | } 7 | export function fmtPadEndFor(s) { 8 | const longest = [...s].sort((a, b) => a.length - b.length).reverse()[0]; 9 | return (longest?.length ?? 1) + 10; 10 | } 11 | export function fmtSection(s) { 12 | return fmtBold(`\n[${s}]\n`); 13 | } 14 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/components/base/Hr.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import { StyleSheet, View } from 'react-native'; 3 | 4 | export default function Hr(): ReactElement { 5 | return ( 6 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TSlug.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TSlug extends TString { 3 | static FORMAT = /^[a-z0-9-]+$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { f: 'Slug', regexp: TSlug.FORMAT }, 8 | }); 9 | } 10 | tName() { 11 | return 'Slug'; 12 | } 13 | example() { 14 | return 'title-of-seo-friendly-article'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dist/esm/index.cloudflare-worker-hono.js: -------------------------------------------------------------------------------- 1 | export { SyncEdgeWorkerHonoServerManager, } from './target/edge-worker-hono-server/SyncEdgeWorkerHonoServerManager.js'; 2 | export { buildHandler, init, mountHandler, toReq, toRes, } from './target/lib/server-hono/funcs.js'; 3 | export { CloudflareD1UCDataStore } from './uc/impl/CloudflareD1UCDataStore.js'; 4 | export { bindCloudflareWorker } from './utils/ioc/bindCloudflareWorker.js'; 5 | export { bindServer } from './utils/ioc/bindServer.js'; 6 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCEntrypointTouchable.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 3 | export function UCEntrypointTouchable({ path, wording }) { 4 | const { entrypointTouchable } = useStyleContext(); 5 | return (_jsx("a", { className: entrypointTouchable?.className, href: path, style: entrypointTouchable?.style, title: wording.desc ?? undefined, children: wording.label })); 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/uc/UCOutputField.d.ts: -------------------------------------------------------------------------------- 1 | import type { DataType } from '../dt/index.js'; 2 | import type { StringKeys } from '../utils/index.js'; 3 | import type { UCOPIBase } from './opi.js'; 4 | import type { UCOutputFieldDef } from './output-field.js'; 5 | export declare class UCOutputField { 6 | key: StringKeys; 7 | def: UCOutputFieldDef; 8 | constructor(key: StringKeys, def: UCOutputFieldDef); 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/dt/base/TBoolean.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTMLInputType } from '../targets/web.js'; 2 | import type { Validation } from '../Validation.js'; 3 | import { TBase, type TName } from './TBase.js'; 4 | export declare class TBoolean extends TBase { 5 | tName(): TName; 6 | assign(raw: unknown): this; 7 | example(): boolean; 8 | fmt(ifNullOrUndefined?: string | undefined): string; 9 | htmlInputType(): HTMLInputType; 10 | validate(): Validation; 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEmbeddedObject.js: -------------------------------------------------------------------------------- 1 | import { TObject, TObjectShapeValidationStrategy, } from '../base/TObject.js'; 2 | export class TEmbeddedObject extends TObject { 3 | constraints; 4 | constructor(constraints = { 5 | shapeValidationStrategy: TObjectShapeValidationStrategy.SAME_AS_EXAMPLE, 6 | }) { 7 | super(constraints); 8 | this.constraints = constraints; 9 | } 10 | tName() { 11 | return 'EmbeddedObject'; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TJWT.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | import type { Validation } from '../Validation.js'; 5 | export type JWT = string; 6 | export declare class TJWT extends TString { 7 | tName(): TName; 8 | example(): JWT; 9 | htmlInputType(): HTMLInputType; 10 | isSensitive(): boolean; 11 | validate(): Validation; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TTransportType.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TTransportType extends TString { 3 | constructor() { 4 | super(); 5 | this.setOptions([ 6 | { label: 'standard', value: 'standard' }, 7 | { label: 'stream', value: 'stream' }, 8 | ]); 9 | } 10 | tName() { 11 | return 'TransportType'; 12 | } 13 | example() { 14 | return 'standard'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/UCEntrypoint.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useDIContext } from './DIContextProvider.js'; 3 | import { UCContainer } from './UCContainer.js'; 4 | export function UCEntrypoint({ onPress, path, renderTouchable, uc }) { 5 | const { wordingManager } = useDIContext(); 6 | const wording = wordingManager.uc(uc.def); 7 | return (_jsx(UCContainer, { uc: uc, children: renderTouchable({ onPress, path, uc, wording }) })); 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/uc/lifecycle/client/IdleClientMain.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../../input.js'; 2 | import type { UCMain, UCMainInput } from '../../main.js'; 3 | import type { UCOPIBase } from '../../opi.js'; 4 | export declare class IdleClientMain implements UCMain { 5 | exec(_props: UCMainInput): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/uc/lifecycle/server/IdleServerMain.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../../input.js'; 2 | import type { UCMain, UCMainInput } from '../../main.js'; 3 | import type { UCOPIBase } from '../../opi.js'; 4 | export declare class IdleServerMain implements UCMain { 5 | exec(_props: UCMainInput): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFileExtension.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TFileExtension extends TString { 3 | constructor(constraints) { 4 | super(constraints); 5 | if (constraints?.allowed) { 6 | this.setOptions(constraints?.allowed.map((v) => ({ label: v, value: v }))); 7 | } 8 | } 9 | tName() { 10 | return 'FileExtension'; 11 | } 12 | example() { 13 | return 'png'; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCForm.d.ts: -------------------------------------------------------------------------------- 1 | import { type ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCFormProps } from '../lib/react/form.js'; 4 | export declare function UCForm({ clearAfterExec, disabled, execState, onSubmit: onSubmitBase, uc, }: UCFormProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindServer.js: -------------------------------------------------------------------------------- 1 | import { FakeEmailManager } from '../../std/impl/FakeEmailManager.js'; 2 | import { FakeJobManager } from '../../std/impl/FakeJobManager.js'; 3 | import { JoseJWTManager } from '../../std/impl/JoseJWTManager.js'; 4 | export function bindServer(container) { 5 | // std 6 | container.bind('EmailManager').to(FakeEmailManager); 7 | container.bind('JWTManager').to(JoseJWTManager); 8 | container.bind('JobManager').to(FakeJobManager); 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/UCOutputFieldValueFragment.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { DataType } from '../../../dt/index.js'; 3 | import type { UCOPIBase, UCOutputField } from '../../../uc/index.js'; 4 | export interface Props { 5 | f: UCOutputField; 6 | value: T; 7 | } 8 | export declare function UCOutputFieldValueFragment({ f, value }: Props): ReactElement; 9 | -------------------------------------------------------------------------------- /dist/esm/uc/sec.d.ts: -------------------------------------------------------------------------------- 1 | export type UCSecAuthType = 'apiKey' | 'basic' | 'jwt'; 2 | export type UCSecPublicApiKeyCheckType = 'off' | 'on'; 3 | /** 4 | * Definition of the security scheme of a use case 5 | */ 6 | export interface UCSec { 7 | /** 8 | * @defaultValue {@link DEFAULT_UC_SEC_AT} 9 | */ 10 | authType?: UCSecAuthType; 11 | /** 12 | * @defaultValue {@link DEFAULT_UC_SEC_PAKCT} 13 | */ 14 | publicApiKeyCheckType?: UCSecPublicApiKeyCheckType; 15 | } 16 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TDirPath.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TDirPath extends TString { 3 | static FORMAT = /^[a-z0-9_/.][a-z0-9-_/.]+/i; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { f: 'DirPath', regexp: TDirPath.FORMAT }, 8 | }); 9 | } 10 | tName() { 11 | return 'DirPath'; 12 | } 13 | example() { 14 | return '/Users/dexter/Desktop'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dist/esm/dt/final/THTTPContentType.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type HTTPContentType = 'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/html' | 'text/plain'; 4 | export declare class THTTPContentType extends TString { 5 | static readonly OPTIONS: HTTPContentType[]; 6 | constructor(); 7 | tName(): TName; 8 | example(): HTTPContentType; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NodeEnvironmentManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../../dt/index.js'; 2 | import type { EnvironmentManager, EnvironmentManagerEnvVarName, EnvironmentManagerType } from '../EnvironmentManager.js'; 3 | export declare class NodeEnvironmentManager implements EnvironmentManager { 4 | cwd(): FilePath; 5 | env(name: EnvironmentManagerEnvVarName): string | undefined; 6 | home(): FilePath; 7 | isProd(): boolean; 8 | type(): EnvironmentManagerType; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/std/impl/UCDataStoreExternalResourceManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCDataStore } from '../../uc/index.js'; 2 | import type { ExternalResourceManager } from '../ExternalResourceManager.js'; 3 | export declare class UCDataStoreExternalResourceManager implements ExternalResourceManager { 4 | private ucDataStore; 5 | constructor(ucDataStore: UCDataStore); 6 | create(): Promise; 7 | delete(): Promise; 8 | exists(): Promise; 9 | name(): string; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCEntrypointTouchable.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { Pressable, Text } from 'react-native'; 3 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 4 | export function UCEntrypointTouchable({ onPress, wording, }) { 5 | const { entrypointTouchable } = useStyleContext(); 6 | return (_jsx(Pressable, { onPress: onPress, children: _jsx(Text, { style: entrypointTouchable?.style, children: wording.label }) })); 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCExecTouchable.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCExecTouchableProps } from '../lib/react/touchable.js'; 4 | export declare function UCExecTouchable({ disabled, execState, onSubmit, uc, }: UCExecTouchableProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TCountryISO3166Alpha2.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type CountryISO3166Alpha2 = Uppercase; 4 | export type CountryName = Capitalize; 5 | export declare class TCountryISO3166Alpha2 extends TString { 6 | static readonly OPTIONS: [CountryName, CountryISO3166Alpha2][]; 7 | constructor(); 8 | tName(): TName; 9 | example(): CountryISO3166Alpha2; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TFreeTextLong.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TFreeTextLong extends TString { 3 | tName() { 4 | return 'FreeTextLong'; 5 | } 6 | example() { 7 | return "On est jeunes et ambitieux. Parfois vicieux. Faut qu'tu te dises que. Tu peux être le prince de la ville si tu veux (si tu veux). Où tu veux (où tu veux) quand tu veux (quand tu veux)."; 8 | } 9 | isPotentiallyLong() { 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCExecTouchable.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCExecTouchableProps } from '../lib/react/touchable.js'; 4 | export declare function UCExecTouchable({ disabled, execState, onSubmit, uc, }: UCExecTouchableProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCEntrypointTouchable.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCEntrypointTouchableProps } from '../lib/react/touchable.js'; 4 | export declare function UCEntrypointTouchable({ path, wording }: UCEntrypointTouchableProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormSubmitControl.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCFormSubmitControlProps } from '../lib/react/form.js'; 4 | export declare function UCFormSubmitControl({ execState, disabled, uc, }: UCFormSubmitControlProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/target/node-mcp-server/funcs.d.ts: -------------------------------------------------------------------------------- 1 | import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; 2 | import { type DataType } from '../../dt/index.js'; 3 | import { type UCInputFieldDef } from '../../uc/index.js'; 4 | import type { PropertyType } from './types.js'; 5 | export declare function propertyType(def: UCInputFieldDef): PropertyType; 6 | export declare function resError(err: Error): CallToolResult; 7 | export declare function resObj(obj: T): CallToolResult; 8 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCEntrypointTouchable.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCEntrypointTouchableProps } from '../lib/react/touchable.js'; 4 | export declare function UCEntrypointTouchable({ onPress, wording, }: UCEntrypointTouchableProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/bindCommon.d.ts: -------------------------------------------------------------------------------- 1 | import type { Container } from 'inversify'; 2 | import { type LoggerSettings, type Settings } from '../../std/index.js'; 3 | import { type UCSettings } from '../../uc/index.js'; 4 | export type CommonSettings = LoggerSettings & UCSettings; 5 | export type SettingsFunc = (commonSettings: CommonSettings) => S & Partial; 6 | export declare function bindCommon(container: Container, settingsFunc?: SettingsFunc): void; 7 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TColorRGBA.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | export type ColorRGBA = string; 5 | export declare class TColorRGBA extends TString { 6 | static readonly FORMAT: RegExp; 7 | constructor(constraints?: TStringConstraints); 8 | tName(): TName; 9 | example(): ColorRGBA; 10 | htmlInputType(): HTMLInputType; 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEncryptionKey.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TEncryptionKey extends TString { 3 | tName() { 4 | return 'EncryptionKey'; 5 | } 6 | example() { 7 | return '39b65c8b58140bed54c8b9a170f378644f128744a9711ef268ce561a360eb2eee6dbd2fd1ce7a743167e0cff5d7ca13cbdd2bded2b72c58d30caed990c3e04b6'; 8 | } 9 | htmlInputType() { 10 | return 'password'; 11 | } 12 | isSensitive() { 13 | return true; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCFormSubmitControl.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactElement } from 'react'; 2 | import type { UCInput, UCOPIBase } from '../../uc/index.js'; 3 | import type { UCFormSubmitControlProps } from '../lib/react/form.js'; 4 | export declare function UCFormSubmitControl({ execState, disabled, onPress, uc, }: UCFormSubmitControlProps): ReactElement; 5 | -------------------------------------------------------------------------------- /dist/esm/uc/opi.d.ts: -------------------------------------------------------------------------------- 1 | import type { DataType, UUID } from '../dt/index.js'; 2 | import type { Value } from './value.js'; 3 | /** 4 | * Base interface all the use case OPI interfaces must extend 5 | */ 6 | export interface UCOPIBase { 7 | id: UUID; 8 | } 9 | /** 10 | * A value returned as part of an OPI 11 | * 12 | * Unlike {@link UCInputFieldValue}, it cannot be `undefined` because it is not serializable in JSON. 13 | */ 14 | export type UCOPIValue = Exclude, undefined>; 15 | -------------------------------------------------------------------------------- /dist/esm/std/PromptManager.d.ts: -------------------------------------------------------------------------------- 1 | export interface PromptManagerPromptOpts { 2 | /** 3 | * Predicate to validate the input 4 | * 5 | * It keeps asking while the value is not valid, unless the user presses `Ctrl+C`. 6 | * 7 | * @param value 8 | * @returns 9 | */ 10 | validate?: (value: T) => Promise; 11 | } 12 | export interface PromptManager { 13 | prompt(invite: string, opts?: PromptManagerPromptOpts): Promise; 14 | } 15 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/entrypoint.d.ts: -------------------------------------------------------------------------------- 1 | import type { URLPath } from '../../../dt/index.js'; 2 | import type { UC, UCInput, UCOPIBase } from '../../../uc/index.js'; 3 | export type UCEntrypointOnPress = () => Promise; 4 | export interface UCEntrypointCtx { 5 | onPress?: UCEntrypointOnPress | undefined; 6 | path?: URLPath | undefined; 7 | uc: UC; 8 | } 9 | -------------------------------------------------------------------------------- /examples/products/Playground/mcp-server/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | APPS_ROOT_DIR_NAME, 3 | type FSManager, 4 | } from '../../../../dist/esm/index.js'; 5 | import { MCPServerBooter } from '../../../../dist/esm/index.node-mcp.js'; 6 | import container from './container.js'; 7 | 8 | await container.get(MCPServerBooter).exec({ 9 | appsRootPath: container 10 | .get('FSManager') 11 | .path('..', '..', '..', APPS_ROOT_DIR_NAME), 12 | srcImporter: (path) => import(path), 13 | }); 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPercentage.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TNumber, type TNumberConstraints } from '../base/TNumber.js'; 3 | import type { UIntQuantity } from './TUIntQuantity.js'; 4 | export type Percentage = number; 5 | export declare class TPercentage extends TNumber { 6 | constructor(constraints?: TNumberConstraints, decimalsCount?: UIntQuantity); 7 | tName(): TName; 8 | example(): Percentage; 9 | fmt(ifNullOrUndefined?: string | undefined): string; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppDocsEmitter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../../dt/index.js'; 2 | import type { Worker } from '../../std/index.js'; 3 | import type { Output as UCDefSourcesCheckerOutput } from './checkers/UCDefSourcesChecker.js'; 4 | export interface Input { 5 | appPath: FilePath; 6 | ucDefSourcesCheckerOutput: UCDefSourcesCheckerOutput; 7 | } 8 | export interface Output { 9 | outPath: FilePath; 10 | } 11 | export interface AppDocsEmitter extends Worker> { 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/utils/ioc/ContainerPrinter.d.ts: -------------------------------------------------------------------------------- 1 | import { type Container } from 'inversify'; 2 | import type { Logger, Worker } from '../../std/index.js'; 3 | interface Input { 4 | container: Container; 5 | } 6 | interface Output { 7 | bindingLines: string[]; 8 | } 9 | export declare class ContainerPrinter implements Worker> { 10 | private logger; 11 | constructor(logger: Logger); 12 | exec({ container }: Input): Promise; 13 | private symToString; 14 | } 15 | export {}; 16 | -------------------------------------------------------------------------------- /dist/esm/index.cloudflare-worker-hono.d.ts: -------------------------------------------------------------------------------- 1 | export { SyncEdgeWorkerHonoServerManager, type SyncEdgeWorkerHonoServerManagerSettings, } from './target/edge-worker-hono-server/SyncEdgeWorkerHonoServerManager.js'; 2 | export { buildHandler, init, mountHandler, toReq, toRes, } from './target/lib/server-hono/funcs.js'; 3 | export { CloudflareD1UCDataStore } from './uc/impl/CloudflareD1UCDataStore.js'; 4 | export { bindCloudflareWorker } from './utils/ioc/bindCloudflareWorker.js'; 5 | export { bindServer } from './utils/ioc/bindServer.js'; 6 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppTestSuiteRunner.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../../dt/index.js'; 2 | import type { Worker } from '../../std/index.js'; 3 | import type { UCName } from '../../uc/index.js'; 4 | export interface Input { 5 | appPath: FilePath; 6 | only: UCName | null; 7 | skipCoverage: boolean; 8 | updateSnapshots: boolean; 9 | } 10 | export interface AppTestSuiteRunner extends Worker> { 11 | coverageReportEntrypointPath(appPath: FilePath): Promise; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/uc/auth/consts.js: -------------------------------------------------------------------------------- 1 | import { TPersonFirstname, TPersonInitials, TUUID } from '../../dt/index.js'; 2 | export const FAKE_USER_ADMIN = { 3 | organization: { 4 | id: new TUUID().example(), 5 | }, 6 | role: 'admin', 7 | user: { 8 | firstname: new TPersonFirstname().example(), 9 | id: new TUUID().example(), 10 | initials: new TPersonInitials().example(), 11 | }, 12 | }; 13 | export const FAKE_USER_REGULAR = { 14 | ...FAKE_USER_ADMIN, 15 | role: 'regular', 16 | }; 17 | -------------------------------------------------------------------------------- /examples/apps/Strava/src/lib/FakeActivityProcessor.ts: -------------------------------------------------------------------------------- 1 | import { injectable } from 'inversify'; 2 | 3 | import type { CreateActivityInput } from '../ucds/CreateActivityUCD.js'; 4 | import type { ActivityProcessor } from './ActivityProcessor.js'; 5 | 6 | @injectable() 7 | export class FakeActivityProcessor implements ActivityProcessor { 8 | public entries: CreateActivityInput[] = []; 9 | 10 | public async dispatch(input: CreateActivityInput): Promise { 11 | this.entries.push(input); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/products/Playground/cli-node-core/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | APPS_ROOT_DIR_NAME, 3 | type FSManager, 4 | } from '../../../../dist/esm/index.js'; 5 | import { NodeCoreCLIManager } from '../../../../dist/esm/index.node.js'; 6 | import container from './container.js'; 7 | 8 | await container.get(NodeCoreCLIManager).handleCommand({ 9 | appsRootPath: container 10 | .get('FSManager') 11 | .path('..', '..', '..', APPS_ROOT_DIR_NAME), 12 | srcImporter: (path) => import(path), 13 | }); 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEmoji.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | // It is too difficult to validate safely an emoji 3 | // See : https://stackoverflow.com/questions/18862256/how-to-detect-emoji-using-javascript 4 | // Plus it does not bring much 5 | // At first, I used maxLength/minLength == 1 but it was naive. Composite ones' length is greater than 1. 6 | export class TEmoji extends TString { 7 | tName() { 8 | return 'Emoji'; 9 | } 10 | example() { 11 | return '🚀'; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server-node/funcs.d.ts: -------------------------------------------------------------------------------- 1 | import type { Logger, SettingsManager } from '../../../std/index.js'; 2 | import type { EntrypointsBuilder } from '../server/EntrypointsBuilder.js'; 3 | import type { ListenSettings, Server, StopSettings } from './types.js'; 4 | export declare function listen(server: Server, entrypointsBuilder: EntrypointsBuilder, logger: Logger, settingsManager: SettingsManager): void; 5 | export declare function stop(server: Server, settingsManager: SettingsManager): Promise; 6 | -------------------------------------------------------------------------------- /dist/esm/target/react-native-pure/UCOutputFieldValue.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { Text } from 'react-native'; 3 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 4 | import { UCOutputFieldValueFragment, } from '../lib/react/UCOutputFieldValueFragment.js'; 5 | export function UCOutputFieldValue(props) { 6 | const { outputFieldValue } = useStyleContext(); 7 | return (_jsx(Text, { style: outputFieldValue?.style, children: _jsx(UCOutputFieldValueFragment, { ...props }) })); 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCOutputFieldValue.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 3 | import { UCOutputFieldValueFragment, } from '../lib/react/UCOutputFieldValueFragment.js'; 4 | export function UCOutputFieldValue(props) { 5 | const { outputFieldValue } = useStyleContext(); 6 | return (_jsx("span", { className: outputFieldValue?.className, style: outputFieldValue?.style, children: _jsx(UCOutputFieldValueFragment, { ...props }) })); 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/appendUCInputToURL.js: -------------------------------------------------------------------------------- 1 | import { rInput } from './rInput.js'; 2 | export function appendUCInputToURL(uc, url) { 3 | const data = rInput(uc, { ignoreUndefined: true }); 4 | for (const [key, value] of Object.entries(data)) { 5 | const isArray = Array.isArray(value); 6 | const keyToSend = isArray ? `${key}[]` : key; 7 | const valueToSend = isArray ? value : [value]; 8 | for (const v of valueToSend) { 9 | url.searchParams.append(keyToSend, v); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/generic-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Generic Issue 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Problem 11 | 12 | 13 | 14 | ## Potential Solution(s) 15 | 16 | 17 | -------------------------------------------------------------------------------- /dist/esm/testing/uc-auth.d.ts: -------------------------------------------------------------------------------- 1 | import { type UCAuth } from '../uc/index.js'; 2 | export declare const DEFAULT_UC_AUTH_SETTERS: readonly ["ANONYMOUS", "ADMIN", "REGULAR"]; 3 | export type DefaultUCAuthSetter = (typeof DEFAULT_UC_AUTH_SETTERS)[number]; 4 | export type CustomUCAuthSetter = Capitalize; 5 | export type UCAuthSetterName = DefaultUCAuthSetter | CustomUCAuthSetter; 6 | export type UCAuthSetterSet = Record; 7 | export declare function defaultUCAuthSetters(): UCAuthSetterSet; 8 | -------------------------------------------------------------------------------- /dist/esm/utils/async/sleep.d.ts: -------------------------------------------------------------------------------- 1 | import type { UIntDuration } from '../../dt/index.js'; 2 | /** 3 | * Sleep during the specified duration 4 | * 5 | * NOTE : We are in an async world so do this only when necessary or when you want to "fake" time. 6 | * Generally speaking, if something is fast, do not make it slower just for the sake of showing a fancy animation. 7 | * Well... If it's a good one, maybe. 8 | * 9 | * @param durationInMs 10 | * @returns 11 | */ 12 | export declare function sleep(durationInMs: UIntDuration): Promise; 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TDateISO8601.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | import type { HTMLInputType } from '../targets/web.js'; 4 | import type { Validation } from '../Validation.js'; 5 | export type DateISO8601 = string; 6 | export declare class TDateISO8601 extends TString { 7 | tName(): TName; 8 | example(): DateISO8601; 9 | fmt(ifNullOrUndefined?: string | undefined): string; 10 | htmlInputType(): HTMLInputType; 11 | validate(): Validation; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TGitSSHURL.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | export type GitSSHURL = string; 4 | export interface TGitSSHURLConstraints extends TStringConstraints<'GitSSHURL'> { 5 | domainName?: string | undefined; 6 | } 7 | export declare class TGitSSHURL extends TString { 8 | private static DEFAULT_DOMAIN_NAME; 9 | constructor(constraints?: TGitSSHURLConstraints); 10 | tName(): TName; 11 | example(): GitSSHURL; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/NobodyUCPolicy.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UCPolicy, UCPolicyInput, UCPolicyOutput } from '../policy.js'; 4 | export declare class NobodyUCPolicy implements UCPolicy { 5 | canBeExecutedPreAuth(): Promise; 6 | exec(_input: UCPolicyInput): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /examples/products/Playground/cli-node-stricli/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | APPS_ROOT_DIR_NAME, 3 | type FSManager, 4 | } from '../../../../dist/esm/index.js'; 5 | import { NodeStricliCLIManager } from '../../../../dist/esm/index.node-stricli-cli.js'; 6 | import container from './container.js'; 7 | 8 | await container.get(NodeStricliCLIManager).handleCommand({ 9 | appsRootPath: container 10 | .get('FSManager') 11 | .path('..', '..', '..', APPS_ROOT_DIR_NAME), 12 | srcImporter: (path) => import(path), 13 | }); 14 | -------------------------------------------------------------------------------- /dist/esm/apps/Helper/src/ucds/TestAppUCD.d.ts: -------------------------------------------------------------------------------- 1 | import type { AppName } from '../../../../app/index.js'; 2 | import { type UCDef, type UCInputFieldValue, type UCName } from '../../../../uc/index.js'; 3 | import { type AppInput } from '../lib/app.js'; 4 | export interface TestAppInput extends AppInput { 5 | appName: UCInputFieldValue; 6 | only: UCInputFieldValue; 7 | skipCoverage: UCInputFieldValue; 8 | updateSnapshots: UCInputFieldValue; 9 | } 10 | export declare const TestAppUCD: UCDef; 11 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TColorRGBA.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TColorRGBA extends TString { 3 | static FORMAT = /^#([0-9a-f]{2}){4}$/i; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { f: 'ColorRGBA', regexp: TColorRGBA.FORMAT }, 8 | }); 9 | } 10 | tName() { 11 | return 'ColorRGBA'; 12 | } 13 | example() { 14 | return '#000000ff'; 15 | } 16 | htmlInputType() { 17 | return 'color'; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonInitials.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TPersonInitials extends TString { 3 | static FORMAT = /^[A-Z]{2}$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { 8 | f: 'PersonInitials', 9 | regexp: TPersonInitials.FORMAT, 10 | }, 11 | }); 12 | } 13 | tName() { 14 | return 'PersonInitials'; 15 | } 16 | example() { 17 | return 'DM'; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TTimestamp.js: -------------------------------------------------------------------------------- 1 | import { TUInt } from '../base/TUInt.js'; 2 | export class TTimestamp extends TUInt { 3 | tName() { 4 | return 'Timestamp'; 5 | } 6 | example() { 7 | return 1_628_359_209; 8 | } 9 | fmt(ifNullOrUndefined) { 10 | if (typeof this.raw !== 'number') { 11 | return super.fmt(ifNullOrUndefined); 12 | } 13 | // Not using `fmtNumber` to avoid weird formatting (e.g. comma used as a thousands separator) 14 | return this.raw.toString(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server-express/HelmetMiddlewareBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHandler } from 'express'; 2 | import type { Worker } from '../../../std/index.js'; 3 | import { CSPDirectivesBuilder } from '../server/CSPDirectivesBuilder.js'; 4 | interface Input { 5 | } 6 | type Output = RequestHandler; 7 | export declare class HelmetMiddlewareBuilder implements Worker { 8 | private cspDirectivesBuilder; 9 | constructor(cspDirectivesBuilder: CSPDirectivesBuilder); 10 | exec(_input: Input): Output; 11 | } 12 | export {}; 13 | -------------------------------------------------------------------------------- /dist/esm/uc/io/input/ListInput.d.ts: -------------------------------------------------------------------------------- 1 | import { type NumIndex, type SearchQuery, type UIntQuantity, type UUID } from '../../../dt/index.js'; 2 | import type { UCInput, UCInputDef } from '../../input.js'; 3 | import type { UCInputFieldValue } from '../../input-field.js'; 4 | export interface ListInput extends UCInput { 5 | id: UCInputFieldValue; 6 | limit: UCInputFieldValue; 7 | offset: UCInputFieldValue; 8 | q: UCInputFieldValue; 9 | } 10 | export declare const ListInputDef: UCInputDef; 11 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/AnonymousUCPolicy.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UCPolicy, UCPolicyInput, UCPolicyOutput } from '../policy.js'; 4 | export declare class AnonymousUCPolicy implements UCPolicy { 5 | canBeExecutedPreAuth(): Promise; 6 | exec({ uc, }: UCPolicyInput): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/EverybodyUCPolicy.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UCPolicy, UCPolicyInput, UCPolicyOutput } from '../policy.js'; 4 | export declare class EverybodyUCPolicy implements UCPolicy { 5 | canBeExecutedPreAuth(): Promise; 6 | exec(_input: UCPolicyInput): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/RoleAdminUCPolicy.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UCPolicy, UCPolicyInput, UCPolicyOutput } from '../policy.js'; 4 | export declare class RoleAdminUCPolicy implements UCPolicy { 5 | canBeExecutedPreAuth(): Promise; 6 | exec({ uc, }: UCPolicyInput): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonLastname.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TPersonLastname extends TString { 3 | static FORMAT = /^[A-Z0-9].+$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { 8 | f: 'PersonLastname', 9 | regexp: TPersonLastname.FORMAT, 10 | }, 11 | }); 12 | } 13 | tName() { 14 | return 'PersonLastname'; 15 | } 16 | example() { 17 | return 'Morgan'; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dist/esm/target/node-express-server/middlewares/RequestCheckerMiddlewareBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHandler } from 'express'; 2 | import type { Worker } from '../../../std/index.js'; 3 | import { RequestChecker } from '../../lib/server/RequestChecker.js'; 4 | interface Input { 5 | } 6 | type Output = RequestHandler; 7 | export declare class RequestCheckerMiddlewareBuilder implements Worker { 8 | private requestChecker; 9 | constructor(requestChecker: RequestChecker); 10 | exec(_input: Input): Output; 11 | } 12 | export {}; 13 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/RoleRegularUCPolicy.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UCPolicy, UCPolicyInput, UCPolicyOutput } from '../policy.js'; 4 | export declare class RoleRegularUCPolicy implements UCPolicy { 5 | canBeExecutedPreAuth(): Promise; 6 | exec({ uc, }: UCPolicyInput): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/dt/base/TUInt.d.ts: -------------------------------------------------------------------------------- 1 | import type { Unit } from '../../utils/index.js'; 2 | import type { TName } from './TBase.js'; 3 | import { TInt } from './TInt.js'; 4 | import type { TNumberConstraints } from './TNumber.js'; 5 | export type UInt = number; 6 | export type TUIntConstraints = TNumberConstraints; 7 | export declare class TUInt extends TInt { 8 | constructor(constraints?: TUIntConstraints, unit?: Unit, step?: T); 9 | tName(): TName; 10 | example(): T; 11 | min(): NonNullable; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonFirstname.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TPersonFirstname extends TString { 3 | static FORMAT = /^[A-Z0-9].+$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { 8 | f: 'PersonFirstname', 9 | regexp: TPersonFirstname.FORMAT, 10 | }, 11 | }); 12 | } 13 | tName() { 14 | return 'PersonFirstname'; 15 | } 16 | example() { 17 | return 'Dexter'; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dist/esm/std/consts.d.ts: -------------------------------------------------------------------------------- 1 | import type { EmailManagerSettings } from './EmailManager.js'; 2 | import type { JobManagerSettings } from './JobManager.js'; 3 | import type { JWTManagerSettings } from './JWTManager.js'; 4 | import type { LoggerSettings } from './Logger.js'; 5 | export declare const STD_DEFAULT_EMAIL_MANAGER_SETTINGS: EmailManagerSettings; 6 | export declare const STD_DEFAULT_JOB_MANAGER_SETTINGS: JobManagerSettings; 7 | export declare const STD_DEFAULT_JWT_MANAGER_SETTINGS: JWTManagerSettings; 8 | export declare const STD_DEFAULT_LOGGER_SETTINGS: LoggerSettings; 9 | -------------------------------------------------------------------------------- /dist/esm/std/impl/FakeJobManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { JobManager, JobManagerJobName, JobManagerQueueName } from '../JobManager.js'; 2 | export declare class FakeJobManager implements JobManager { 3 | entries: { 4 | input: unknown; 5 | jobName: JobManagerJobName; 6 | queueName: JobManagerQueueName; 7 | }[]; 8 | constructor(); 9 | clear(): Promise; 10 | dispatch(queueName: JobManagerQueueName, jobName: JobManagerJobName, input: I): Promise; 11 | init(): Promise; 12 | initSync(): void; 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/uc/policies/AuthenticatedUCPolicy.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import type { UCOPIBase } from '../opi.js'; 3 | import type { UCPolicy, UCPolicyInput, UCPolicyOutput } from '../policy.js'; 4 | export declare class AuthenticatedUCPolicy implements UCPolicy { 5 | canBeExecutedPreAuth(): Promise; 6 | exec({ uc, }: UCPolicyInput): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/RequestLogger.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPMethod, URL } from '../../../dt/index.js'; 2 | import type { EnvironmentManager, Logger, Worker } from '../../../std/index.js'; 3 | interface Input { 4 | body: unknown; 5 | method: HTTPMethod; 6 | url: URL; 7 | } 8 | export declare class RequestLogger implements Worker { 9 | private environmentManager; 10 | private logger; 11 | constructor(environmentManager: EnvironmentManager, logger: Logger); 12 | exec({ body, method, url }: Input): void; 13 | } 14 | export {}; 15 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/webpack/loader.js: -------------------------------------------------------------------------------- 1 | import { assertTransformedCorrectly, isFileEligible, } from '../funcs.js'; 2 | import { transform } from '../typescript.js'; 3 | export default function loader(source) { 4 | // @ts-expect-error : magically made available by Webpack at execution 5 | const fileName = this.resourcePath; 6 | if (!isFileEligible(fileName, ['ts'])) { 7 | return source; 8 | } 9 | const transformed = transform(source, fileName); 10 | assertTransformedCorrectly(transformed, fileName); 11 | return transformed; 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/dt/base/TUInt.js: -------------------------------------------------------------------------------- 1 | import { TInt } from './TInt.js'; 2 | export class TUInt extends TInt { 3 | constructor(constraints, unit, step) { 4 | super(constraints, unit, step); 5 | if (constraints?.min !== undefined && constraints.min < 0) { 6 | throw new Error('The constraints of TUInt must be of type UInt. Got min < 0'); 7 | } 8 | } 9 | tName() { 10 | return 'UInt'; 11 | } 12 | example() { 13 | return 1; 14 | } 15 | min() { 16 | return this.constraints?.min ?? 0; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dist/esm/target/node-express-server/middlewares/HelmetMiddlewareBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHandler } from 'express'; 2 | import type { Worker } from '../../../std/index.js'; 3 | import { CSPDirectivesBuilder } from '../../lib/server/CSPDirectivesBuilder.js'; 4 | interface Input { 5 | } 6 | type Output = RequestHandler; 7 | export declare class HelmetMiddlewareBuilder implements Worker { 8 | private cspDirectivesBuilder; 9 | constructor(cspDirectivesBuilder: CSPDirectivesBuilder); 10 | exec(_input: Input): Output; 11 | } 12 | export {}; 13 | -------------------------------------------------------------------------------- /examples/products/Playground/rn/lib/uc/InMemoryAuthDataStore.ts: -------------------------------------------------------------------------------- 1 | import { injectable } from 'inversify'; 2 | 3 | import type { JWT } from '../../../../../../dist/esm/index.js'; 4 | import type { AuthDataStore } from './AuthDataStore.js'; 5 | 6 | @injectable() 7 | export class InMemoryAuthDataStore implements AuthDataStore { 8 | private jwt: JWT | null = null; 9 | 10 | public async get(): Promise { 11 | return this.jwt; 12 | } 13 | 14 | public async set(jwt: JWT | null): Promise { 15 | this.jwt = jwt; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/products/Playground/server-nextjs/src/instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register(): Promise { 2 | if (process.env.NEXT_RUNTIME === 'nodejs') { 3 | const { default: container } = await import('./container-server.js'); 4 | const { ServerBooter } = await import( 5 | '../../../../../dist/esm/index.js' 6 | ); 7 | 8 | await container.get(ServerBooter).exec({ 9 | autoMountUCs: false, 10 | srcImporter: (path) => import(/* webpackIgnore: true */ path), 11 | }); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonFullname.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TPersonFullname extends TString { 3 | static FORMAT = /^[A-Z0-9].+ [A-Z0-9].+$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { 8 | f: 'PersonFullname', 9 | regexp: TPersonFullname.FORMAT, 10 | }, 11 | }); 12 | } 13 | tName() { 14 | return 'PersonFullname'; 15 | } 16 | example() { 17 | return 'Dexter Morgan'; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TSearchQuery.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TSearchQuery extends TString { 3 | config; 4 | tName() { 5 | return 'SearchQuery'; 6 | } 7 | configure(config) { 8 | this.config = config; 9 | return this; 10 | } 11 | example() { 12 | return 'Nike Streakfly'; 13 | } 14 | getConfig() { 15 | return this.config; 16 | } 17 | htmlInputType() { 18 | return 'search'; 19 | } 20 | rnInputMode() { 21 | return 'search'; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TYesNo.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TYesNo extends TString { 3 | static OPTIONS = ['N', 'Y']; 4 | constructor() { 5 | super({ 6 | maxLength: 1, 7 | minLength: 1, 8 | }); 9 | this.setOptions(TYesNo.OPTIONS.map((v) => ({ 10 | label: v, 11 | value: v, 12 | })), { shouldTranslateLabels: true }); 13 | } 14 | tName() { 15 | return 'YesNo'; 16 | } 17 | example() { 18 | return 'Y'; // Yes Man ! 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /dist/esm/utils/streams/types.d.ts: -------------------------------------------------------------------------------- 1 | export type StreamOnClose = () => Promise; 2 | export type StreamOnData = (data: D) => Promise; 3 | export type StreamOnDone = () => Promise; 4 | export interface StreamConfig { 5 | /** 6 | * When the consumer closes the stream 7 | */ 8 | onClose: StreamOnClose; 9 | /** 10 | * When the provider sends data 11 | */ 12 | onData: StreamOnData; 13 | /** 14 | * When the provider is done sending data 15 | */ 16 | onDone: StreamOnDone; 17 | } 18 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TEmail.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | import type { RNInputMode } from '../targets/rn.js'; 4 | import type { HTMLInputType } from '../targets/web.js'; 5 | export type Email = string; 6 | export declare class TEmail extends TString { 7 | static readonly FORMAT: RegExp; 8 | constructor(constraints?: TStringConstraints); 9 | tName(): TName; 10 | example(): Email; 11 | htmlInputType(): HTMLInputType; 12 | rnInputMode(): RNInputMode; 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NodeHTTPAPICallExecutorAgentBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { EnvironmentManager } from '../EnvironmentManager.js'; 2 | import type { HTTPAPICallExecutorAgentBuilder, HTTPAPICallExecutorAgentBuilderInput, HTTPAPICallExecutorAgentBuilderOutput } from '../HTTPAPICallExecutor.js'; 3 | export declare class NodeHTTPAPICallExecutorAgentBuilder implements HTTPAPICallExecutorAgentBuilder { 4 | private environmentManager; 5 | constructor(environmentManager: EnvironmentManager); 6 | exec({ url, }: HTTPAPICallExecutorAgentBuilderInput): HTTPAPICallExecutorAgentBuilderOutput; 7 | } 8 | -------------------------------------------------------------------------------- /dist/esm/app/manifest.d.ts: -------------------------------------------------------------------------------- 1 | import type { APP_MANIFEST_NAME } from '../convention.js'; 2 | import type { I18nLanguageCode } from '../i18n/index.js'; 3 | import type { UCMetadata, UCName } from '../uc/index.js'; 4 | export type AppManifestSource = any; 5 | export type AppManifestSourceSafe = { 6 | [key: typeof APP_MANIFEST_NAME]: AppManifest; 7 | }; 8 | export type AppUCReg = Record; 9 | export interface AppManifest { 10 | languageCodes: I18nLanguageCode[]; 11 | name: AppName; 12 | ucReg: AppUCReg; 13 | } 14 | export type AppName = Capitalize; 15 | -------------------------------------------------------------------------------- /examples/apps/Auth/src/manifest.ts: -------------------------------------------------------------------------------- 1 | import type { AppManifest } from '../../../../dist/esm/index.js'; 2 | 3 | export const Manifest = { 4 | languageCodes: ['de', 'en', 'es', 'fr'], 5 | name: 'Auth', 6 | ucReg: { 7 | SignIn: { 8 | action: 'Create', 9 | icon: 'right-to-bracket', 10 | name: 'SignIn', 11 | }, 12 | SignOut: { 13 | action: 'Delete', 14 | icon: 'circle-xmark', 15 | name: 'SignOut', 16 | sensitive: true, 17 | }, 18 | }, 19 | } satisfies AppManifest; 20 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TCurrencyISO4217.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString } from '../base/TString.js'; 3 | export type CurrencyISO4217 = 'EUR' | 'GBP' | 'USD'; 4 | export type CurrencyName = Capitalize; 5 | export type CurrencySign = Capitalize; 6 | export declare class TCurrencyISO4217 extends TString { 7 | static readonly OPTIONS: [ 8 | CurrencyName, 9 | CurrencyISO4217, 10 | CurrencySign 11 | ][]; 12 | constructor(); 13 | tName(): TName; 14 | example(): CurrencyISO4217; 15 | } 16 | -------------------------------------------------------------------------------- /dist/esm/std/impl/EnvSettingsManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { EnvironmentManager } from '../EnvironmentManager.js'; 2 | import { type Settings, type SettingsGetter, type SettingsManager } from '../SettingsManager.js'; 3 | export declare class EnvSettingsManager implements SettingsManager { 4 | private environmentManager; 5 | private settings; 6 | static ENV_VAR_PREFIX: string; 7 | constructor(environmentManager: EnvironmentManager, settings: S); 8 | get(): SettingsGetter; 9 | isMandatoryPlaceholder(value: unknown): value is string; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/target/lib/server/CustomerFacingErrorBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import { CustomError } from '../../../error/index.js'; 2 | import type { EnvironmentManager, Logger, Worker } from '../../../std/index.js'; 3 | interface Input { 4 | error: Error; 5 | } 6 | interface Output { 7 | error: CustomError; 8 | } 9 | export declare class CustomerFacingErrorBuilder implements Worker { 10 | private environmentManager; 11 | private logger; 12 | constructor(environmentManager: EnvironmentManager, logger: Logger); 13 | exec({ error }: Input): Output; 14 | } 15 | export {}; 16 | -------------------------------------------------------------------------------- /dist/esm/testing/impl/SimpleHTMLAppTestReportEmitter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../../dt/index.js'; 2 | import type { FSManager } from '../../std/index.js'; 3 | import type { AppTestReportEmitter, Input, Output } from '../workers/AppTestReportEmitter.js'; 4 | export declare class SimpleHTMLAppTestReportEmitter implements AppTestReportEmitter { 5 | private fsManager; 6 | constructor(fsManager: FSManager); 7 | exec({ appPath, testResults, testSummary, }: Input): Promise; 8 | entrypointPath(appPath: FilePath): Promise; 9 | private reportPath; 10 | } 11 | -------------------------------------------------------------------------------- /dist/esm/utils/bundling/vite/plugin.js: -------------------------------------------------------------------------------- 1 | import { assertTransformedCorrectly, isFileEligible } from '../funcs.js'; 2 | import { transform } from '../typescript.js'; 3 | export const Plugin = { 4 | name: 'libmodulor-plugin', 5 | transform: (code, id) => { 6 | if (!isFileEligible(id, ['ts'])) { 7 | return { 8 | code, 9 | }; 10 | } 11 | const transformed = transform(code, id); 12 | assertTransformedCorrectly(transformed, id); 13 | return { 14 | code: transformed, 15 | }; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { loadEnv } from 'vite'; 2 | import { defineConfig } from 'vitest/config'; 3 | 4 | export default defineConfig(({ mode }) => ({ 5 | test: { 6 | coverage: { 7 | exclude: ['src/apps/**/test', 'src/**/*.test.ts'], 8 | include: ['src'], 9 | reporter: ['html', 'lcov', 'text'], 10 | reportOnFailure: false, 11 | }, 12 | env: loadEnv(mode, process.cwd(), ''), 13 | exclude: ['**/node_modules/**', '**/dist/**', '**/dist-examples/**'], 14 | reporters: ['verbose'], 15 | }, 16 | })); 17 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TPersonFullname.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | import type { PersonFirstname } from './TPersonFirstname.js'; 4 | import type { PersonLastname } from './TPersonLastname.js'; 5 | export type PersonFullname = `${PersonFirstname} ${PersonLastname}`; 6 | export declare class TPersonFullname extends TString { 7 | static readonly FORMAT: RegExp; 8 | constructor(constraints?: TStringConstraints); 9 | tName(): TName; 10 | example(): PersonFullname; 11 | } 12 | -------------------------------------------------------------------------------- /dist/esm/target/node-express-server/middlewares/RequestLoggerMiddlewareBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHandler } from 'express'; 2 | import type { Logger, Worker } from '../../../std/index.js'; 3 | import { RequestLogger } from '../../lib/server/RequestLogger.js'; 4 | interface Input { 5 | } 6 | type Output = RequestHandler; 7 | export declare class RequestLoggerMiddlewareBuilder implements Worker { 8 | private logger; 9 | private requestLogger; 10 | constructor(logger: Logger, requestLogger: RequestLogger); 11 | exec(_input: Input): Output; 12 | } 13 | export {}; 14 | -------------------------------------------------------------------------------- /dist/esm/utils/async/sleep.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sleep during the specified duration 3 | * 4 | * NOTE : We are in an async world so do this only when necessary or when you want to "fake" time. 5 | * Generally speaking, if something is fast, do not make it slower just for the sake of showing a fancy animation. 6 | * Well... If it's a good one, maybe. 7 | * 8 | * @param durationInMs 9 | * @returns 10 | */ 11 | export function sleep(durationInMs) { 12 | return new Promise((resolve) => { 13 | setTimeout(() => { 14 | resolve(); 15 | }, durationInMs); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TIPv4.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TIPv4 extends TString { 3 | static FORMAT = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { f: 'IPv4', regexp: TIPv4.FORMAT }, 8 | }); 9 | } 10 | tName() { 11 | return 'IPv4'; 12 | } 13 | example() { 14 | return '255.255.255.255'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TDomainName.d.ts: -------------------------------------------------------------------------------- 1 | import type { TName } from '../base/TBase.js'; 2 | import { TString, type TStringConstraints } from '../base/TString.js'; 3 | import type { RNInputMode } from '../targets/rn.js'; 4 | import type { HTMLInputType } from '../targets/web.js'; 5 | export type DomainName = string; 6 | export declare class TDomainName extends TString { 7 | static readonly FORMAT: RegExp; 8 | constructor(constraints?: TStringConstraints); 9 | tName(): TName; 10 | example(): DomainName; 11 | htmlInputType(): HTMLInputType; 12 | rnInputMode(): RNInputMode; 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/std/impl/FakeHTTPAPICallExecutor.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTML, JSONString, URL as URLString } from '../../dt/index.js'; 2 | import type { HTTPAPICallExecutor, HTTPAPICallExecutorFunc } from '../HTTPAPICallExecutor.js'; 3 | import { FetchHTTPAPICallExecutor } from './FetchHTTPAPICallExecutor.js'; 4 | export declare class FakeHTTPAPICallExecutor implements HTTPAPICallExecutor { 5 | private fetchHTTPAPICallExecutor; 6 | entries: Map; 7 | constructor(fetchHTTPAPICallExecutor: FetchHTTPAPICallExecutor); 8 | fn(): HTTPAPICallExecutorFunc; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/target/lib/react/form.js: -------------------------------------------------------------------------------- 1 | import { isBlank } from '../../../utils/index.js'; 2 | export const UC_FORM_FIELD_ELEMENTS = [ 3 | 'control', 4 | 'desc', 5 | 'err', 6 | 'help', 7 | 'label', 8 | ]; 9 | export function validateFormField(i18nManager, f) { 10 | if (isBlank(f.getValue())) { 11 | return null; 12 | } 13 | const validation = f.validate(); 14 | const violation = validation.get(); 15 | if (violation) { 16 | const [key, expected] = violation; 17 | return i18nManager.t(key, { vars: { expected } }); 18 | } 19 | return null; 20 | } 21 | -------------------------------------------------------------------------------- /dist/esm/target/node-express-server/middlewares/ErrorMiddlewareBuilder.d.ts: -------------------------------------------------------------------------------- 1 | import type { ErrorRequestHandler } from 'express'; 2 | import type { Worker } from '../../../std/index.js'; 3 | import { CustomerFacingErrorBuilder } from '../../lib/server/CustomerFacingErrorBuilder.js'; 4 | interface Input { 5 | } 6 | type Output = ErrorRequestHandler; 7 | export declare class ErrorMiddlewareBuilder implements Worker { 8 | private customerFacingErrorBuilder; 9 | constructor(customerFacingErrorBuilder: CustomerFacingErrorBuilder); 10 | exec(_input: Input): Output; 11 | } 12 | export {}; 13 | -------------------------------------------------------------------------------- /dist/esm/uc/utils/ucMountingPoint.d.ts: -------------------------------------------------------------------------------- 1 | import type { UCInput } from '../input.js'; 2 | import { type FQUCName, parseFQUCName } from '../metadata.js'; 3 | import type { UCOPIBase } from '../opi.js'; 4 | import type { UC } from '../UC.js'; 5 | export type UCMountingPoint = FQUCName | (string & {}); 6 | export declare function ucMountingPoint(uc: UC): UCMountingPoint; 7 | export declare function parseUCMountingPoint(value: string): ReturnType; 8 | -------------------------------------------------------------------------------- /dist/esm/std/impl/NodeBufferManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { BufferManager, BufferManagerBase64String } from '../BufferManager.js'; 2 | export declare class NodeBufferManager implements BufferManager { 3 | decodeBase64(value: BufferManagerBase64String): T; 4 | decodeUint8Array(value: Uint8Array): T; 5 | encodeBase64(value: T): BufferManagerBase64String; 6 | encodeUint8Array(value: T): Uint8Array; 7 | from(value: T): Buffer; 8 | fromHexToBase64(value: T): BufferManagerBase64String; 9 | } 10 | -------------------------------------------------------------------------------- /dist/esm/app/index.d.ts: -------------------------------------------------------------------------------- 1 | export type { AppI18n } from './i18n.js'; 2 | export type { AppInstaller } from './installer.js'; 3 | export type { AppManifest, AppManifestSource, AppManifestSourceSafe, AppName, } from './manifest.js'; 4 | export { AppManifestLoader } from './workers/AppManifestLoader.js'; 5 | export { AppSrcBrowser } from './workers/AppSrcBrowser.js'; 6 | export { AppSrcFilePathBuilder } from './workers/AppSrcFilePathBuilder.js'; 7 | export { AppUCsLoader, type Input as AppUCsLoaderInput, type Output as AppUCsLoaderOutput, } from './workers/AppUCsLoader.js'; 8 | export { UCDefLoader } from './workers/UCDefLoader.js'; 9 | -------------------------------------------------------------------------------- /dist/esm/dt/final/TTime.js: -------------------------------------------------------------------------------- 1 | import { TString } from '../base/TString.js'; 2 | export class TTime extends TString { 3 | static FORMAT = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$/; 4 | constructor(constraints) { 5 | super({ 6 | ...constraints, 7 | format: { f: 'Time', regexp: TTime.FORMAT }, 8 | }); 9 | } 10 | tName() { 11 | return 'Time'; 12 | } 13 | example() { 14 | return '10:00'; 15 | } 16 | htmlInputType() { 17 | return 'time'; 18 | } 19 | rnInputMode() { 20 | return 'numeric'; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /dist/esm/std/Logger.d.ts: -------------------------------------------------------------------------------- 1 | import type { Settings } from './SettingsManager.js'; 2 | export type LoggerLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error'; 3 | export type LoggerMessage = string; 4 | export interface LoggerSettings extends Settings { 5 | logger_level: LoggerLevel; 6 | } 7 | export interface Logger { 8 | debug(message: LoggerMessage, ...meta: unknown[]): void; 9 | error(err: Error): void; 10 | info(message: LoggerMessage, ...meta: unknown[]): void; 11 | trace(message: LoggerMessage, ...meta: unknown[]): void; 12 | warn(message: LoggerMessage, ...meta: unknown[]): void; 13 | } 14 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormFieldDesc.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useDIContext } from '../lib/react/DIContextProvider.js'; 3 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 4 | export function UCFormFieldDesc({ f, }) { 5 | const { wordingManager } = useDIContext(); 6 | const { formFieldDesc } = useStyleContext(); 7 | const { desc } = wordingManager.ucif(f); 8 | if (!desc) { 9 | return null; 10 | } 11 | return (_jsx("div", { className: formFieldDesc?.className, style: formFieldDesc?.style, children: desc })); 12 | } 13 | -------------------------------------------------------------------------------- /dist/esm/target/react-web-pure/UCFormSubmitControl.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import { useDIContext } from '../lib/react/DIContextProvider.js'; 3 | import { useStyleContext } from '../lib/react/StyleContextProvider.js'; 4 | export function UCFormSubmitControl({ execState, disabled, uc, }) { 5 | const { wordingManager } = useDIContext(); 6 | const { formSubmitControl } = useStyleContext(); 7 | return (_jsx("input", { className: formSubmitControl?.className, disabled: disabled, style: formSubmitControl?.style, type: "submit", value: wordingManager.ucISubmit(uc.def, execState) })); 8 | } 9 | -------------------------------------------------------------------------------- /dist/esm/testing/workers/AppTestReportEmitter.d.ts: -------------------------------------------------------------------------------- 1 | import type { FilePath } from '../../dt/index.js'; 2 | import type { Worker } from '../../std/index.js'; 3 | import type { AppTestSuiteSummary, AppTestSuiteTestResult } from './AppTestSuiteEmitter.js'; 4 | export interface Input { 5 | appPath: FilePath; 6 | testResults: AppTestSuiteTestResult[]; 7 | testSummary: AppTestSuiteSummary; 8 | } 9 | export interface Output { 10 | outPath: FilePath; 11 | } 12 | export interface AppTestReportEmitter extends Worker> { 13 | entrypointPath(appPath: FilePath): Promise; 14 | } 15 | -------------------------------------------------------------------------------- /dist/esm/utils/http/SSEStreamManager.d.ts: -------------------------------------------------------------------------------- 1 | import type { HTTPAPICallExecutorResBody, Worker } from '../../std/index.js'; 2 | type Encoding = 'utf-8'; 3 | interface I { 4 | abortController: AbortController; 5 | encoding?: Encoding | undefined; 6 | onData: (data: D) => Promise; 7 | reader: ReturnType; 8 | } 9 | export declare class SSEStreamManager implements Worker> { 10 | private static DEFAULT_ENCODING; 11 | exec({ abortController, encoding, onData, reader, }: I): Promise; 12 | } 13 | export {}; 14 | --------------------------------------------------------------------------------