codemerge-cli 1.0.0 → 1.0.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.
@@ -1,8 +1,11 @@
1
1
  export declare class Logger {
2
+ private static readonly PREFIX;
2
3
  static info(message: string): void;
3
4
  static success(message: string): void;
4
5
  static error(message: string): void;
5
6
  static warning(message: string): void;
6
7
  static plain(message: string): void;
8
+ static figlet(text: string): void;
9
+ static table(head: string[], colWidths: number[], data: any[][]): void;
7
10
  }
8
11
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;WACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI3B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI9B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI9B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAG3C"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAIA,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAgC;WAEhD,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI3B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI9B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI9B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;WAI5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;WAI1B,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,IAAI;CAK9E"}
@@ -1,19 +1,30 @@
1
+ import Table from 'cli-table';
2
+ import figlet from 'figlet';
1
3
  import chalk from 'chalk';
2
4
  export class Logger {
3
5
  static info(message) {
4
- console.log(chalk.cyan(''), message);
6
+ console.log(`${this.PREFIX} ${chalk.cyan('[info]')} ${message}`);
5
7
  }
6
8
  static success(message) {
7
- console.log(chalk.green(''), message);
9
+ console.log(`${this.PREFIX} ${chalk.green('[success]')} ${message}`);
8
10
  }
9
11
  static error(message) {
10
- console.error(chalk.red(''), message);
12
+ console.error(`${this.PREFIX} ${chalk.redBright('[error]')} ${chalk.red(message)}`);
11
13
  }
12
14
  static warning(message) {
13
- console.log(chalk.yellow('⚠️'), message);
15
+ console.log(`${this.PREFIX} ${chalk.yellowBright('[warn]')} ${chalk.yellow(message)}`);
14
16
  }
15
17
  static plain(message) {
16
18
  console.log(message);
17
19
  }
20
+ static figlet(text) {
21
+ console.log(chalk.cyan(figlet.textSync(text)));
22
+ }
23
+ static table(head, colWidths, data) {
24
+ const table = new Table({ head, colWidths });
25
+ data.forEach(item => table.push(item));
26
+ console.log(table.toString());
27
+ }
18
28
  }
29
+ Logger.PREFIX = chalk.magenta('[codemerge]');
19
30
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,MAAM;IACV,MAAM,CAAC,IAAI,CAAC,OAAe;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,OAAe;QACnC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM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,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACzF,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,OAAe;QACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,IAAY;QAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAc,EAAE,SAAmB,EAAE,IAAa;QACpE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChC,CAAC;;AA9BuB,aAAM,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemerge-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "AI-focused code and data preparation utility",
5
5
  "license": "MIT",
6
6
  "author": "CodeMerge Team",
@@ -24,17 +24,22 @@
24
24
  "scripts": {
25
25
  "build": "tsc",
26
26
  "dev": "tsx watch src/cli.ts",
27
- "start": "node dist/cli.js",
27
+ "codemerge": "node dist/cli.js",
28
+ "publish": "node publish.js",
28
29
  "prepublishOnly": "npm run build"
29
30
  },
30
31
  "dependencies": {
31
- "chalk": "^5.4.1",
32
+ "chalk": "^5.6.2",
32
33
  "chokidar": "^3.6.0",
34
+ "cli-table": "^0.3.11",
33
35
  "commander": "^11.1.0",
36
+ "figlet": "^1.9.3",
34
37
  "glob": "^10.3.10"
35
38
  },
36
39
  "devDependencies": {
40
+ "@types/cli-table": "^0.3.4",
37
41
  "@types/node": "^20.10.0",
42
+ "dotenv": "^17.2.3",
38
43
  "tsx": "^4.7.0",
39
44
  "typescript": "^5.3.3"
40
45
  },
@@ -45,4 +50,4 @@
45
50
  "dist/**/*",
46
51
  "bin/**/*"
47
52
  ]
48
- }
53
+ }