Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions packages/init/src/InitManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { existsSync, promises as fsp } from 'node:fs';
import { promises as fsp } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

Expand All @@ -11,14 +11,6 @@ const DEFAULT_PROJECT_ROOT_PATH = './';

const NAME_REGEX = /^[a-zA-Z.\-_]+$/;

const RENAME_FILES =
{
'_gitignore': '.gitignore',
'_package.json': 'package.json',
'_tsconfig.json': 'tsconfig.json',
'_vite.config.ts': 'vite.config.ts'
};

export default class InitManager
{
readonly #templateRootPath: string;
Expand All @@ -43,8 +35,6 @@ export default class InitManager
}

await this.#copyTemplate(projectName, templateName);

this.#renameFiles(projectName);
}

#createTemplateRootPath(): string
Expand Down Expand Up @@ -90,25 +80,4 @@ export default class InitManager

return fsp.cp(templateLocation, projectLocation, { recursive: true, force: true });
}

async #renameFiles(projectName: string): Promise<void>
{
const projectLocation = path.join(this.#projectRootPath, projectName);

const files = Object.entries(RENAME_FILES);
const promises = [];

for (const [source, target] of files)
{
const sourceFileLocation = path.join(projectLocation, source);
const targetFileLocation = path.join(projectLocation, target);

if (existsSync(sourceFileLocation))
{
promises.push(fsp.rename(sourceFileLocation, targetFileLocation));
}
}

await Promise.all(promises);
}
}
20 changes: 0 additions & 20 deletions packages/init/templates/backend/_tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/init/templates/backend/jitar.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"source": "./dist",
"source": "./build",
"target": "./dist",
"segments": "./segments"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"type": "module",
"private": true,
"scripts": {
"build": "rimraf dist && tsc -p tsconfig.json && jitar build",
"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"
Comment on lines +6 to +17

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 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
done

Repository: 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:


🌐 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:


🌐 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:


Build script looks consistent, but jitar dependency range likely breaks npm install

  • rimraf@^6.1.3 and typescript@5.9.3 are present on npm.
  • dependencies.jitar: ^0.11.0 is not resolvable because npm’s jitar package 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.

}
}
8 changes: 8 additions & 0 deletions packages/init/templates/backend/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../build",
"rootDir": "./"
},
"include": ["./"]
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"paths": {
"^/*": ["./src/*"],
}
},
"include": ["src", "test"]
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler"
}
}
28 changes: 0 additions & 28 deletions packages/init/templates/react/_package.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/init/templates/react/_tsconfig.json

This file was deleted.

14 changes: 0 additions & 14 deletions packages/init/templates/react/_vite.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/init/templates/react/jitar.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"source": "./dist",
"source": "./build",
"target": "./dist",
"segments": "./segments"
}
28 changes: 28 additions & 0 deletions packages/init/templates/react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "jitar-react-starter",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "npm run build-domain && npm run build-app",
"build-domain": "rimraf build dist && tsc -p src/tsconfig.json && jitar build",
"build-app": "vite build --config src/app/vite.config.ts",
"standalone": "jitar start --service=services/standalone.json"
},
"dependencies": {
"jitar": "^0.11.0",
"react": "^19.2.6",
"react-dom": "^19.2.6"
},
"devDependencies": {
"@jitar/plugin-vite": "^0.11.0",
"@types/node": "^24.12.4",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.2.0",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"vite": "^7.3.3"
}
}
1 change: 0 additions & 1 deletion packages/init/templates/react/public/vite.svg

This file was deleted.

1 change: 1 addition & 0 deletions packages/init/templates/react/services/standalone.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"standalone":
{
"segments": ["default"],
"assetRoot": "./app",
"assets": ["index.html", "vite.svg", "assets/**/*"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { useEffect, useState } from 'react';

import './App.css';
import reactLogo from './assets/react.svg';
import jitarLogo from './assets/jitar.svg';
import reactLogo from '../assets/react.svg';
import jitarLogo from '../assets/jitar.svg';

import { sayHello } from '../domain/sayHello';
import { sayHello } from '../../domain/sayHello';

export default function App()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/webui/main.tsx"></script>
<script type="module" src="./components/main.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions packages/init/templates/react/src/app/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/init/templates/react/src/app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"types": ["vite/client"],
"jsx": "react-jsx",
"noEmit": true,
},
"include": ["./"]
}
25 changes: 25 additions & 0 deletions packages/init/templates/react/src/app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import jitar, { JitarConfig } from '@jitar/plugin-vite';

const jitarConfig: JitarConfig = {
projectRoot: '../../',
sourceRoot: '../',
jitarUrl: 'http://localhost:3000',
segments: [],
middleware: []
};

export default defineConfig({
root: './src/app',
publicDir: 'public',
build: {
outDir: '../../dist/app',
emptyOutDir: true
},
plugins: [
react(),
jitar(jitarConfig)
]
});
8 changes: 8 additions & 0 deletions packages/init/templates/react/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../build",
"rootDir": "./"
},
"include": ["./domain"]
}
1 change: 0 additions & 1 deletion packages/init/templates/react/src/vite-env.d.ts

This file was deleted.

11 changes: 0 additions & 11 deletions packages/init/templates/react/tsconfig.build.json

This file was deleted.

15 changes: 15 additions & 0 deletions packages/init/templates/react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"types": ["node"],
"useDefineForClassFields": true,
"allowJs": false,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler"
}
}
26 changes: 0 additions & 26 deletions packages/init/templates/vue/_package.json

This file was deleted.

19 changes: 0 additions & 19 deletions packages/init/templates/vue/_tsconfig.json

This file was deleted.

Loading
Loading