Commit Graph

36 Commits

Author SHA1 Message Date
dswbx
fea2812688 fix: handle numbered object conversion and update MCP tool URL
Add `convertNumberedObjectToArray` utility for handling numbered object to array conversion, addressing MCP tool allOf behavior. Adjust MCP tool URL in configuration and ensure default inspect options in development environment. Minor improvement in role enumeration handling for auth.
2025-09-14 17:03:23 +02:00
dswbx
63254de13a added a simple mcp ui in tests 2025-08-14 16:49:31 +02:00
dswbx
9ac5fa03c6 optimized performance 2025-08-14 10:05:15 +02:00
dswbx
70737c04cd refactor console imports, added config update event 2025-07-02 14:02:50 +02:00
dswbx
57ae2f333c inlined libsql dialect, rewrote d1 to use generic sqlite 2025-06-25 09:35:47 +02:00
dswbx
2ada4e9f20 various fixes: refactored imports, introduced fromDriver/toDriver to improve compat 2025-06-13 21:15:29 +02:00
dswbx
bbb7bfb7a1 feat: adding env aware endpoint to obtain sqlite connection, remove libsql hard dependency 2025-06-13 11:09:47 +02:00
dswbx
6c2e579596 connection: rewrote query execution, batching, added generic sqlite, added node/bun sqlite, aligned repo/mutator results 2025-06-12 09:02:18 +02:00
dswbx
372f94d22a Release 0.12 (#143)
* changed tb imports

* cleanup: replace console.log/warn with $console, remove commented-out code

Removed various commented-out code and replaced direct `console.log` and `console.warn` usage across the codebase with `$console` from "core" for standardized logging. Also adjusted linting rules in biome.json to enable warnings for `console.log` usage.

* ts: enable incremental

* fix imports in test files

reorganize imports to use "@sinclair/typebox" directly, replacing local utility references, and add missing "override" keywords in test classes.

* added media permissions (#142)

* added permissions support for media module

introduced `MediaPermissions` for fine-grained access control in the media module, updated routes to enforce these permissions, and adjusted permission registration logic.

* fix: handle token absence in getUploadHeaders and add tests for transport modes

ensure getUploadHeaders does not set Authorization header when token is missing. Add unit tests to validate behavior for different token_transport options.

* remove console.log on DropzoneContainer.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add bcrypt and refactored auth resolve (#147)

* reworked auth architecture with improved password handling and claims

Refactored password strategy to prepare supporting bcrypt, improving hashing/encryption flexibility. Updated authentication flow with enhanced user resolution mechanisms, safe JWT generation, and consistent profile handling. Adjusted dependencies to include bcryptjs and updated lock files accordingly.

* fix strategy forms handling, add register route and hidden fields

Refactored strategy forms to include hidden fields for type and name. Added a registration route with necessary adjustments to the admin controller and routes. Corrected field handling within relevant forms and components.

* refactored auth handling to support bcrypt, extracted user pool

* update email regex to allow '+' and '_' characters

* update test stub password for AppAuth spec

* update data exceptions to use HttpStatus constants, adjust logging level in AppUserPool

* rework strategies to extend a base class instead of interface

* added simple bcrypt test

* add validation logs and improve data validation handling (#157)

Added warning logs for invalid data during mutator validation, refined field validation logic to handle undefined values, and adjusted event validation comments for clarity. Minor improvements include exporting events from core and handling optional chaining in entity field validation.

* modify MediaApi to support custom fetch implementation, defaults to native fetch (#158)

* modify MediaApi to support custom fetch implementation, defaults to native fetch

added an optional `fetcher` parameter to allow usage of a custom fetch function in both `upload` and `fetcher` methods. Defaults to the standard `fetch` if none is provided.

* fix tests and improve api fetcher types

* update admin basepath handling and window context integration (#155)

Refactored `useBkndWindowContext` to include `admin_basepath` and updated its usage in routing. Improved type consistency with `AdminBkndWindowContext` and ensured default values are applied for window context.

* trigger `repository-find-[one|many]-[before|after]` based on `limit` (#160)

* refactor error handling in authenticator and password strategy (#161)

made `respondWithError` method public, updated login and register routes in `PasswordStrategy` to handle errors using `respondWithError` for consistency.

* add disableSubmitOnError prop to NativeForm and export getFlashMessage (#162)

Introduced a `disableSubmitOnError` prop to NativeForm to control submit button behavior when errors are present. Also exported `getFlashMessage` from the core for external usage.

* update dependencies in package.json (#156)

moved several dependencies between devDependencies and dependencies for better categorization and removed redundant entries.

* update imports to adjust nodeTestRunner path and remove unused export (#163)

updated imports in test files to reflect the correct path for nodeTestRunner. removed redundant export of nodeTestRunner from index file to clean up module structure. In some environments this could cause issues requiring to exclude `node:test`, just removing it for now.

* fix sync events not awaited (#164)

* refactor(dropzone): extract DropzoneInner and unify state management with zustand (#165)

Simplified Dropzone implementation by extracting inner logic to a new component, `DropzoneInner`. Replaced local dropzone state logic with centralized state management using zustand. Adjusted API exports and props accordingly for consistency and maintainability.

* replace LiquidJs rendering with simplified renderer (#167)

* replace LiquidJs rendering with simplified renderer

Removed dependency on LiquidJS and replaced it with a custom templating solution using lodash `get`. Updated corresponding components, editors, and tests to align with the new rendering approach. Removed unused filters and tags.

* remove liquid js from package json

* feat/cli-generate-types (#166)

* init types generation

* update type generation for entities and fields

Refactored `EntityTypescript` to support improved field types and relations. Added `toType` method overrides for various fields to define accurate TypeScript types. Enhanced CLI `types` command with new options for output style and file handling. Removed redundant test files.

* update type generation code and CLI option description

removed unused imports definition, adjusted formatting in EntityTypescript, and clarified the CLI style option description.

* fix json schema field type generation

* reworked system entities to prevent recursive types

* reworked system entities to prevent recursive types

* remove unused object function

* types: use number instead of Generated

* update data hooks and api types

* update data hooks and api types

* update data hooks and api types

* update data hooks and api types

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-01 10:12:18 +02:00
dswbx
4c11789ea8 Fix Release 0.11.1 (#150)
* fix strategy forms handling, add register route and hidden fields

Refactored strategy forms to include hidden fields for type and name. Added a registration route with necessary adjustments to the admin controller and routes. Corrected field handling within relevant forms and components.

* fix admin access permissions and refactor routing structure

display a fixed error for unmet permissions when retrieving the schema. moved auth routes outside of BkndProvider and reorganized remaining routes to include BkndWrapper.

* fix: properly type BkndWrapper

* bump fix release version

* ModuleManager: update diff checking and AppData validation

Revised diff handling includes validation of diffs, reverting changes on failure, and enforcing module constraints with onBeforeUpdate hooks. Introduced `validateDiffs` and backup of stable configs. Applied changes in related modules, tests, and UI layer to align with updated diff logic.

* fix: cli: running from config file were using invalid args

* fix: cli: improve sequence of onBuilt trigger to allow custom routes from cli

* fix e2e tests
2025-04-20 09:29:58 +02:00
dswbx
2c29e06fb8 fix: media infinite should be disabled for dropzone in entities 2025-04-05 18:01:04 +02:00
dswbx
44b3f72005 added media overlay preview fallback 2025-04-01 13:37:11 +02:00
dswbx
96781f5d3d removed admin config from server, theme is now client side, fixed module manager migrations 2025-03-11 17:41:33 +01:00
dswbx
ab73b02138 refactor console verbosity and internal env handling 2025-03-04 11:18:14 +01:00
dswbx
6c1eea76e5 added missing cache directives to media adapter serving 2025-03-03 07:14:01 +01:00
dswbx
dd48962901 added auth strategies migration, fixed rebuild of modules on migrations 2025-02-27 10:08:22 +01:00
dswbx
7743f71a11 added format command and added trailing commas to reduce conflicts 2025-02-26 20:06:03 +01:00
dswbx
fb725be0ed dev: only report env once 2025-02-21 07:44:07 +01:00
dswbx
94c40de011 fix media mime guessing when uploading to entity 2025-02-20 11:32:24 +01:00
dswbx
e2217c411a added deboug routes cli action 2025-02-18 09:25:34 +01:00
dswbx
2c6a4d2bed update app create config to accept libsql config directly 2025-02-12 09:21:51 +01:00
dswbx
7ddcfc89b4 fixed auth strategy toggle, updated astro/remix 2025-01-17 18:08:23 +01:00
dswbx
c19d3b2d75 fix entity list unnecessary parameters 2025-01-17 13:43:45 +01:00
dswbx
c732566f63 Add integration tests for auth, improve auth middleware and cookies handling 2025-01-11 10:52:31 +01:00
dswbx
bb756548a6 Fix entity referencing issue during post-seeded relational fetch 2025-01-10 17:28:43 +01:00
dswbx
a8c20d3675 Refactor module schema handling and add sync mechanism
Redesigned entity and index management with methods to streamline schema updates and added a sync flag to signal required DB syncs post-build. Enhanced test coverage and functionality for schema modifications, including support for additional fields.
2025-01-10 14:43:39 +01:00
dswbx
f0d502133e Refactor Vite integration and update docs
Introduced a Vite adapter with "fresh" and "cached" modes, centralized dev server configuration, and streamlined the example setup. Updated documentation with detailed steps for Vite integration and revised the internal dev environment to align with the changes.
2025-01-10 09:46:00 +01:00
dswbx
b7ec4982dc cli: automatically register local adapter 2024-12-10 15:50:41 +01:00
dswbx
290498de6e refactor registries to make registration more convenient 2024-12-10 08:47:23 +01:00
dswbx
c31bc2ccb0 changed build workflow – for auth it's required to have better control over html and assets 2024-11-27 16:19:37 +01:00
dswbx
2433833ad0 reworked html serving, added new permissions for api/auth, updated adapters 2024-11-23 11:21:09 +01:00
dswbx
6077f0e64f added onBeforeUpdate listener + auto create a secret on auth enable 2024-11-21 16:24:33 +01:00
dswbx
0df5c761ec fix: when auth is disabled, the users entity doesn't exist 2024-11-21 08:23:16 +01:00
dswbx
4fd315da98 fix enum field causing issues when created in modal + changed data empty button text/target 2024-11-18 16:42:27 +01:00
dswbx
95ea2c8919 update 2024-11-16 12:57:27 +01:00
dswbx
90f80c4280 public commit 2024-11-16 12:01:47 +01:00