repo-do 1.0.2 → 1.2.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/bin/repo-do.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import('../dist/index.js');
2
+ import('../dist/cli.js');
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import { initCommand } from './commands/init.js';
4
+ import { addCommand } from './commands/add.js';
5
+ import { listCommand } from './commands/list.js';
6
+ import { findCommand } from './commands/find.js';
7
+ import { removeCommand } from './commands/remove.js';
8
+ import { configCommand } from './commands/config.js';
9
+
10
+ const program = new Command();
11
+ program
12
+ .name('repo-do')
13
+ .description('Unified git repository management tool')
14
+ .version('1.0.0');
15
+ program
16
+ .command('init')
17
+ .description('Initialize configuration')
18
+ .action(initCommand);
19
+ program
20
+ .command('add <url>')
21
+ .description('Clone a git repository')
22
+ .allowUnknownOption()
23
+ .action((url, options, command) => {
24
+ const args = command.args.slice(1);
25
+ addCommand(url, { args });
26
+ });
27
+ program
28
+ .command('list')
29
+ .description('List all managed repositories')
30
+ .option('--refresh', 'Refresh repository cache')
31
+ .action((options) => {
32
+ listCommand({ refresh: options.refresh });
33
+ });
34
+ program
35
+ .command('find <prefix>')
36
+ .description('Find repositories by name prefix')
37
+ .action(findCommand);
38
+ program
39
+ .command('remove <identifier>')
40
+ .description('Remove repository from management (files not deleted)')
41
+ .action(removeCommand);
42
+ program
43
+ .command('config')
44
+ .description('View or modify configuration')
45
+ .option('--get <key>', 'Get configuration value')
46
+ .option('--set <key>', 'Set configuration key')
47
+ .option('--value <value>', 'Configuration value to set')
48
+ .action((options) => {
49
+ configCommand({
50
+ get: options.get,
51
+ set: options.set,
52
+ value: options.value,
53
+ });
54
+ });
55
+ program.parse();
56
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sources":["../src/cli.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAUA,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;AAE7B;KACG,IAAI,CAAC,SAAS;KACd,WAAW,CAAC,wCAAwC;KACpD,OAAO,CAAC,OAAO,CAAC;AAEnB;KACG,OAAO,CAAC,MAAM;KACd,WAAW,CAAC,0BAA0B;KACtC,MAAM,CAAC,WAAW,CAAC;AAEtB;KACG,OAAO,CAAC,WAAW;KACnB,WAAW,CAAC,wBAAwB;AACpC,KAAA,kBAAkB;KAClB,MAAM,CAAC,CAAC,GAAW,EAAE,OAAY,EAAE,OAAgB,KAAI;IACtD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAClC,IAAA,UAAU,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEJ;KACG,OAAO,CAAC,MAAM;KACd,WAAW,CAAC,+BAA+B;AAC3C,KAAA,MAAM,CAAC,WAAW,EAAE,0BAA0B;AAC9C,KAAA,MAAM,CAAC,CAAC,OAAO,KAAI;IAClB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3C,CAAC,CAAC;AAEJ;KACG,OAAO,CAAC,eAAe;KACvB,WAAW,CAAC,kCAAkC;KAC9C,MAAM,CAAC,WAAW,CAAC;AAEtB;KACG,OAAO,CAAC,qBAAqB;KAC7B,WAAW,CAAC,uDAAuD;KACnE,MAAM,CAAC,aAAa,CAAC;AAExB;KACG,OAAO,CAAC,QAAQ;KAChB,WAAW,CAAC,8BAA8B;AAC1C,KAAA,MAAM,CAAC,aAAa,EAAE,yBAAyB;AAC/C,KAAA,MAAM,CAAC,aAAa,EAAE,uBAAuB;AAC7C,KAAA,MAAM,CAAC,iBAAiB,EAAE,4BAA4B;AACtD,KAAA,MAAM,CAAC,CAAC,OAAO,KAAI;AAClB,IAAA,aAAa,CAAC;QACZ,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;AACrB,KAAA,CAAC;AACJ,CAAC,CAAC;AAEJ,OAAO,CAAC,KAAK,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/commands/find.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB/D"}
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/commands/find.ts"],"names":[],"mappings":"AAKA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C/D"}
@@ -1,4 +1,6 @@
1
+ import inquirer from 'inquirer';
1
2
  import { repositoryManager } from '../core/repository-manager.js';
3
+ import { clipboardUtil } from '../utils/clipboard.js';
2
4
  import { logger } from '../utils/logger.js';
3
5
 
4
6
  async function findCommand(prefix) {
@@ -12,6 +14,33 @@ async function findCommand(prefix) {
12
14
  repos.forEach((repo, index) => {
13
15
  console.log(`${index + 1}. ${repo.fullPath}`);
14
16
  });
17
+ let selectedRepo;
18
+ if (repos.length === 1) {
19
+ selectedRepo = repos[0];
20
+ logger.info(`Auto-selected: ${selectedRepo.fullPath}`);
21
+ }
22
+ else {
23
+ const { selectedRepo: repo } = await inquirer.prompt([
24
+ {
25
+ type: 'list',
26
+ name: 'selectedRepo',
27
+ message: 'Select a repository:',
28
+ choices: repos.map(repo => ({
29
+ name: `${repo.domain}/${repo.group}/${repo.name}`,
30
+ value: repo,
31
+ })),
32
+ },
33
+ ]);
34
+ selectedRepo = repo;
35
+ }
36
+ const cdCommand = `cd ${selectedRepo.fullPath}`;
37
+ const copied = await clipboardUtil.copy(cdCommand);
38
+ if (copied) {
39
+ logger.success(`Copied to clipboard: ${cdCommand}`);
40
+ }
41
+ else {
42
+ console.log(`\n${cdCommand}`);
43
+ }
15
44
  }
16
45
  catch (error) {
17
46
  logger.error(`Failed to find repositories: ${error.message}`);
@@ -1 +1 @@
1
- {"version":3,"file":"find.js","sources":["../../src/commands/find.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGO,eAAe,WAAW,CAAC,MAAc,EAAA;AAC9C,IAAA,IAAI;QACF,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,gBAAgB,CAAC,MAAM,CAAC;AAE9D,QAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,YAAA,MAAM,CAAC,IAAI,CAAC,mCAAmC,MAAM,CAAA,CAAA,CAAG,CAAC;YACzD;QACF;QAEA,MAAM,CAAC,OAAO,CAAC,CAAA,MAAA,EAAS,KAAK,CAAC,MAAM,CAAA,cAAA,CAAgB,CAAC;QACrD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;AAC5B,YAAA,OAAO,CAAC,GAAG,CAAC,CAAA,EAAG,KAAK,GAAG,CAAC,CAAA,EAAA,EAAK,IAAI,CAAC,QAAQ,CAAA,CAAE,CAAC;AAC/C,QAAA,CAAC,CAAC;IACJ;IAAE,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,KAAK,CAAC,CAAA,6BAAA,EAAiC,KAAe,CAAC,OAAO,CAAA,CAAE,CAAC;AACxE,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;;;;"}
1
+ {"version":3,"file":"find.js","sources":["../../src/commands/find.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKO,eAAe,WAAW,CAAC,MAAc,EAAA;AAC9C,IAAA,IAAI;QACF,MAAM,KAAK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,MAAM,SAAS,GAAG,CAAA,GAAA,EAAM,YAAY,CAAC,QAAQ,EAAE;QAC/C,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;QAElD,IAAI,MAAM,EAAE;AACV,YAAA,MAAM,CAAC,OAAO,CAAC,wBAAwB,SAAS,CAAA,CAAE,CAAC;QACrD;aAAO;AACL,YAAA,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,CAAA,CAAE,CAAC;QAC/B;IACF;IAAE,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,KAAK,CAAC,CAAA,6BAAA,EAAiC,KAAe,CAAC,OAAO,CAAA,CAAE,CAAC;AACxE,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,30 @@
1
- #!/usr/bin/env node
2
- export {};
1
+ import { ICloneResult, IRepositoryInfo } from './types';
2
+ /**
3
+ * Add a repository programmatically
4
+ * @param url - Git repository URL
5
+ * @param options - Options with optional clone arguments
6
+ * @returns Clone result with path and status
7
+ */
8
+ export declare function add(url: string, options?: {
9
+ cloneArgs?: string[];
10
+ }): Promise<ICloneResult>;
11
+ /**
12
+ * List all managed repositories
13
+ * @param refresh - Force rebuild cache
14
+ * @returns List of repository information
15
+ */
16
+ export declare function list(refresh?: boolean): Promise<IRepositoryInfo[]>;
17
+ /**
18
+ * Find repositories by query
19
+ * @param query - Search query
20
+ * @returns List of matching repositories
21
+ */
22
+ export declare function find(query: string): Promise<IRepositoryInfo[]>;
23
+ /**
24
+ * Remove a repository from management
25
+ * @param identifier - Repository identifier (name or partial path)
26
+ */
27
+ export declare function remove(identifier: string): Promise<void>;
28
+ export type { ICloneResult, IFindResult, IRepositoryInfo, IGitMConfig, IParsedGitUrl } from './types';
29
+ export { GitMError } from './types';
3
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAe,eAAe,EAAE,MAAM,SAAS,CAAC;AAErE;;;;;GAKG;AACH,wBAAsB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAEpG;AAED;;;;GAIG;AACH,wBAAsB,IAAI,CAAC,OAAO,GAAE,OAAe,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAE/E;AAED;;;;GAIG;AACH,wBAAsB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAEpE;AAED;;;GAGG;AACH,wBAAsB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAGD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,56 +1,38 @@
1
- #!/usr/bin/env node
2
- import { Command } from 'commander';
3
- import { initCommand } from './commands/init.js';
4
- import { addCommand } from './commands/add.js';
5
- import { listCommand } from './commands/list.js';
6
- import { findCommand } from './commands/find.js';
7
- import { removeCommand } from './commands/remove.js';
8
- import { configCommand } from './commands/config.js';
1
+ import { repositoryManager } from './core/repository-manager.js';
2
+ export { GitMError } from './types/index.js';
9
3
 
10
- const program = new Command();
11
- program
12
- .name('repo-do')
13
- .description('Unified git repository management tool')
14
- .version('1.0.0');
15
- program
16
- .command('init')
17
- .description('Initialize configuration')
18
- .action(initCommand);
19
- program
20
- .command('add <url>')
21
- .description('Clone a git repository')
22
- .allowUnknownOption()
23
- .action((url, options, command) => {
24
- const args = command.args.slice(1);
25
- addCommand(url, { args });
26
- });
27
- program
28
- .command('list')
29
- .description('List all managed repositories')
30
- .option('--refresh', 'Refresh repository cache')
31
- .action((options) => {
32
- listCommand({ refresh: options.refresh });
33
- });
34
- program
35
- .command('find <prefix>')
36
- .description('Find repositories by name prefix')
37
- .action(findCommand);
38
- program
39
- .command('remove <identifier>')
40
- .description('Remove repository from management (files not deleted)')
41
- .action(removeCommand);
42
- program
43
- .command('config')
44
- .description('View or modify configuration')
45
- .option('--get <key>', 'Get configuration value')
46
- .option('--set <key>', 'Set configuration key')
47
- .option('--value <value>', 'Configuration value to set')
48
- .action((options) => {
49
- configCommand({
50
- get: options.get,
51
- set: options.set,
52
- value: options.value,
53
- });
54
- });
55
- program.parse();
4
+ /**
5
+ * Add a repository programmatically
6
+ * @param url - Git repository URL
7
+ * @param options - Options with optional clone arguments
8
+ * @returns Clone result with path and status
9
+ */
10
+ async function add(url, options = {}) {
11
+ return repositoryManager.cloneRepository(url, options.cloneArgs || []);
12
+ }
13
+ /**
14
+ * List all managed repositories
15
+ * @param refresh - Force rebuild cache
16
+ * @returns List of repository information
17
+ */
18
+ async function list(refresh = false) {
19
+ return repositoryManager.listRepositories(refresh);
20
+ }
21
+ /**
22
+ * Find repositories by query
23
+ * @param query - Search query
24
+ * @returns List of matching repositories
25
+ */
26
+ async function find(query) {
27
+ return repositoryManager.findRepositories(query);
28
+ }
29
+ /**
30
+ * Remove a repository from management
31
+ * @param identifier - Repository identifier (name or partial path)
32
+ */
33
+ async function remove(identifier) {
34
+ return repositoryManager.removeRepository(identifier);
35
+ }
36
+
37
+ export { add, find, list, remove };
56
38
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAUA,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;AAE7B;KACG,IAAI,CAAC,SAAS;KACd,WAAW,CAAC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EJ,OAAO,CAAC,KAAK,EAAE"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGA;;;;;AAKG;AACI,eAAe,GAAG,CAAC,GAAW,EAAE,UAAoC,EAAE,EAAA;AAC3E,IAAA,OAAO,iBAAiB,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;AACxE;AAEA;;;;AAIG;AACI,eAAe,IAAI,CAAC,UAAmB,KAAK,EAAA;AACjD,IAAA,OAAO,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,CAAC;AACpD;AAEA;;;;AAIG;AACI,eAAe,IAAI,CAAC,KAAa,EAAA;AACtC,IAAA,OAAO,iBAAiB,CAAC,gBAAgB,CAAC,KAAK,CAAC;AAClD;AAEA;;;AAGG;AACI,eAAe,MAAM,CAAC,UAAkB,EAAA;AAC7C,IAAA,OAAO,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC;AACvD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IAClB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAS3C;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IAClB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAoB3C;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
@@ -7,7 +7,18 @@ class ClipboardUtil {
7
7
  return true;
8
8
  }
9
9
  catch (error) {
10
- console.warn('Warning: Failed to copy to clipboard:', error.message);
10
+ const platform = process.platform;
11
+ let hint = '';
12
+ if (platform === 'linux') {
13
+ hint = ' Install xsel or xclip: sudo apt install xsel (Debian/Ubuntu) or sudo dnf install xsel (Fedora)';
14
+ }
15
+ else if (platform === 'darwin') {
16
+ hint = ' This should work on macOS, please check your system permissions.';
17
+ }
18
+ else if (platform === 'win32') {
19
+ hint = ' This should work on Windows, please check your system permissions.';
20
+ }
21
+ console.warn(`Warning: Failed to copy to clipboard.${hint}`);
11
22
  return false;
12
23
  }
13
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sources":["../../src/utils/clipboard.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAEa,aAAa,CAAA;IACxB,MAAM,IAAI,CAAC,IAAY,EAAA;AACrB,QAAA,IAAI;AACF,YAAA,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;AAC5B,YAAA,OAAO,IAAI;QACb;QAAE,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,uCAAuC,EAAG,KAAe,CAAC,OAAO,CAAC;AAC/E,YAAA,OAAO,KAAK;QACd;IACF;AACD;AAEM,MAAM,aAAa,GAAG,IAAI,aAAa;;;;"}
1
+ {"version":3,"file":"clipboard.js","sources":["../../src/utils/clipboard.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAEa,aAAa,CAAA;IACxB,MAAM,IAAI,CAAC,IAAY,EAAA;AACrB,QAAA,IAAI;AACF,YAAA,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;AAC5B,YAAA,OAAO,IAAI;QACb;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ;YACjC,IAAI,IAAI,GAAG,EAAE;AAEb,YAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;gBACxB,IAAI,GAAG,iGAAiG;YAC1G;AAAO,iBAAA,IAAI,QAAQ,KAAK,QAAQ,EAAE;gBAChC,IAAI,GAAG,mEAAmE;YAC5E;AAAO,iBAAA,IAAI,QAAQ,KAAK,OAAO,EAAE;gBAC/B,IAAI,GAAG,qEAAqE;YAC9E;AAEA,YAAA,OAAO,CAAC,IAAI,CAAC,wCAAwC,IAAI,CAAA,CAAE,CAAC;AAC5D,YAAA,OAAO,KAAK;QACd;IACF;AACD;AAEM,MAAM,aAAa,GAAG,IAAI,aAAa;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-do",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Unified git repository management tool",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -8,12 +8,6 @@
8
8
  "repo-do": "./bin/repo-do.js",
9
9
  "rpd": "./bin/repo-do.js"
10
10
  },
11
- "scripts": {
12
- "build": "rollup -c",
13
- "dev": "tsx src/index.ts",
14
- "test": "vitest",
15
- "prepublishOnly": "npm run build"
16
- },
17
11
  "keywords": [
18
12
  "git",
19
13
  "cli",
@@ -55,5 +49,10 @@
55
49
  "tsx": "^4.7.0",
56
50
  "typescript": "^5.3.3",
57
51
  "vitest": "^1.1.0"
52
+ },
53
+ "scripts": {
54
+ "build": "rollup -c",
55
+ "dev": "tsx src/index.ts",
56
+ "test": "vitest"
58
57
  }
59
- }
58
+ }