create-jinmankn-app 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +38 -80
- package/package.json +6 -4
- /package/templates/{blueprint → Code blueprint}/BLUEPRINT_REPRODUCTION_PROMPT.md +0 -0
- /package/templates/{blueprint → Code blueprint}/HOW_IT_WORKS.md +0 -0
- /package/templates/{blueprint → Code blueprint}/README.md +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/config/db.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/controllers/authController.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/controllers/itemController.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/middleware/auth.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/middleware/errorHandler.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/models/Item.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/models/User.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/package-lock.json +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/package.json +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/routes/authRoutes.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/routes/healthRoutes.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/routes/itemRoutes.js +0 -0
- /package/templates/{blueprint → Code blueprint}/backend/server.js +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/.env.example +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/index.html +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/package-lock.json +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/package.json +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/public/favicon.svg +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/App.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/assets/logo.svg +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/components/DashboardLayout.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/components/ProtectedRoute.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/index.css +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/main.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/pages/DashboardHome.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/pages/Items.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/pages/Login.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/pages/Profile.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/pages/Register.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/src/pages/Report.jsx +0 -0
- /package/templates/{blueprint → Code blueprint}/frontend/vite.config.js +0 -0
- /package/templates/{blueprint → Code blueprint}/package.json +0 -0
- /package/templates/{blueprint → Code blueprint}/scripts/pack-blueprint.ps1 +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/.env.example +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/config/db.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/controllers/appointmentController.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/controllers/authController.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/controllers/hospitalReportController.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/controllers/medicalReportController.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/controllers/patientController.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/database/schema.sql +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/middleware/auth.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/middleware/errorHandler.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/middleware/role.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/package-lock.json +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/package.json +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/routes/appointmentRoutes.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/routes/authRoutes.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/routes/healthRoutes.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/routes/hospitalReportRoutes.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/routes/medicalReportRoutes.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/routes/patientRoutes.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/backend/server.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/.env.example +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/index.html +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/package-lock.json +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/package.json +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/public/favicon.svg +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/App.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/api.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/assets/logo.svg +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/components/DashboardLayout.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/components/ProtectedRoute.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/components/RoleRoute.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/index.css +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/main.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/Appointments.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/DashboardHome.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/Login.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/MedicalReports.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/Patients.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/Profile.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/Register.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/src/pages/Report.jsx +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/frontend/vite.config.js +0 -0
- /package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/package.json +0 -0
package/bin/index.js
CHANGED
|
@@ -1,87 +1,45 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { fileURLToPath } from "url";
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import fse from 'fs-extra';
|
|
6
|
+
import inquirer from 'inquirer';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
9
8
|
|
|
10
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
10
|
const __dirname = path.dirname(__filename);
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
message: "Choose a template:",
|
|
45
|
-
choices: templates.map((t) => ({
|
|
46
|
-
name: `${t}`,
|
|
47
|
-
value: t
|
|
48
|
-
}))
|
|
49
|
-
}
|
|
50
|
-
]);
|
|
51
|
-
|
|
52
|
-
const projectPath = path.join(
|
|
53
|
-
process.cwd(),
|
|
54
|
-
answers.projectName
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
const templatePath = path.join(
|
|
58
|
-
templatesDir,
|
|
59
|
-
answers.template
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
// 🔒 Prevent overwrite
|
|
63
|
-
if (fs.existsSync(projectPath)) {
|
|
64
|
-
console.log(chalk.red("Folder already exists!"));
|
|
65
|
-
process.exit(1);
|
|
12
|
+
async function run() {
|
|
13
|
+
const templatesDir = path.join(__dirname, '../templates');
|
|
14
|
+
|
|
15
|
+
const projects = fs.readdirSync(templatesDir)
|
|
16
|
+
.filter(item =>
|
|
17
|
+
fs.statSync(path.join(templatesDir, item)).isDirectory()
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const { project } = await inquirer.prompt([
|
|
21
|
+
{
|
|
22
|
+
type: 'list',
|
|
23
|
+
name: 'project',
|
|
24
|
+
message: 'Select a project:',
|
|
25
|
+
choices: projects
|
|
26
|
+
}
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
const { projectName } = await inquirer.prompt([
|
|
30
|
+
{
|
|
31
|
+
type: 'input',
|
|
32
|
+
name: 'projectName',
|
|
33
|
+
message: 'Enter project name:'
|
|
34
|
+
}
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
const source = path.join(templatesDir, project);
|
|
38
|
+
const destination = path.join(process.cwd(), projectName);
|
|
39
|
+
|
|
40
|
+
await fse.copy(source, destination);
|
|
41
|
+
|
|
42
|
+
console.log(`✅ Project "${projectName}" created successfully!`);
|
|
66
43
|
}
|
|
67
44
|
|
|
68
|
-
|
|
69
|
-
const spinner = ora("Creating project...").start();
|
|
70
|
-
|
|
71
|
-
try {
|
|
72
|
-
// 📂 Copy template into new folder
|
|
73
|
-
await fs.copy(templatePath, projectPath);
|
|
74
|
-
|
|
75
|
-
spinner.succeed(
|
|
76
|
-
chalk.green("Project created successfully!")
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
console.log("\n");
|
|
80
|
-
console.log(chalk.cyan("Next steps:"));
|
|
81
|
-
console.log(chalk.white(`cd ${answers.projectName}`));
|
|
82
|
-
console.log(chalk.white("npm install"));
|
|
83
|
-
console.log(chalk.white("npm run dev"));
|
|
84
|
-
} catch (err) {
|
|
85
|
-
spinner.fail(chalk.red("Failed to create project"));
|
|
86
|
-
console.log(err);
|
|
87
|
-
}
|
|
45
|
+
run().catch(console.error);
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-jinmankn-app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-jinmankn-app": "./bin/index.js"
|
|
7
|
-
},
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
8
9
|
"pub": "npm version patch -m \"release: %s\" && npm publish --access public"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
@@ -21,9 +22,10 @@
|
|
|
21
22
|
],
|
|
22
23
|
"license": "MIT",
|
|
23
24
|
"dependencies": {
|
|
25
|
+
"axios": "^1.16.1",
|
|
24
26
|
"chalk": "^5.6.0",
|
|
25
|
-
"fs-extra": "^11.3.
|
|
26
|
-
"inquirer": "^12.
|
|
27
|
+
"fs-extra": "^11.3.5",
|
|
28
|
+
"inquirer": "^12.11.1",
|
|
27
29
|
"ora": "^9.0.0"
|
|
28
30
|
}
|
|
29
31
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/{hospital-faisal → Faisal Hospital Managment System (FHMS) mysql}/package.json
RENAMED
|
File without changes
|