den-github-manager 1.0.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.
@@ -0,0 +1,23 @@
1
+ export class TemplateManager {
2
+ constructor() {
3
+ this.templates = new Map();
4
+ this.loadDefaultTemplates();
5
+ }
6
+
7
+ loadDefaultTemplates() {
8
+ // Templates are loaded from the generator
9
+ // This class can be extended for custom template management
10
+ }
11
+
12
+ getTemplate(name) {
13
+ return this.templates.get(name);
14
+ }
15
+
16
+ listTemplates() {
17
+ return Array.from(this.templates.keys());
18
+ }
19
+
20
+ addTemplate(name, template) {
21
+ this.templates.set(name, template);
22
+ }
23
+ }
package/src/index.js ADDED
@@ -0,0 +1,6 @@
1
+ export { Analyzer } from './core/analyzer.js';
2
+ export { Generator } from './core/generator.js';
3
+ export { GitHubClient } from './core/github-client.js';
4
+ export { TemplateManager } from './core/template-manager.js';
5
+ export { Logger } from './utils/logger.js';
6
+ export { Config } from './utils/config.js';
@@ -0,0 +1,57 @@
1
+ import fs from 'fs/promises';
2
+ import path from 'path';
3
+ import os from 'os';
4
+
5
+ export class Config {
6
+ constructor() {
7
+ this.configDir = path.join(os.homedir(), '.den-github-manager');
8
+ this.configFile = path.join(this.configDir, 'config.json');
9
+ this.config = {};
10
+ }
11
+
12
+ async load() {
13
+ try {
14
+ const data = await fs.readFile(this.configFile, 'utf-8');
15
+ this.config = JSON.parse(data);
16
+ } catch {
17
+ // Config doesn't exist, use defaults
18
+ this.config = this.getDefaults();
19
+ }
20
+
21
+ return this.config;
22
+ }
23
+
24
+ async save() {
25
+ await fs.mkdir(this.configDir, { recursive: true });
26
+ await fs.writeFile(
27
+ this.configFile,
28
+ JSON.stringify(this.config, null, 2)
29
+ );
30
+ }
31
+
32
+ get(key) {
33
+ return this.config[key];
34
+ }
35
+
36
+ set(key, value) {
37
+ this.config[key] = value;
38
+ }
39
+
40
+ getAll() {
41
+ return this.config;
42
+ }
43
+
44
+ getDefaults() {
45
+ return {
46
+ defaultTemplate: 'simple',
47
+ autoMode: false,
48
+ dryRun: false,
49
+ methodology: 'kanban',
50
+ labelColors: {
51
+ 'P0:Critical': 'd73a4a',
52
+ 'P1:High': 'ff9800',
53
+ 'P2:Medium': 'fbca04'
54
+ }
55
+ };
56
+ }
57
+ }
@@ -0,0 +1,49 @@
1
+ import chalk from 'chalk';
2
+
3
+ export class Logger {
4
+ info(message) {
5
+ console.log(chalk.blue('ℹ'), message);
6
+ }
7
+
8
+ success(message) {
9
+ console.log(chalk.green('✓'), message);
10
+ }
11
+
12
+ warn(message) {
13
+ console.log(chalk.yellow('⚠'), message);
14
+ }
15
+
16
+ error(message) {
17
+ console.log(chalk.red('✗'), message);
18
+ }
19
+
20
+ section(title) {
21
+ console.log('\n' + chalk.bold.cyan(title));
22
+ console.log(chalk.gray('─'.repeat(title.length)));
23
+ }
24
+
25
+ status(condition, message) {
26
+ const icon = condition ? chalk.green('✓') : chalk.red('✗');
27
+ console.log(icon, message);
28
+ }
29
+
30
+ table(data) {
31
+ console.table(data);
32
+ }
33
+
34
+ json(data) {
35
+ console.log(JSON.stringify(data, null, 2));
36
+ }
37
+
38
+ dim(message) {
39
+ console.log(chalk.dim(message));
40
+ }
41
+
42
+ bold(message) {
43
+ console.log(chalk.bold(message));
44
+ }
45
+
46
+ newline() {
47
+ console.log();
48
+ }
49
+ }