chore: updated starter templates#785
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbit
WalkthroughInitManager no longer renames underscore-prefixed template files. Backend, React, and Vue starter templates are restructured: jitar/source paths move from ./dist to ./build, new app-scoped Vite/TypeScript configs and package templates are added, and several legacy root-level template files are removed. ChangesTemplate Initialization and Configuration Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/init/src/InitManager.ts (1)
25-38:⚠️ Potential issue | 🟠 Major | ⚡ Quick winPotential scaffold regression after removing post-copy filename normalization
After Line 37,
init()only copies files. If any template still contains underscore-prefixed placeholder filenames, they will now be emitted unchanged (e.g.,_tsconfig.json), which can break generated projects. Please either (1) guarantee templates contain no underscore placeholders, or (2) add a fail-fast validation in init when such files are detected.#!/bin/bash set -euo pipefail echo "Checking for underscore-prefixed files in starter templates..." fd -t f '^_' packages/init/templates || true echo echo "Expected result: no files listed." echo "If files are listed, InitManager now copies them verbatim and scaffold output may be incorrect."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/init/src/InitManager.ts` around lines 25 - 38, The init method currently only calls `#verifyTemplateName` and `#copyTemplate`, so templates containing underscore-prefixed placeholder filenames (e.g., _tsconfig.json) will be copied verbatim; add a fail-fast validation: create a private helper (e.g., `#ensureNoUnderscorePlaceholders`(templateName)) and call it in init after `#verifyTemplateName` and before `#copyTemplate`; the helper should locate the template directory using the same resolution logic as `#copyTemplate`, recursively scan files, and if any file basename startsWith('_') throw a clear error (e.g., InvalidTemplatePlaceholder or a descriptive Error) that includes the offending path and templateName so init fails fast instead of producing broken scaffolds.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/init/templates/backend/package.json`:
- Around line 6-17: The package.json currently pins "jitar": "^0.11.0" which is
not published and will break npm install; update the dependency declaration for
jitar in package.json (the "dependencies" block) to a resolvable range such as
"0.10.6" or a semver range that includes the latest published release (e.g.
">=0.10.6 <0.11.0") so npm install succeeds while keeping the existing npm
scripts ("build", "standalone", "gateway", "hi", "hello") intact.
In `@packages/init/templates/vue/src/app/vite.config.ts`:
- Line 9: The jitarUrl constant in vite.config.ts currently uses
'http://localhost:3000', which differs from the standalone service origin;
update the jitarUrl value to use 'http://127.0.0.1:3000' so it matches the
standalone service origin and avoids cross-origin/credential mismatches; locate
the jitarUrl entry in the export and replace the host portion accordingly.
---
Outside diff comments:
In `@packages/init/src/InitManager.ts`:
- Around line 25-38: The init method currently only calls `#verifyTemplateName`
and `#copyTemplate`, so templates containing underscore-prefixed placeholder
filenames (e.g., _tsconfig.json) will be copied verbatim; add a fail-fast
validation: create a private helper (e.g.,
`#ensureNoUnderscorePlaceholders`(templateName)) and call it in init after
`#verifyTemplateName` and before `#copyTemplate`; the helper should locate the
template directory using the same resolution logic as `#copyTemplate`, recursively
scan files, and if any file basename startsWith('_') throw a clear error (e.g.,
InvalidTemplatePlaceholder or a descriptive Error) that includes the offending
path and templateName so init fails fast instead of producing broken scaffolds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fc0ad633-b49a-4781-9ab5-6bc66d17559c
⛔ Files ignored due to path filters (8)
packages/init/templates/react/public/vite.svgis excluded by!**/*.svgpackages/init/templates/react/src/app/assets/jitar.svgis excluded by!**/*.svgpackages/init/templates/react/src/app/assets/react.svgis excluded by!**/*.svgpackages/init/templates/react/src/app/public/vite.svgis excluded by!**/*.svgpackages/init/templates/vue/public/vite.svgis excluded by!**/*.svgpackages/init/templates/vue/src/app/assets/jitar.svgis excluded by!**/*.svgpackages/init/templates/vue/src/app/assets/vue.svgis excluded by!**/*.svgpackages/init/templates/vue/src/app/public/vite.svgis excluded by!**/*.svg
📒 Files selected for processing (43)
packages/init/src/InitManager.tspackages/init/templates/backend/.gitignorepackages/init/templates/backend/_tsconfig.jsonpackages/init/templates/backend/jitar.jsonpackages/init/templates/backend/package.jsonpackages/init/templates/backend/src/tsconfig.jsonpackages/init/templates/backend/tsconfig.jsonpackages/init/templates/react/.gitignorepackages/init/templates/react/_package.jsonpackages/init/templates/react/_tsconfig.jsonpackages/init/templates/react/_vite.config.tspackages/init/templates/react/jitar.jsonpackages/init/templates/react/package.jsonpackages/init/templates/react/services/standalone.jsonpackages/init/templates/react/src/app/components/App.csspackages/init/templates/react/src/app/components/App.tsxpackages/init/templates/react/src/app/components/index.csspackages/init/templates/react/src/app/components/main.tsxpackages/init/templates/react/src/app/index.htmlpackages/init/templates/react/src/app/tsconfig.jsonpackages/init/templates/react/src/app/vite.config.tspackages/init/templates/react/src/tsconfig.jsonpackages/init/templates/react/src/vite-env.d.tspackages/init/templates/react/tsconfig.build.jsonpackages/init/templates/react/tsconfig.jsonpackages/init/templates/vue/.gitignorepackages/init/templates/vue/_package.jsonpackages/init/templates/vue/_tsconfig.jsonpackages/init/templates/vue/_vite.config.tspackages/init/templates/vue/jitar.jsonpackages/init/templates/vue/package.jsonpackages/init/templates/vue/services/standalone.jsonpackages/init/templates/vue/src/app/components/App.vuepackages/init/templates/vue/src/app/components/main.tspackages/init/templates/vue/src/app/components/style.csspackages/init/templates/vue/src/app/index.htmlpackages/init/templates/vue/src/app/tsconfig.jsonpackages/init/templates/vue/src/app/vite.config.tspackages/init/templates/vue/src/domain/sayHello.jspackages/init/templates/vue/src/tsconfig.jsonpackages/init/templates/vue/src/vite-env.d.tspackages/init/templates/vue/tsconfig.build.jsonpackages/init/templates/vue/tsconfig.json
💤 Files with no reviewable changes (11)
- packages/init/templates/react/src/vite-env.d.ts
- packages/init/templates/react/_vite.config.ts
- packages/init/templates/vue/src/vite-env.d.ts
- packages/init/templates/react/tsconfig.build.json
- packages/init/templates/vue/_tsconfig.json
- packages/init/templates/react/_tsconfig.json
- packages/init/templates/backend/_tsconfig.json
- packages/init/templates/vue/_vite.config.ts
- packages/init/templates/react/_package.json
- packages/init/templates/vue/tsconfig.build.json
- packages/init/templates/vue/_package.json
| "build": "rimraf build dist && tsc -p src/tsconfig.json && jitar build", | ||
| "standalone": "jitar start --service=services/standalone.json", | ||
| "gateway": "jitar start --service=services/gateway.json", | ||
| "hi": "jitar start --service=services/hi.json", | ||
| "hello": "jitar start --service=services/hello.json" | ||
| }, | ||
| "dependencies": { | ||
| "jitar": "^0.10.2" | ||
| "jitar": "^0.11.0" | ||
| }, | ||
| "devDependencies": { | ||
| "rimraf": "^6.1.0" | ||
| "rimraf": "^6.1.3", | ||
| "typescript": "5.9.3" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm the pinned versions resolve on the npm registry
for pkg in "rimraf" "typescript" "jitar"; do
echo "== $pkg available versions (tail) =="
curl -s "https://registry.npmjs.org/$pkg" | jq -r '.versions | keys[]' | tail -20
doneRepository: MaskingTechnology/jitar
Length of output: 1997
🌐 Web query:
npm rimraf 6.1.3 version
💡 Result:
npm package rimraf version 6.1.3 was published on Feb 16, 2026 [1][2]. What changed in 6.1.3 (vs 6.1.2): the repo notes the 6.1.3 release on 2026-02-16 and shows a small package.json/package-lock.json update (dependency and TypeScript/@types updates), plus formatting/docs safety text changes [3]. The exact published version number in package.json and package-lock.json is updated from 6.1.2 to 6.1.3 [2]. Install it: npm install rimraf@6.1.3 [1] CLI supports --version to display its version [4].
Citations:
- 1: https://www.npmjs.com/package/rimraf?activeTab=versions
- 2: isaacs/rimraf@f738c78
- 3: isaacs/rimraf@v6.1.2...v6.1.3
- 4: https://npmx.dev/package/rimraf/v/6.1.3
🌐 Web query:
npm typescript 5.9.3 version
💡 Result:
npm typescript 5.9.3 corresponds to the TypeScript compiler release 5.9.3. The official TypeScript repo release tag v5.9.3 is dated 2025-10-01, and the npm package version list shows 5.9.2–5.9.3 published in the Sep 2025 window; the 5.9.3 release notes announcement is linked from the tag page.
Citations:
- 1: https://github.com/microsoft/TypeScript/releases/tag/v5.9.3
- 2: https://www.npmjs.com/package/typescript?activeTab=versions
- 3: https://github.com/microsoft/typescript/releases
- 4: https://npmx.dev/package/typescript/v/5.9.3
- 5: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-9.html
🌐 Web query:
npm jitar 0.11.0 version
💡 Result:
The npm package “jitar” does not have version 0.11.0. The latest published version on npm for “jitar” is 0.10.6 (npm page shows latest 0.10.6), and npm’s registry version history lists versions up to 0.10.7 (no 0.11.0 entry). [1][2] If you meant a different package named similarly (e.g., “jiter” from pydantic, which has a v0.11.0 release—but that is not the npm package “jitar”). [3]
Citations:
- 1: https://www.npmjs.com/package/jitar?activeTab=versions
- 2: https://registry.npmjs.org/jitar
- 3: https://github.com/pydantic/jiter/releases/tag/v0.11.0
Build script looks consistent, but jitar dependency range likely breaks npm install
rimraf@^6.1.3andtypescript@5.9.3are present on npm.dependencies.jitar: ^0.11.0is not resolvable because npm’sjitarpackage has no 0.11.0 version (latest is 0.10.6), so the template install may fail until the npm package publishes 0.11.0 or the range is adjusted.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/init/templates/backend/package.json` around lines 6 - 17, The
package.json currently pins "jitar": "^0.11.0" which is not published and will
break npm install; update the dependency declaration for jitar in package.json
(the "dependencies" block) to a resolvable range such as "0.10.6" or a semver
range that includes the latest published release (e.g. ">=0.10.6 <0.11.0") so
npm install succeeds while keeping the existing npm scripts ("build",
"standalone", "gateway", "hi", "hello") intact.
| const jitarConfig: JitarConfig = { | ||
| projectRoot: '../../', | ||
| sourceRoot: '../', | ||
| jitarUrl: 'http://localhost:3000', |
There was a problem hiding this comment.
Use the same host as standalone service URL.
jitarUrl uses localhost while standalone uses 127.0.0.1. These are different origins in browsers and can cause credential/CORS inconsistencies in the starter setup.
Suggested change
- jitarUrl: 'http://localhost:3000',
+ jitarUrl: 'http://127.0.0.1:3000',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| jitarUrl: 'http://localhost:3000', | |
| jitarUrl: 'http://127.0.0.1:3000', |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/init/templates/vue/src/app/vite.config.ts` at line 9, The jitarUrl
constant in vite.config.ts currently uses 'http://localhost:3000', which differs
from the standalone service origin; update the jitarUrl value to use
'http://127.0.0.1:3000' so it matches the standalone service origin and avoids
cross-origin/credential mismatches; locate the jitarUrl entry in the export and
replace the host portion accordingly.
|



Fixes #783
Changes proposed in this pull request:
init manager.@MaskingTechnology/jitar