feature/upgrade-to-node-24#66
Open
marioserrano09 wants to merge 13 commits into
Open
Conversation
…e dependency to 24.12.2
… and @vitejs/plugin-vue
- Add StorageTarget type and SftpConfig interface to types - Create StorageProvider interface and StorageProviderRegistry for extensible storage backends - Extract LocalStorageProvider from StorageService - Add SftpStorageProvider using ssh2-sftp-client with connection pooling and local staging - Refactor StorageService as a provider-routing facade (registerProvider API) - Update BucketService.create() to accept storageTarget and sftpConfig - Move startup validation from BucketService to StorageService.validateStartup() - Update ThumbnailService to skip non-local buckets gracefully - Add SFTP error codes (SFTP_CONNECTION_FAILED, SFTP_AUTH_FAILED, SFTP_OPERATION_FAILED) - Update runtime to register SftpStorageProvider and close providers on shutdown - Update CLI create bucket command with --storage, --sftp-* options - Export new types and classes from public API - Add ssh2-sftp-client + @types/ssh2-sftp-client dependencies - Add 12 new tests covering registry, routing, SFTP bucket creation, and thumbnail skip Agent-Logs-Url: https://github.com/dynamiatools/framework/sessions/97161935-81bf-45e8-8ff8-2e03a9172fd6 Co-authored-by: marioserrano09 <5221275+marioserrano09@users.noreply.github.com>
…rage-service feat(simple-file-server): add SFTP storage support with extensible provider architecture
… feature/upgrade-to-node-24
…d remote URL accessor
…moteStoredEntityFile
…nd update related methods
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repository’s Node/TypeScript toolchain toward Node 24 and refreshes related frontend build tooling, while also bumping the Java/Maven module version set to 26.5.2 and refactoring parts of the Entity Files remote storage integration.
Changes:
- Upgrade Node/TS baseline (Node
>=24, TSES2023) and update Vite/Vitest/@types-node across workspace packages. - Bump Maven module versions to
26.5.2and updatedynamia.zk.versionto1.2.0. - Refactor Entity Files: introduce
FORCE_STORAGE, adjust download implementation, and rename/update remote storage integration toBuckieEntityFileStorage; remove thesimple-file-serverNode package from this repo.
Reviewed changes
Copilot reviewed 94 out of 98 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.base.json | Bumps TS target/lib baseline to ES2023. |
| themes/theme-dynamical/sources/pom.xml | Version bump to 26.5.2 in theme module. |
| themes/pom.xml | Version bump to 26.5.2 in themes aggregator. |
| pom.xml | Parent version bump to 26.5.2; updates dynamia.zk.version. |
| pnpm-workspace.yaml | Adjusts pnpm allowBuilds (argon2). |
| platform/ui/zk/pom.xml | Version bumps to 26.5.2 for UI/ZK module deps. |
| platform/ui/ui-shared/pom.xml | Version bumps to 26.5.2 for shared UI deps. |
| platform/starters/zk-starter/pom.xml | Version bumps to 26.5.2 for starter deps. |
| platform/packages/vue/package.json | Package version bump + Node 24 toolchain upgrades + engines constraint. |
| platform/packages/ui-core/package.json | Package version bump + Node 24 toolchain upgrades + engines constraint. |
| platform/packages/sdk/package.json | Package version bump + Node 24 toolchain upgrades + engines constraint. |
| platform/packages/sdk/package-lock.json | Updates sdk lockfile version field but leaves dependency pins. |
| platform/packages/cli/tsconfig.json | Bumps CLI TS target to ES2023. |
| platform/packages/cli/package.json | CLI package version bump. |
| platform/packages/cli/package-lock.json | CLI lockfile updated for version and Node 24 engines. |
| platform/core/web/pom.xml | Version bumps to 26.5.2 for web core module deps. |
| platform/core/viewers/pom.xml | Version bumps to 26.5.2 for viewers core module deps. |
| platform/core/templates/pom.xml | Version bumps to 26.5.2 for templates core module deps. |
| platform/core/reports/pom.xml | Version bump to 26.5.2 for reports core module. |
| platform/core/navigation/pom.xml | Version bumps to 26.5.2 for navigation core module deps. |
| platform/core/io/src/main/java/tools/dynamia/io/IOUtils.java | Refactors IO helpers (NPE guards, transferTo, Zip Slip protection, deletion walk). |
| platform/core/io/pom.xml | Version bump to 26.5.2 for IO core module. |
| platform/core/integration/pom.xml | Version bumps to 26.5.2 for integration core module deps. |
| platform/core/domain/pom.xml | Version bump to 26.5.2 for domain core module. |
| platform/core/domain-jpa/pom.xml | Version bumps to 26.5.2 for domain-jpa module deps. |
| platform/core/crud/pom.xml | Version bumps to 26.5.2 for CRUD core module deps. |
| platform/core/commons/pom.xml | Version bump to 26.5.2 for commons core module. |
| platform/core/actions/pom.xml | Version bumps to 26.5.2 for actions core module deps. |
| platform/app/pom.xml | Version bumps to 26.5.2 for platform app module deps. |
| package.json | Workspace Node/pnpm engines + toolchain upgrades; workspace version update. |
| extensions/security/sources/ui/pom.xml | Version bumps to 26.5.2 for security UI module deps. |
| extensions/security/sources/pom.xml | Version bump to 26.5.2 for security extension aggregator. |
| extensions/security/sources/core/pom.xml | Version bumps to 26.5.2 for security core module deps. |
| extensions/saas/sources/ui/pom.xml | Version bumps to 26.5.2 for SaaS UI module deps. |
| extensions/saas/sources/remote/pom.xml | Version bumps to 26.5.2 for SaaS remote module deps. |
| extensions/saas/sources/pom.xml | Version bump to 26.5.2 for SaaS extension aggregator. |
| extensions/saas/sources/jpa/pom.xml | Version bumps to 26.5.2 for SaaS JPA module deps. |
| extensions/saas/sources/core/src/main/java/tools/dynamia/modules/saas/AccountEntityFileProvider.java | Removes SaaS-specific EntityFileAccountProvider implementation. |
| extensions/saas/sources/core/pom.xml | Version bumps to 26.5.2 for SaaS core module deps. |
| extensions/saas/sources/api/pom.xml | Version bumps to 26.5.2 for SaaS API module deps. |
| extensions/saas/packages/saas-sdk/package.json | Node 24 toolchain upgrades + engines constraint + version bump. |
| extensions/reports/sources/ui/pom.xml | Version bumps to 26.5.2 for reports UI module deps. |
| extensions/reports/sources/pom.xml | Version bump to 26.5.2 for reports extension aggregator. |
| extensions/reports/sources/core/pom.xml | Version bumps to 26.5.2 for reports core module deps. |
| extensions/reports/sources/api/pom.xml | Version bump to 26.5.2 for reports API module. |
| extensions/reports/packages/reports-sdk/package.json | Node 24 toolchain upgrades + engines constraint + version bump. |
| extensions/pom.xml | Version bump to 26.5.2 for extensions aggregator. |
| extensions/finances/sources/pom.xml | Version bump to 26.5.2 for finances extension aggregator. |
| extensions/finances/sources/api/pom.xml | Version bump to 26.5.2 for finances API module. |
| extensions/file-importer/sources/ui/pom.xml | Version bumps to 26.5.2 for importer UI module deps. |
| extensions/file-importer/sources/pom.xml | Version bump to 26.5.2 for importer extension aggregator. |
| extensions/file-importer/sources/core/pom.xml | Version bumps to 26.5.2 for importer core module deps. |
| extensions/entity-files/sources/ui/src/main/resources/META-INF/descriptors/EntityFileConfig.yml | Adds FORCE_STORAGE parameter to UI descriptor. |
| extensions/entity-files/sources/ui/pom.xml | Version bumps to 26.5.2 for entity-files UI module deps. |
| extensions/entity-files/sources/s3/src/main/java/tools/dynamia/modules/entityfiles/s3/S3EntityFileStorage.java | Updates static imports to new remote storage helper class. |
| extensions/entity-files/sources/s3/pom.xml | Version bumps to 26.5.2 for entity-files S3 module deps. |
| extensions/entity-files/sources/pom.xml | Version bump to 26.5.2 for entity-files extension aggregator. |
| extensions/entity-files/sources/core/src/test/java/tools/dynamia/modules/entityfile/remote/BuckieEntityFileStorageTest.java | Updates tests for renamed remote storage class and ctor changes. |
| extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/service/impl/EntityFileServiceImpl.java | Adds FORCE_STORAGE behavior and OutputStream download overload; switches to Resource-based download. |
| extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/service/EntityFileService.java | Adds isForceEntityFileStorage() to service interface. |
| extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/remote/BuckieEntityFileStorage.java | Renames/adjusts remote storage implementation and headers; adds dual (remote/public) URL handling. |
| extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/local/LocalEntityFileStorage.java | Simplifies constructor signature; minor URL formatting tweak. |
| extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/EntityFileAccountProvider.java | Adds default isValidEntityFile(...) method. |
| extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/controller/EntityFileStorageController.java | Replaces account check with isValidEntityFile(...) delegation. |
| extensions/entity-files/sources/core/pom.xml | Version bumps to 26.5.2 for entity-files core module deps. |
| extensions/entity-files/packages/simple-file-server/vitest.config.ts | Removes simple-file-server Vitest config (package removal). |
| extensions/entity-files/packages/simple-file-server/tsconfig.json | Removes simple-file-server TS config (package removal). |
| extensions/entity-files/packages/simple-file-server/tsconfig.build.json | Removes simple-file-server build TS config (package removal). |
| extensions/entity-files/packages/simple-file-server/test/core.test.ts | Removes simple-file-server tests (package removal). |
| extensions/entity-files/packages/simple-file-server/src/types/index.ts | Removes simple-file-server exported types (package removal). |
| extensions/entity-files/packages/simple-file-server/src/thumbnail/thumbnail.service.ts | Removes thumbnail service implementation (package removal). |
| extensions/entity-files/packages/simple-file-server/src/storage/storage.service.ts | Removes storage service implementation (package removal). |
| extensions/entity-files/packages/simple-file-server/src/storage/bucket.service.ts | Removes bucket service implementation (package removal). |
| extensions/entity-files/packages/simple-file-server/src/runtime/index.ts | Removes runtime bootstrap (package removal). |
| extensions/entity-files/packages/simple-file-server/src/logging/logger.ts | Removes operational logger (package removal). |
| extensions/entity-files/packages/simple-file-server/src/index.ts | Removes package public API exports (package removal). |
| extensions/entity-files/packages/simple-file-server/src/http/server.ts | Removes server setup (package removal). |
| extensions/entity-files/packages/simple-file-server/src/http/routes/objects.route.ts | Removes HTTP object routes (package removal). |
| extensions/entity-files/packages/simple-file-server/src/http/plugins/auth.plugin.ts | Removes auth plugin (package removal). |
| extensions/entity-files/packages/simple-file-server/src/errors/index.ts | Removes error helpers (package removal). |
| extensions/entity-files/packages/simple-file-server/src/config/config.service.ts | Removes config service (package removal). |
| extensions/entity-files/packages/simple-file-server/src/cli/index.ts | Removes CLI entrypoint (package removal). |
| extensions/entity-files/packages/simple-file-server/src/cli/completion.ts | Removes CLI completion (package removal). |
| extensions/entity-files/packages/simple-file-server/src/auth/identity.service.ts | Removes identity service (package removal). |
| extensions/entity-files/packages/simple-file-server/simple-file-server-full-plan.md | Removes SFS design doc (package removal). |
| extensions/entity-files/packages/simple-file-server/README.md | Removes SFS README (package removal). |
| extensions/entity-files/packages/simple-file-server/package.json | Removes SFS package manifest (package removal). |
| extensions/entity-files/packages/simple-file-server/examples/embedded/package.json | Removes embedded example manifest (package removal). |
| extensions/entity-files/packages/simple-file-server/examples/embedded/index.js | Removes embedded example entrypoint (package removal). |
| extensions/entity-files/packages/files-sdk/package.json | Node 24 toolchain upgrades + engines constraint + version bump. |
| extensions/email-sms/sources/ui/pom.xml | Version bumps to 26.5.2 for email UI module deps. |
| extensions/email-sms/sources/pom.xml | Version bump to 26.5.2 for email extension aggregator. |
| extensions/email-sms/sources/core/pom.xml | Version bumps to 26.5.2 for email core module deps. |
| extensions/dashboard/sources/pom.xml | Version bumps to 26.5.2 for dashboard extension deps. |
| examples/demo-zk-books/pom.xml | Updates example tools.version to 26.5.2. |
| examples/demo-vue-books/package.json | Updates Vite/plugin-vue versions for Node 24 toolchain. |
Files not reviewed (2)
- platform/packages/cli/package-lock.json: Language not supported
- platform/packages/sdk/package-lock.json: Language not supported
Comments suppressed due to low confidence (2)
extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/remote/BuckieEntityFileStorage.java:57
- The class Javadoc is now inconsistent with the implementation: it still mentions X-SFS-Identity/X-SFS-Secret, and the “Files are served…” paragraph is left incomplete. Also, the buildRemoteUrl method comment says it builds a local proxy URL, but it actually returns the remote SFS/Buckie URL. Please update the Javadoc/comments to match the new header names and behavior to avoid misleading integrators.
platform/packages/sdk/package-lock.json:18 - platform/packages/sdk/package-lock.json still pins old devDependencies (e.g.,
@types/node^22, vite ^6, vitest ^3) even though package.json in this PR updates them to Node 24 / Vite 8 / Vitest 4. Regenerate/update the lockfile (or remove it if pnpm is the source of truth) so installs are reproducible and consistent with the declared devDependencies.
Comment on lines
+568
to
574
| private boolean isValidAccount(EntityFile entityFile) { | ||
| EntityFileAccountProvider accountProvider = Containers.get().findObject(EntityFileAccountProvider.class); | ||
| if (accountProvider != null) { | ||
| if (entityFile.getAccountId() != null) { | ||
| return entityFile.getAccountId().equals(accountProvider.getAccountId()); | ||
| } | ||
| if (accountProvider != null && entityFile != null) { | ||
| return accountProvider.isValidEntityFile(entityFile); | ||
| } | ||
| return true; | ||
| } |
Comment on lines
+37
to
+45
| /** | ||
| * Check is the account id is valid, by default just validate if account id not null | ||
| * | ||
| * @param entityFile | ||
| * @return valid | ||
| */ | ||
| default boolean isValidEntityFile(EntityFile entityFile) { | ||
| return entityFile != null && entityFile.getAccountId() != null && entityFile.getAccountId() > 0; | ||
| } |
Comment on lines
289
to
+315
| public void download(EntityFile entityFile, File outputFile) { | ||
| try { | ||
| StoredEntityFile storedEntityFile = download(entityFile); | ||
| if (storedEntityFile != null) { | ||
| IOUtils.copy(new URL(storedEntityFile.getUrl()).openStream(), outputFile); | ||
| var resource = storedEntityFile.toResource(); | ||
| if (resource != null) { | ||
| IOUtils.copy(resource.getInputStream(), outputFile); | ||
| } | ||
| } | ||
| } catch (Exception e) { | ||
| throw new EntityFileException("Error downloading entity file to local file", e); | ||
| } | ||
| } | ||
|
|
||
| public void download(EntityFile entityFile, OutputStream outputStream) { | ||
| try { | ||
| StoredEntityFile storedEntityFile = download(entityFile); | ||
| if (storedEntityFile != null) { | ||
| var resource = storedEntityFile.toResource(); | ||
| if (resource != null) { | ||
| IOUtils.copy(resource.getInputStream(), outputStream); | ||
| } | ||
| } | ||
| } catch (Exception e) { | ||
| throw new EntityFileException("Error downloading entity file to outputstream", e); | ||
| } | ||
| } |
Comment on lines
1
to
4
| { | ||
| "name": "@dynamia-tools/workspace", | ||
| "version": "26.4.1", | ||
| "version": "26.5.1", | ||
| "private": true, |
…eStorage is not found
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
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.
No description provided.