@geekmidas/cli 0.27.0 → 0.28.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/cli",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs",
5
5
  "private": false,
6
6
  "type": "module",
@@ -48,11 +48,11 @@
48
48
  "lodash.kebabcase": "^4.1.1",
49
49
  "openapi-typescript": "^7.4.2",
50
50
  "prompts": "~2.4.2",
51
- "@geekmidas/constructs": "~0.6.0",
52
- "@geekmidas/schema": "~0.1.0",
51
+ "@geekmidas/logger": "~0.4.0",
53
52
  "@geekmidas/errors": "~0.1.0",
54
53
  "@geekmidas/envkit": "~0.4.0",
55
- "@geekmidas/logger": "~0.4.0"
54
+ "@geekmidas/constructs": "~0.6.0",
55
+ "@geekmidas/schema": "~0.1.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/lodash.kebabcase": "^4.1.9",
@@ -20,18 +20,9 @@ export function generateModelsPackage(
20
20
  private: true,
21
21
  type: 'module',
22
22
  exports: {
23
- '.': {
24
- types: './dist/index.d.ts',
25
- import: './dist/index.js',
26
- },
27
- './*': {
28
- types: './dist/*.d.ts',
29
- import: './dist/*.js',
30
- },
23
+ './*': './src/*.ts',
31
24
  },
32
25
  scripts: {
33
- build: 'tsc',
34
- 'build:watch': 'tsc --watch',
35
26
  typecheck: 'tsc --noEmit',
36
27
  },
37
28
  dependencies: {
@@ -42,7 +33,7 @@ export function generateModelsPackage(
42
33
  },
43
34
  };
44
35
 
45
- // tsconfig.json for models - library package that builds to dist
36
+ // tsconfig.json for models - extends root config
46
37
  const tsConfig = {
47
38
  extends: '../../tsconfig.json',
48
39
  compilerOptions: {
package/src/init/index.ts CHANGED
@@ -395,6 +395,21 @@ export async function initCommand(
395
395
  }
396
396
  }
397
397
 
398
+ // Initialize git repository
399
+ console.log('\nšŸ“¦ Initializing git repository...\n');
400
+ try {
401
+ execSync('git init', { cwd: targetDir, stdio: 'pipe' });
402
+ execSync('git branch -M main', { cwd: targetDir, stdio: 'pipe' });
403
+ execSync('git add .', { cwd: targetDir, stdio: 'pipe' });
404
+ execSync('git commit -m "šŸŽ‰ Project created with @geekmidas/toolbox"', {
405
+ cwd: targetDir,
406
+ stdio: 'pipe',
407
+ });
408
+ console.log(' Initialized git repository on branch main');
409
+ } catch {
410
+ console.log(' Could not initialize git repository (git may not be installed)');
411
+ }
412
+
398
413
  // Print success message with next steps
399
414
  printNextSteps(name, templateOptions, pkgManager);
400
415
  }