create-arktos 1.5.0 → 1.5.1
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/cli.js +8 -8
- package/eslint.config.js +40 -25
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -52,13 +52,13 @@ function createProject(projectName) {
|
|
|
52
52
|
console.log('🔧 Updating project configuration...');
|
|
53
53
|
const templatePackageJsonPath = path.join(ROOT_DIR, packageTemplate);
|
|
54
54
|
const targetPackageJsonPath = path.join(projectName, 'package.json');
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
if (fs.existsSync(templatePackageJsonPath)) {
|
|
57
57
|
const packageJson = JSON.parse(fs.readFileSync(templatePackageJsonPath, 'utf8'));
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
// Update project name
|
|
60
60
|
packageJson.name = projectName;
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
fs.writeFileSync(targetPackageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -89,7 +89,7 @@ function createProject(projectName) {
|
|
|
89
89
|
|
|
90
90
|
} catch (error) {
|
|
91
91
|
console.error('❌ Error creating project:', error.message);
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
// Cleanup on error
|
|
94
94
|
try {
|
|
95
95
|
if (fs.existsSync(projectName)) {
|
|
@@ -98,7 +98,7 @@ function createProject(projectName) {
|
|
|
98
98
|
} catch (cleanupError) {
|
|
99
99
|
console.error('❌ Error during cleanup:', cleanupError.message);
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
process.exit(1);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -259,7 +259,7 @@ A modern Node.js backend API built with Arktos boilerplate.
|
|
|
259
259
|
- \`npm run lint\` - Run ESLint
|
|
260
260
|
- \`npm run db:studio\` - Open Prisma Studio
|
|
261
261
|
|
|
262
|
-
Happy coding!
|
|
262
|
+
Happy coding! 🎉`,
|
|
263
263
|
};
|
|
264
264
|
|
|
265
265
|
// Write config files
|
|
@@ -269,11 +269,11 @@ Happy coding! 🎉`
|
|
|
269
269
|
|
|
270
270
|
// Copy template files from root
|
|
271
271
|
const templateFiles = ['.env.example', 'vercel.json', 'tsconfig.json', 'eslint.config.js'];
|
|
272
|
-
|
|
272
|
+
|
|
273
273
|
for (const templateFile of templateFiles) {
|
|
274
274
|
const srcPath = path.join(ROOT_DIR, templateFile);
|
|
275
275
|
const destPath = path.join(dest, templateFile);
|
|
276
|
-
|
|
276
|
+
|
|
277
277
|
if (fs.existsSync(srcPath)) {
|
|
278
278
|
fs.copyFileSync(srcPath, destPath);
|
|
279
279
|
}
|
package/eslint.config.js
CHANGED
|
@@ -23,37 +23,52 @@ module.exports = [
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
rules: {
|
|
26
|
-
'no-unused-vars': [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
'no-unused-vars': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
argsIgnorePattern: '^_',
|
|
30
|
+
varsIgnorePattern: '^_',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'no-console': [
|
|
34
|
+
'warn',
|
|
35
|
+
{
|
|
36
|
+
allow: ['warn', 'error'],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
33
39
|
'prefer-const': 'error',
|
|
34
40
|
'no-var': 'error',
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
eqeqeq: ['error', 'always'],
|
|
42
|
+
curly: ['error', 'all'],
|
|
37
43
|
'brace-style': ['error', '1tbs'],
|
|
38
44
|
'comma-dangle': ['error', 'always-multiline'],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
indent: ['error', 2],
|
|
46
|
+
quotes: ['error', 'single'],
|
|
47
|
+
semi: ['error', 'always'],
|
|
42
48
|
'no-trailing-spaces': 'error',
|
|
43
|
-
'no-multiple-empty-lines': [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
'no-multiple-empty-lines': [
|
|
50
|
+
'error',
|
|
51
|
+
{
|
|
52
|
+
max: 2,
|
|
53
|
+
maxEOF: 1,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
47
56
|
'object-curly-spacing': ['error', 'always'],
|
|
48
57
|
'array-bracket-spacing': ['error', 'never'],
|
|
49
|
-
'key-spacing': [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
'key-spacing': [
|
|
59
|
+
'error',
|
|
60
|
+
{
|
|
61
|
+
beforeColon: false,
|
|
62
|
+
afterColon: true,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
'comma-spacing': [
|
|
66
|
+
'error',
|
|
67
|
+
{
|
|
68
|
+
before: false,
|
|
69
|
+
after: true,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
57
72
|
'no-undef': 'error',
|
|
58
73
|
'no-redeclare': 'error',
|
|
59
74
|
'no-dupe-keys': 'error',
|
|
@@ -76,4 +91,4 @@ module.exports = [
|
|
|
76
91
|
},
|
|
77
92
|
},
|
|
78
93
|
},
|
|
79
|
-
];
|
|
94
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-arktos",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "🚀 A modern Node.js backend boilerplate with TypeScript, Express, JWT authentication, Prisma ORM, PostgreSQL, and Resend email service. Includes complete authentication flow, security middleware, and database management.",
|
|
5
5
|
"main": "bin/cli.js",
|
|
6
6
|
"bin": {
|