@jvittechs/jai1-cli 0.1.50
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/README.md +433 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +6788 -0
- package/dist/cli.js.map +1 -0
- package/package.json +80 -0
- package/redmine.config.example.yaml +29 -0
- package/scripts/redmine-sync-issue.sh +35 -0
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jvittechs/jai1-cli",
|
|
3
|
+
"version": "0.1.50",
|
|
4
|
+
"description": "Unified CLI for Jai1 Framework Management and Redmine Context Sync",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"jai1": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"redmine.config.example.yaml",
|
|
15
|
+
"scripts/redmine-sync-issue.sh"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "JVIT <dev@jvit.com>",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/jvittechs/jai.git",
|
|
25
|
+
"directory": "packages/cli"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/jvittechs/jai/tree/main/packages/cli#readme",
|
|
28
|
+
"keywords": [
|
|
29
|
+
"jai1",
|
|
30
|
+
"framework",
|
|
31
|
+
"redmine",
|
|
32
|
+
"cli",
|
|
33
|
+
"markdown",
|
|
34
|
+
"issues",
|
|
35
|
+
"context",
|
|
36
|
+
"agentic",
|
|
37
|
+
"coding"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsup src/cli.ts --dts --format esm --target node22 --out-dir dist --sourcemap",
|
|
41
|
+
"dev": "tsx src/cli.ts --help",
|
|
42
|
+
"lint": "eslint .",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"release": "node scripts/release.js",
|
|
45
|
+
"smart-publish": "node scripts/smart-publish.js"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@inquirer/prompts": "^8.0.2",
|
|
49
|
+
"adm-zip": "^0.5.16",
|
|
50
|
+
"cli-progress": "^3.12.0",
|
|
51
|
+
"clipboardy": "^4.0.0",
|
|
52
|
+
"commander": "^12.1.0",
|
|
53
|
+
"gray-matter": "^4.0.3",
|
|
54
|
+
"ink": "^5.0.1",
|
|
55
|
+
"ink-spinner": "^5.0.0",
|
|
56
|
+
"ink-text-input": "^6.0.0",
|
|
57
|
+
"p-limit": "^5.0.0",
|
|
58
|
+
"p-queue": "^7.4.1",
|
|
59
|
+
"p-retry": "^6.2.0",
|
|
60
|
+
"react": "^18.3.1",
|
|
61
|
+
"slugify": "^1.6.6",
|
|
62
|
+
"undici": "^6.19.5",
|
|
63
|
+
"yaml": "^2.5.0",
|
|
64
|
+
"zod": "^3.23.8"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@changesets/cli": "^2.27.7",
|
|
68
|
+
"@types/node": "^24.10.1",
|
|
69
|
+
"@types/react": "^18.3.12",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^8.6.0",
|
|
71
|
+
"@typescript-eslint/parser": "^8.6.0",
|
|
72
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
73
|
+
"eslint": "^9.9.0",
|
|
74
|
+
"prettier": "^3.3.3",
|
|
75
|
+
"tsup": "^8.1.0",
|
|
76
|
+
"tsx": "^4.19.2",
|
|
77
|
+
"typescript": "^5.6.3",
|
|
78
|
+
"vitest": "^2.1.4"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Example configuration for jvit-redmine-context-cli
|
|
2
|
+
# Copy this file to redmine.config.yaml and update with your settings
|
|
3
|
+
|
|
4
|
+
baseUrl: https://redmine.example.com
|
|
5
|
+
apiAccessToken: YOUR_API_TOKEN_HERE
|
|
6
|
+
project:
|
|
7
|
+
id: 123
|
|
8
|
+
identifier: my-project
|
|
9
|
+
outputDir: .jai1/redmine
|
|
10
|
+
defaults:
|
|
11
|
+
include: [journals, relations, attachments]
|
|
12
|
+
status: '*'
|
|
13
|
+
pageSize: 100
|
|
14
|
+
concurrency: 4
|
|
15
|
+
retry:
|
|
16
|
+
retries: 3
|
|
17
|
+
baseMs: 300
|
|
18
|
+
filename:
|
|
19
|
+
pattern: '{issueId}-{slug}.md'
|
|
20
|
+
slug:
|
|
21
|
+
maxLength: 80
|
|
22
|
+
dedupe: true
|
|
23
|
+
lowercase: true
|
|
24
|
+
renameOnTitleChange: false
|
|
25
|
+
comments:
|
|
26
|
+
anchors:
|
|
27
|
+
start: '<!-- redmine:comments:start -->'
|
|
28
|
+
end: '<!-- redmine:comments:end -->'
|
|
29
|
+
trackBy: journalId
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# JVIT Redmine Context CLI - Issue Sync Script
|
|
4
|
+
# Usage: ./scripts/redmine-sync-issue.sh <id|url>
|
|
5
|
+
|
|
6
|
+
if [ $# -eq 0 ]; then
|
|
7
|
+
echo "Usage: $0 <issue-id|issue-url>"
|
|
8
|
+
echo ""
|
|
9
|
+
echo "Examples:"
|
|
10
|
+
echo " $0 12345"
|
|
11
|
+
echo " $0 https://redmine.example.com/issues/12345"
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
INPUT="$1"
|
|
16
|
+
|
|
17
|
+
# Check if input is a URL
|
|
18
|
+
if [[ "$INPUT" =~ ^https?:// ]]; then
|
|
19
|
+
# Extract issue ID from URL
|
|
20
|
+
ISSUE_ID=$(echo "$INPUT" | sed -n 's/.*\/issues\/\([0-9]*\).*/\1/p')
|
|
21
|
+
if [ -z "$ISSUE_ID" ]; then
|
|
22
|
+
echo "❌ Could not extract issue ID from URL: $INPUT"
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
echo "🔗 Detected URL, syncing issue ID: $ISSUE_ID"
|
|
26
|
+
node "$(dirname "$0")/../dist/cli.js" sync issue --url "$INPUT"
|
|
27
|
+
else
|
|
28
|
+
# Assume it's an issue ID
|
|
29
|
+
if [[ ! "$INPUT" =~ ^[0-9]+$ ]]; then
|
|
30
|
+
echo "❌ Invalid issue ID: $INPUT (must be a number)"
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
echo "🔢 Detected issue ID: $INPUT"
|
|
34
|
+
node "$(dirname "$0")/../dist/cli.js" sync issue --id "$INPUT"
|
|
35
|
+
fi
|