-
Notifications
You must be signed in to change notification settings - Fork 1
Gyalcin/devx admin api command issuer #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ith a teardown path to setup
…down, extract routes into directory
…mand schema contracts and singleton logging example src/core/system/payload-schemas.ts: Added aggregateId and aggregateType to payload schemas for stricter contract alignment. devex-ui/src/components/CommandIssuer.tsx: Removed unused timestamp display for cleaner UI. src/api/routes/commands.ts: Introduced a POST endpoint for scheduling commands with validation, unique ID assignment, and logging improvements. src/infra/temporal/temporal-scheduler.ts: Added warning log for unsupported commands in the scheduler for better debugging.
src/tools/lint-payloads/index.ts: Introduced a lint tool to detect missing `aggregateRouting` in registered commands. src/core/system/register.ts: Added `aggregateRouting` metadata to system commands for consistent aggregate handling. src/api/routes/commands.ts: Updated scheduling response to return router results. src/core/registry.ts: Extended `CommandTypeMeta` with `aggregateRouting` for routing declarative metadata. src/infra/temporal/workflow-router.ts: Integrated `aggregateRouting` logic into command handling for workflows. .github/workflows/core-linter.yml: Added GitHub action for `core-lint` validation in PRs. src/core/system/payload-schemas.ts: Removed redundant fields (`aggregateId`, `aggregateType`) from payload schemas. README.md: Added status badge for `core-linter.yml`. devex-ui/src/components/Header.tsx: Updated roles list to reflect new role categories.
src/components/Header.tsx: Removed role switcher; simplified tenant UI. src/components/CommandIssuer.tsx: Replaced aggregate ID with role switcher. Added cmd highlight for recent submissions, adjusted toast UX.
src/infra/logger/apiLogger.ts, src/api/logger.ts: Added and exported `apiLogger` for modular logging focused on API layer encapsulation. src/api/middlewares/accessLog.ts: Switched to `apiLogger` for request/response logging, replacing `stdLogger` for enhanced modularity. src/api/routes/commands.ts: Replaced `stdLogger` with `logger` from `apiLogger`, removed redundant logger setup for improved consistency and cleaner dependency management.
src/core/system/register.ts: Introduced `registerRoles` interface and registered domain roles for "system". src/api/routes/registry.ts: Added `/api/registry/roles` endpoint to expose roles meta; updated registry response to include roles data. src/core/registry.ts: Added roles storage, registration, and retrieval utilities in the `DomainRegistry`. src/tools/core-lint/index.ts: Clarified file path for better script organization.
devex-ui/src/mocks/stores/roles.store.ts: Created roles store and helper to manage domain-based roles. devex-ui/src/hooks/api/useRoles.ts: Added a react-query hook to fetch roles by domain. devex-ui/src/mocks/scenarios/default.ts: Seeded roles store with default domain-role mappings for mock data. devex-ui/src/data/apiService.ts: Created fetch function for fetching roles by domain from API. devex-ui/src/mocks/handlers.ts: Added API mock handler for fetching roles, including default fallback. devex-ui/src/hooks/api/queryKeys.ts: Added query keys for roles for use in react-query. devex-ui/src/hooks/api/index.ts: Exported `useRoles` for centralized API hook import. devex-ui/src/mocks/stores/index.ts: Exported `roles.store` for centralized store registry. devex-ui/src/data/api.ts: Refactored API baseUrl to account for `apiMode` changes. devex-ui/src/components/CommandIssuer.tsx: Integrated roles query to dynamically fetch roles based on selected command's domain. devex-ui/src/components/Header.tsx: Minor update to tenants array for example clarity.
devex-ui/src/components/CommandIssuer.tsx: Added role validity check with reaction to role changes using `useEffect`. Updated role selection to ensure it's dynamic, clear, and disabled until a command type is selected.
src/devex-ui/: Added SPA with tabs for commands, events, projections, traces, and AI assistance. Enabled schema-driven forms, role validation, and simulation/replay functionality through ports-only backend.
README.md: Added badge for DevX UI build status to enhance visibility. .github/workflows/build.yml: Renamed workflow to clarify its scope as Core and Infra build. .github/workflows/devx-ui-build.yml: Introduced a dedicated CI workflow for DevX UI, including build steps, caching, and dependency installation specific to the devex-ui directory.
src/core/policy-registry.ts: Added condition map getter and registered access models for evaluation and debugging purposes, improved policy registration. src/core/logger.ts: Introduced `createLogger` method for scoped logger instances within the core. src/tools/core-lint/index.ts: Expanded linting to validate roles against access models
src/infra/logger/stdLogger.ts: Improved errorSerializer with custom fields support and fallback robustness for structured logging. src/core/errors.ts: Refactored BusinessRuleViolation with retryable flag, details, JSON support, and stack trace enhancement. src/api/routes/commands.ts: Added BusinessRuleViolation import for comprehensive error handling. src/infra/contracts.ts, src/infra/temporal/workflows/processCommand.ts: Updated CommandResult error type to Error for consistency. package.json: Added `api:admin:watch` script for improved developer convenience during development. devex-ui/, devex-ui/src/components/CommandIssuer.tsx: Addressed formatting and alignment for consistent code styling.
…ble tests with martial state object matching
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
folds registry, command issuer devx, admin api commands endpoints, error handling hardening