feat: Add @dynamia-tools/cli — project scaffolding CLI#57
feat: Add @dynamia-tools/cli — project scaffolding CLI#57marioserrano09 merged 24 commits intovue-supportfrom
Conversation
…ontend generators, and install.sh Co-authored-by: marioserrano09 <5221275+marioserrano09@users.noreply.github.com> Agent-Logs-Url: https://github.com/dynamiatools/framework/sessions/07bbccf6-9bbf-4a03-832d-6df9a79eba92
Basic vue support (beta)
Upgrade to ZK v10.2.1
Upgrade to Spring Boot 4.0.5
Feat: Improve Saas Accounts payments processors
…project configuration
There was a problem hiding this comment.
Pull request overview
Adds a new @dynamia-tools/cli Node.js scaffolding CLI to generate Dynamia Platform backend/frontend projects from Git templates (with token replacement), while also bumping the monorepo release version and updating several platform/extension components.
Changes:
- Introduces
platform/packages/cli(interactivedynamia new, template validation, token replacement, bootstrap installer). - Bumps framework/modules/packages to
26.4.1and updates root dependency versions (Spring Boot, ZK, AWS, Swagger). - Extends SaaS payment-provider domain/UI descriptors and refactors a few platform components (e.g.,
ProviderPickerBox, defaultModuleProviderbean placement).
Reviewed changes
Copilot reviewed 82 out of 84 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| themes/theme-dynamical/sources/pom.xml | Bump parent/dependency versions to 26.4.1 |
| themes/pom.xml | Bump parent version to 26.4.1 |
| pom.xml | Bump root version + dependency version properties |
| platform/ui/zk/src/main/java/tools/dynamia/zk/ui/ProviderPickerBox.java | Refactor renderer/selection logic; add Javadoc; minor API tweaks |
| platform/ui/zk/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/ui/ui-shared/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/starters/zk-starter/pom.xml | Bump starter + internal deps to 26.4.1 |
| platform/packages/vue/package.json | Bump version + formatting cleanup |
| platform/packages/ui-core/package.json | Bump version + formatting cleanup |
| platform/packages/sdk/package.json | Bump version to 26.4.1 |
| platform/packages/sdk/package-lock.json | Align lock version to 26.4.1 |
| platform/packages/package.json | Workspace package version update |
| platform/packages/cli/tsconfig.json | New CLI TS config (NodeNext, strict, emit types) |
| platform/packages/cli/src/utils/template-repo.ts | New helper: validate repo + branch via git |
| platform/packages/cli/src/utils/replace.ts | New helper: token replacement + Java package/class renames |
| platform/packages/cli/src/utils/logger.ts | New helper: banner, spinner, error codes, friendly git errors |
| platform/packages/cli/src/utils/env.ts | New helper: git/java/node environment checks |
| platform/packages/cli/src/utils/config.ts | New helper: parse/load cli.properties into typed config |
| platform/packages/cli/src/index.ts | CLI entrypoint + command dispatch (new) |
| platform/packages/cli/src/generators/frontend.ts | Frontend generation (clone template; Vite fallback) |
| platform/packages/cli/src/generators/backend.ts | Backend generation (clone template; token/package rename) |
| platform/packages/cli/src/commands/new.ts | dynamia new interactive wizard flow |
| platform/packages/cli/package.json | New published package metadata, bin, deps, engines |
| platform/packages/cli/package-lock.json | New lockfile for CLI dependencies |
| platform/packages/cli/install.sh | New curl-installable bootstrap installer script |
| platform/packages/cli/cli.properties | New single-source CLI config (versions/repos/tokens) |
| platform/packages/cli/README.md | New CLI documentation and conventions |
| platform/core/web/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/viewers/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/templates/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/reports/pom.xml | Bump module to 26.4.1 |
| platform/core/navigation/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/io/pom.xml | Bump module to 26.4.1 |
| platform/core/integration/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/domain/pom.xml | Bump module to 26.4.1 |
| platform/core/domain-jpa/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/crud/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/core/commons/pom.xml | Bump module to 26.4.1 |
| platform/core/actions/pom.xml | Bump module + internal deps to 26.4.1 |
| platform/app/src/main/java/tools/dynamia/app/DynamiaToolsWebApplication.java | Remove default ModuleProvider bean from app class |
| platform/app/src/main/java/tools/dynamia/app/DynamiaBaseConfiguration.java | Add default ModuleProvider bean in base configuration |
| platform/app/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/security/sources/ui/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/security/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/security/sources/core/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/saas/sources/ui/src/main/resources/META-INF/descriptors/AccountRegionTable.yml | Add paymentProvider column |
| extensions/saas/sources/ui/src/main/resources/META-INF/descriptors/AccountRegionForm.yml | Adjust layout columns |
| extensions/saas/sources/ui/src/main/resources/META-INF/descriptors/AccountPaymentProviderTable.yml | Remove serviceURL from table |
| extensions/saas/sources/ui/src/main/resources/META-INF/descriptors/AccountPaymentProviderForm.yml | Add new secrets/extra fields; regroup layout |
| extensions/saas/sources/ui/src/main/resources/META-INF/descriptors/AccountForm.yml | Add customPaymentProvider field to group |
| extensions/saas/sources/ui/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/saas/sources/remote/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/saas/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/saas/sources/jpa/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/saas/sources/core/src/main/java/tools/dynamia/modules/saas/domain/AccountPaymentProvider.java | Add integrity/webCheckout secrets + extra fields |
| extensions/saas/sources/core/src/main/java/tools/dynamia/modules/saas/domain/Account.java | Add customPaymentProvider relationship + accessors |
| extensions/saas/sources/core/src/main/java/tools/dynamia/modules/saas/AccountPaymentProcessor.java | Adjust interface (extra label defaults) |
| extensions/saas/sources/core/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/saas/sources/api/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/saas/packages/saas-sdk/package.json | Bump version to 26.4.1 |
| extensions/reports/sources/ui/pom.xml | Bump versions; use swagger.version property |
| extensions/reports/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/reports/sources/core/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/reports/sources/api/pom.xml | Bump module to 26.4.1 |
| extensions/reports/packages/reports-sdk/package.json | Bump version to 26.4.1 |
| extensions/pom.xml | Bump parent version to 26.4.1 |
| extensions/finances/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/finances/sources/api/pom.xml | Bump module to 26.4.1 |
| extensions/file-importer/sources/ui/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/file-importer/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/file-importer/sources/core/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/entity-files/sources/ui/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/entity-files/sources/s3/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/entity-files/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/entity-files/sources/core/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/entity-files/packages/files-sdk/package.json | Bump version to 26.4.1 |
| extensions/email-sms/sources/ui/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/email-sms/sources/pom.xml | Bump parent version to 26.4.1 |
| extensions/email-sms/sources/core/pom.xml | Bump module + internal deps to 26.4.1 |
| extensions/dashboard/sources/pom.xml | Bump module + internal deps to 26.4.1 |
| examples/demo-zk-books/pom.xml | Update example tools.version property |
| bump-version.sh | Add helper script to bump pnpm + Maven versions |
| README.md | Update docs to reflect new versioning/release version |
| .github/workflows/publish-npm.yml | Adjust pnpm setup step configuration |
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 (1)
extensions/saas/sources/core/src/main/java/tools/dynamia/modules/saas/AccountPaymentProcessor.java:7
- Javadoc says this interface is for “processing account payments”, but the processing method was removed and only metadata/label getters remain. Update the Javadoc to reflect the current contract (or restore the processing API if it’s still required).
/**
* Basic API to implement processing account payments. You should implement
* your own payment processor and register it using spring annotations
* registry.
*/
|
|
||
| configuration: | ||
| fields: [ locale, timeZone,skin, maxUsers,statusDescription,uuid,instanceUuid,creationDate,remote,autoInit,requiredInstanceUuid,redirect,templateAccount ] | ||
| fields: [ locale, timeZone,skin, maxUsers,statusDescription,uuid,instanceUuid,creationDate,customPaymentProvider,remote,autoInit,requiredInstanceUuid,redirect,templateAccount, ] |
There was a problem hiding this comment.
Inline YAML sequence has a trailing comma before the closing bracket, which is invalid YAML in many parsers and can break descriptor loading. Remove the trailing comma (and consider adding spaces after commas for readability).
| /** | ||
| * Check that Node.js >= 22 is available. | ||
| * Returns true if the requirement is satisfied. | ||
| */ | ||
| export async function checkNode(): Promise<boolean> { | ||
| try { | ||
| const result = await execa('node', ['--version'], { stdout: 'pipe' }) | ||
| const version = result.stdout.trim().replace(/^v/, '') | ||
| const majorStr = version.split('.')[0] | ||
| const major = majorStr && majorStr.length > 0 ? parseInt(majorStr, 10) : 0 | ||
| if (!isNaN(major) && major >= 22) { | ||
| return true | ||
| } | ||
| warn(`Node.js ${version} found but version >=22 is required. Please upgrade Node.js.`) | ||
| return false |
There was a problem hiding this comment.
Node.js version check is inconsistent with the CLI’s declared requirement (package.json engines >=24, cli.properties node.minimum.version=24, README says 24). checkNode currently accepts >=22; align it with the configured minimum (ideally read from cli.properties/config) so users get accurate guidance.
| // Install Dynamia SDK packages | ||
| const sdkPkg = config.npm['sdk']?.package ?? DEFAULT_SDK_PACKAGE | ||
| const uiPkg = config.npm['ui-core']?.package ?? DEFAULT_UI_CORE_PACKAGE | ||
| await execa(pm, ['install', sdkPkg, uiPkg], { | ||
| cwd: targetDir, | ||
| stdio: 'inherit', | ||
| }) |
There was a problem hiding this comment.
Vite fallback installs packages using yarn install <pkg> / yarn install <pkg1> <pkg2>, which Yarn does not support (it should be yarn add). This will make the fallback path fail for Yarn users; branch on packageManager and use the correct add/install command per tool.
| replacements['<dynamia.version>26.4.1</dynamia.version>'] = `<dynamia.version>${dynamiaVersion}</dynamia.version>` | ||
| replacements['<version>4.0.5</version>'] = `<version>${springBootVersion}</version>` | ||
| replacements['<version>4.0.5.RELEASE</version>'] = `<version>${springBootVersion}</version>` |
There was a problem hiding this comment.
This file hardcodes specific framework versions (e.g. 26.4.1 and 4.0.5) in the replacement fallbacks, which contradicts the PR’s stated design goal that versions/URLs/tokens live only in cli.properties. Consider deriving these fallback match strings from config (or avoiding version-specific match strings) so bumps remain a properties-only change.
| { | ||
| "name": "@dynamia-tools/platform-packages", | ||
| "version": "26.3.2", | ||
| "version": "26.4.0", |
There was a problem hiding this comment.
Workspace package version is set to 26.4.0 while the rest of the PR bumps packages to 26.4.1. This inconsistency can confuse tooling and release automation; align this version with the release version used elsewhere.
| <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format> | ||
|
|
||
| <tools.version>26.3.2</tools.version> | ||
| <tools.version>26.4.0</tools.version> |
There was a problem hiding this comment.
Example project still references tools.version 26.4.0, but the repository version is being bumped to 26.4.1. Update this property so the demo stays aligned with the released BOM/artifacts.
| <tools.version>26.4.0</tools.version> | |
| <tools.version>26.4.1</tools.version> |
| Starting with version **26.4.1**, Dynamia Platform adopts **Calendar Versioning (CalVer)** with the format `YY.MM.MINOR`. This means: | ||
| - **All modules share the same version**: Core, extensions, starters, themes—everything is released together | ||
| - **26.4.0** = First release of February 2026 (Year 26, Month 02, Release 0) | ||
| - **26.4.1** = First release of February 2026 (Year 26, Month 02, Release 0) | ||
| - **26.2.1** = Second release of February 2026 |
There was a problem hiding this comment.
CalVer explanation is internally inconsistent: it states 26.4.1 is the first February 2026 release and calls it “Release 0”. With YY.MM.MINOR, the first release for a month should typically be .0; either adjust the examples/text or update the version referenced here.
Adds a new Node.js CLI package at
platform/packages/cli/that scaffolds Dynamia Platform projects by cloning GitHub templates and performing token replacement. Published as@dynamia-tools/cli.Package structure
Key design decisions
cli.propertiesis the only config file — no versions, URLs, or token strings hardcoded in TypeScript. Adding a new template or bumping a version is a one-line properties edit.checkGit()runs before any prompts; missing git exits immediately with install instructions.com.example.demosource trees are moved to the computedgroupId.artifactIdpath, all token placeholders replaced in.java/.kt/.xml/.yml/…, andDemoApplication.*renamed to match the artifact ID.vite.fallback.enabled=true, a yellow warning is printed and Vite scaffolding proceeds without re-prompting."type": "module", all imports use.jsextension (NodeNext resolution).dynamia newwizard flowProduces:
install.shSingle-command bootstrap for Linux (apt/dnf/pacman) and macOS (brew):
curl -fsSL https://get.dynamia.tools | bashInstalls prerequisites, JDK 25 via SDKMAN, Node.js LTS via fnm, patches shell profile idempotently, then runs
npm install -g @dynamia-tools/cli && dynamia new.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.