Commit Graph

170 Commits

Author SHA1 Message Date
dswbx
f792d8b93e feat(repository): add implicit joins in where clauses 2025-12-02 09:38:16 +01:00
dswbx
a2fa11ccd0 refactor modes implementation and improve validation handling
refactor `code` and `hybrid` modes for better type safety and configuration flexibility. add `_isProd` helper to standardize environment checks and improve plugin syncing warnings. adjust validation logic for clean JSON schema handling and enhance test coverage for modes.
2025-11-20 21:08:16 +01:00
dswbx
e9f1241ec3 fix tests: remove .only 2025-11-05 08:20:36 +01:00
dswbx
a91ddb1ec3 update deps 2025-10-31 21:33:11 +01:00
dswbx
be39e8a391 chore: bump version to 0.19.0-rc.3 and update JsonField handling for improved value parsing 2025-10-28 16:07:43 +01:00
dswbx
2847e64b77 feat: enhance query handling by ignoring undefined values
- Updated query conversion logic to skip undefined values, improving robustness.
- Added tests to validate that undefined values are correctly ignored in query specifications.
2025-10-26 21:22:42 +01:00
dswbx
28390b0b84 refactor: move query.spec.ts 2025-10-26 21:08:11 +01:00
dswbx
0b58cadbd0 feat: implement mergeFilters function and enhance query object merging
- Added mergeFilters function to combine filter objects with priority handling.
- Introduced comprehensive tests for mergeFilters in permissions.spec.ts.
- Created query.spec.ts to validate query structure and expression handling.
- Enhanced error messages in query.ts for better debugging and clarity.
2025-10-26 21:05:11 +01:00
dswbx
0df17221df Merge branch 'release/0.19' into feat/advanced-permissions 2025-10-24 15:15:56 +02:00
dswbx
649c465bd0 Merge pull request #279 from bknd-io/fix/dropzone-improve-mime
fix: dropzone improve mime type validation
2025-10-24 15:11:19 +02:00
dswbx
67604b344a Merge pull request #284 from bknd-io/fix/sdk-api-auth
fix: SDK improvements to API and `useAuth` for remote instance
2025-10-24 15:10:29 +02:00
dswbx
38902ebcba Update permissions handling and enhance Guard functionality
- Bump `jsonv-ts` dependency to 0.8.6.
- Refactor permission checks in the `Guard` class to improve context validation and error handling.
- Update tests to reflect changes in permission handling, ensuring robust coverage for new scenarios.
- Introduce new test cases for data permissions, enhancing overall test coverage and reliability.
2025-10-21 16:44:08 +02:00
dswbx
511c6539fb fix: update authentication verification logic in Api tests
- Adjusted test cases in Api.spec.ts to reflect the correct authentication verification state.
- Updated expectations to ensure that the `isAuthVerified` method returns true when no claims are provided, aligning with the intended behavior of the API.
2025-10-15 18:46:21 +02:00
dswbx
0347efa592 fix Role creation method and permission checks in tests 2025-10-14 16:49:42 +02:00
dswbx
7e5c28d621 enhance Guard and permission handling with new test cases
- Updated the `Guard` class to improve context validation and permission checks, ensuring clearer error messages for unmet conditions.
- Refactored the `Policy` and `RolePermission` classes to support default effects and better handle conditions and filters.
- Enhanced tests in `authorize.spec.ts` and `permissions.spec.ts` to cover new permission scenarios, including guest and member role behaviors.
- Added new tests for context validation in permission middleware, ensuring robust error handling for invalid contexts.
- Improved utility functions for better integration with the updated permission structure.
2025-10-13 21:03:49 +02:00
dswbx
2f88c2216c refactor: restructure permission handling and enhance Guard functionality
- Introduced a new `createGuard` function to streamline the creation of Guard instances with permissions and roles.
- Updated tests in `authorize.spec.ts` to reflect changes in permission checks, ensuring they now return undefined for denied permissions.
- Added new `Permission` and `Policy` classes to improve type safety and flexibility in permission management.
- Refactored middleware and controller files to utilize the updated permission structure, including context handling for permissions.
- Created a new `SystemController.spec.ts` file to test the integration of the new permission system within the SystemController.
- Removed legacy permission handling from core security files, consolidating permission logic within the new structure.
2025-10-13 18:20:46 +02:00
dswbx
b784e1c1c4 Merge remote-tracking branch 'origin/release/0.19' into feat/advanced-permissions 2025-10-03 20:27:07 +02:00
dswbx
90f93caff4 refactor: enhance permission handling and introduce new Permission and Policy classes
- Updated the `Guard` class to improve permission checking by utilizing the new `Permission` class.
- Refactored tests in `authorize.spec.ts` to use `Permission` instances instead of strings for better type safety.
- Introduced a new `permissions.spec.ts` file to test the functionality of the `Permission` and `Policy` classes.
- Enhanced the `recursivelyReplacePlaceholders` utility function to support various object structures and types.
- Updated middleware and controller files to align with the new permission handling structure.
2025-10-03 20:22:42 +02:00
dswbx
d6dcfe3acc feat: implement file acceptance validation in utils and integrate with Dropzone component 2025-10-01 09:46:16 +02:00
dswbx
6483ff74bb Merge pull request #271 from bknd-io/feat/auth-helper-cookie
feat: add helper methods for auth cookie headers
2025-10-01 09:40:03 +02:00
dswbx
5cf91bb35a Merge pull request #273 from bknd-io/feat/schema-batch-statements
feat: batch schema manager statements
2025-10-01 09:39:19 +02:00
dswbx
d1ba638cd5 fix: refine mime type checks and improve MediaInfoModal layout
Updated tests to check for mime types using `toStartWith` for better validation. Adjusted mime type patterns in DropzoneInner for XML handling. Modified MediaInfoModal to enhance layout responsiveness and broaden text format support for previews, ensuring better file handling and user experience.
2025-09-29 16:07:40 +02:00
dswbx
55082e9d0e feat: improve media handling
added local range requests, fix mime type detection, improve uploading using FormData, correctly use mime type allow list, added previews for audio, pdf and text
2025-09-29 14:55:19 +02:00
dswbx
0d74625270 feat: fix PDF mime type detection and enhance filename handling tests
Updated the mime types to include "pdf" in the application category. Enhanced the test suite for media mime types to validate filename handling for PDF files, ensuring correct extensions are maintained based on file type and name. This improves the robustness of the file handling logic in the application.
2025-09-29 09:55:02 +02:00
dswbx
1128ac500d feat: add code-only tests and enhance CLI sync command with seeding option
Introduced a new test suite for code-only applications, validating app creation, database sync behavior, and seeding functionality. Enhanced the CLI sync command to include a seeding option, allowing for explicit seeding during database synchronization. Added error handling for unresolved config files in the run command.
2025-09-24 16:23:16 +02:00
dswbx
06d7558c3c feat: batch schema manager statements
run all schema modification queries in a single batch/transaction, to enable automatic rollbacks, and to stay within cloudflare's subrequest limits in free plan.
2025-09-24 14:48:45 +02:00
dswbx
ace9c1b2b9 feat: add helper methods for auth cookie headers
introduced `getAuthCookieHeader` and `removeAuthCookieHeader` methods to simplify header management for authentication cookies. added tests to validate the new methods.
2025-09-24 10:26:07 +02:00
dswbx
832eb6ac31 feat: add migration to version 10 and update tests
introduced a new config migration to version 10, updated related tests to validate migration.
2025-09-24 09:58:22 +02:00
dswbx
49aee37199 feat: lazy load mcp server 2025-09-23 13:46:39 +02:00
dswbx
17d4adbbfa chore: bump version to 0.18.0-rc.4 and enhance test logging
Updated the package version to 0.18.0-rc.4. Improved test logging by disabling console output during tests to reduce noise and enhance readability. Adjusted various test files to implement console log management, ensuring cleaner test outputs.
2025-09-19 20:41:35 +02:00
dswbx
99a812cc75 test: remove unused parameter from getDummyConnection calls 2025-09-18 10:23:18 +02:00
dswbx
ffdf453fea fix: remove non-unique index test
The removed test no longer aligns with the current `EntityIndex` implementation, as non-unique validation is not applicable anymore.
2025-09-18 09:52:05 +02:00
dswbx
8c4a8d91a2 fix: secret handling and relation naming logic
Implemented improved handling for secrets in `DbModuleManager`, allowing secret merging and building before saving. Enhanced `ManyToManyRelation` naming to produce valid identifiers and ensured better testing coverage for both changes.
2025-09-18 09:47:47 +02:00
dswbx
9aae6e78d6 config: allow full property usage in app function and improve type consistency
Added support for all properties in the `app` function configuration and ensured consistent type definitions for `BkndConfig`. Updated `makeConfig` function to reflect these changes and added relevant unit tests.
2025-09-16 16:41:16 +02:00
dswbx
317b2b50ad fix cli for cloudflare proxy and plugins
- proper cli exists required for cloudflare proxy to dispose
- updated cloudflare proxy to allow proxy options (e.g. remote)
- updated config command to include proper required structure for the export on code mode
2025-09-16 16:08:01 +02:00
dswbx
e8f2c70279 mm: added secrets extraction for db mode 2025-09-04 15:20:12 +02:00
dswbx
2c5371610b fix types, refactor db manager to db 2025-09-04 13:00:27 +02:00
dswbx
758a89b5d7 fix tests: replace initialConfig with config 2025-09-04 10:44:14 +02:00
dswbx
5a27c41516 mcp: fix tests changing new default mcp endpoint 2025-08-30 14:08:20 +02:00
dswbx
5c28511fe6 added getMcpClient to app 2025-08-15 10:27:05 +02:00
dswbx
aafd333d12 fix form isRequired utils and test 2025-08-14 16:56:12 +02:00
dswbx
9ac5fa03c6 optimized performance 2025-08-14 10:05:15 +02:00
dswbx
70f0240da5 mcp: added auth tests, updated data tests 2025-08-12 22:13:09 +02:00
dswbx
a6ed74d904 added mcp tests for media 2025-08-12 20:57:13 +02:00
dswbx
bd3d2ea900 added data mcp tests 2025-08-12 20:22:38 +02:00
dswbx
871cec9251 Merge remote-tracking branch 'origin/release/0.17' into feat/mcp
# Conflicts:
#	app/src/data/AppData.ts
#	app/src/data/server/query.ts
#	examples/cloudflare-worker/src/index.ts
2025-08-12 16:17:26 +02:00
dswbx
375d2c205f adapter(cloudflare): removed durable mode, added withPlatformProxy (#233)
* removed `durable` mode as it requires an import from "cloudflare:" that often fails in non-cf environments

* remove worker configuration types

* add `withPlatformProxy`

* withPlatformProxy: make configuration optional
2025-08-12 15:29:09 +02:00
dswbx
f40ea0ec5b init mcp data tests, added crud for $record 2025-08-12 12:55:14 +02:00
dswbx
1e8c373dd4 added mcp server tests 2025-08-12 09:17:38 +02:00
dswbx
2e145bbf95 init mcp tools test 2025-08-12 08:51:32 +02:00