jira-daily-report-native 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Thuan Vo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Jira Daily Report - Native Edition
2
+
3
+ High-performance native CLI tool for Jira daily reporting, written in Zig.
4
+
5
+ ## Features
6
+
7
+ ✨ **Blazing Fast** - Native Zig performance
8
+ 📦 **Zero Dependencies** - Standalone executable
9
+ 🎯 **Cross-Platform** - Linux, macOS, Windows
10
+ 🔒 **Secure** - Memory-safe implementation
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install -g jira-daily-report-native
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ Same interface as the TypeScript version:
21
+
22
+ ```bash
23
+ # Generate daily report
24
+ jira-report generate
25
+
26
+ # Log time
27
+ jira-report logtime "B2B-1079 2h"
28
+
29
+ # Multiple tickets
30
+ jira-report logtime "B2B-1079 2h, PROJECT-123 1.5h"
31
+
32
+ # Specific date
33
+ jira-report logtime "B2B-1079 2h" --date yesterday
34
+ ```
35
+
36
+ ## Configuration
37
+
38
+ Set environment variables:
39
+
40
+ ```bash
41
+ export JIRA_SERVER="https://your-domain.atlassian.net/"
42
+ export JIRA_USERNAME="your-email@example.com"
43
+ export JIRA_API_TOKEN="your-jira-api-token"
44
+ export TEMPO_API_TOKEN="your-tempo-api-token"
45
+ ```
46
+
47
+ ## Supported Platforms
48
+
49
+ - Linux (x64, ARM64)
50
+ - macOS (Intel, Apple Silicon)
51
+ - Windows (x64)
52
+
53
+ ## Performance Comparison
54
+
55
+ | Implementation | Startup Time | Memory Usage |
56
+ |---------------|--------------|--------------|
57
+ | TypeScript | ~200ms | ~45MB |
58
+ | **Zig Native** | **~5ms** | **~2MB** |
59
+
60
+ ## Development
61
+
62
+ Built with [Zig](https://ziglang.org/) for maximum performance and minimal resource usage.
63
+
64
+ ## License
65
+
66
+ MIT - See [LICENSE](../LICENSE)
Binary file
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "jira-daily-report-native",
3
+ "version": "0.1.0",
4
+ "description": "High-performance Jira daily report CLI tool - Native Zig implementation",
5
+ "author": {
6
+ "name": "Thuan Vo",
7
+ "email": "voxuanthuan@gmail.com"
8
+ },
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "jira",
12
+ "daily-report",
13
+ "standup",
14
+ "tempo",
15
+ "productivity",
16
+ "cli",
17
+ "zig",
18
+ "native",
19
+ "fast"
20
+ ],
21
+ "homepage": "https://github.com/voxuanthuan/daily-report#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/voxuanthuan/daily-report/issues"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/voxuanthuan/daily-report.git",
28
+ "directory": "jira-report-zig"
29
+ },
30
+ "engines": {
31
+ "node": ">=14.0.0"
32
+ },
33
+ "bin": {
34
+ "jira-report": "./wrapper.js"
35
+ },
36
+ "files": [
37
+ "dist/bin/**/*",
38
+ "wrapper.js",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "scripts": {
43
+ "build": "./build-all.sh",
44
+ "prepublishOnly": "npm run build",
45
+ "test": "echo \"Testing native binary...\" && node wrapper.js --help"
46
+ },
47
+ "os": [
48
+ "darwin",
49
+ "linux",
50
+ "win32"
51
+ ],
52
+ "cpu": [
53
+ "x64",
54
+ "arm64"
55
+ ]
56
+ }
package/wrapper.js ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Platform detection wrapper for jira-report Zig binary
5
+ * Executes the correct native binary based on user's platform
6
+ */
7
+
8
+ const { spawn } = require('child_process');
9
+ const path = require('path');
10
+ const fs = require('fs');
11
+
12
+ // Detect platform
13
+ const platform = process.platform; // darwin, linux, win32
14
+ const arch = process.arch; // x64, arm64
15
+
16
+ // Map to binary directory structure
17
+ const platformMap = {
18
+ 'darwin-x64': 'darwin-x64',
19
+ 'darwin-arm64': 'darwin-arm64',
20
+ 'linux-x64': 'linux-x64',
21
+ 'linux-arm64': 'linux-arm64',
22
+ 'win32-x64': 'win32-x64',
23
+ };
24
+
25
+ const platformKey = `${platform}-${arch}`;
26
+ const platformDir = platformMap[platformKey];
27
+
28
+ if (!platformDir) {
29
+ console.error(`❌ Unsupported platform: ${platformKey}`);
30
+ console.error(`Supported platforms: ${Object.keys(platformMap).join(', ')}`);
31
+ process.exit(1);
32
+ }
33
+
34
+ // Determine binary path
35
+ const binName = platform === 'win32' ? 'jira-report.exe' : 'jira-report';
36
+ const binPath = path.join(__dirname, 'dist', 'bin', platformDir, binName);
37
+
38
+ // Check if binary exists
39
+ if (!fs.existsSync(binPath)) {
40
+ console.error(`❌ Binary not found: ${binPath}`);
41
+ console.error(`Platform: ${platformKey}`);
42
+ console.error('\nPlease report this issue at:');
43
+ console.error('https://github.com/voxuanthuan/daily-report/issues');
44
+ process.exit(1);
45
+ }
46
+
47
+ // Ensure binary is executable (Unix-like systems)
48
+ if (platform !== 'win32') {
49
+ try {
50
+ fs.chmodSync(binPath, 0o755);
51
+ } catch (err) {
52
+ // Ignore errors - binary might already be executable
53
+ }
54
+ }
55
+
56
+ // Execute binary with all arguments
57
+ const child = spawn(binPath, process.argv.slice(2), {
58
+ stdio: 'inherit',
59
+ windowsHide: false,
60
+ });
61
+
62
+ child.on('error', (err) => {
63
+ console.error(`❌ Failed to execute binary: ${err.message}`);
64
+ process.exit(1);
65
+ });
66
+
67
+ child.on('exit', (code, signal) => {
68
+ if (signal) {
69
+ process.kill(process.pid, signal);
70
+ } else {
71
+ process.exit(code || 0);
72
+ }
73
+ });