gitdocai-cli 1.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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/gitdocai-cli ADDED
File without changes
File without changes
package/install.js ADDED
@@ -0,0 +1,39 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const BINARY_NAME = 'gitdocai-cli';
5
+
6
+ function getPlatform() {
7
+ const type = process.platform;
8
+ const arch = process.arch;
9
+
10
+ if (type === 'darwin') {
11
+ return arch === 'x64' ? 'darwin-x64' : 'darwin-arm64';
12
+ }
13
+
14
+ if (type === 'win32') {
15
+ return arch === 'x64' ? 'win32-x64' : 'win32-arm64';
16
+ }
17
+
18
+ if (type === 'linux') {
19
+ return arch === 'x64' ? 'linux-x64' : 'linux-arm64';
20
+ }
21
+
22
+ throw new Error(`Unsupported platform: ${type} ${arch}`);
23
+ }
24
+
25
+ const platform = getPlatform();
26
+ const ext = process.platform === 'win32' ? '.exe' : '';
27
+ const sourcePath = path.join(__dirname, 'dist', `${BINARY_NAME}-${platform}${ext}`);
28
+ const targetPath = path.join(__dirname, `${BINARY_NAME}${ext}`);
29
+
30
+ if (fs.existsSync(sourcePath)) {
31
+ fs.copyFileSync(sourcePath, targetPath);
32
+ if (process.platform !== 'win32') {
33
+ fs.chmodSync(targetPath, 0o755);
34
+ }
35
+ console.log(`✅ ${BINARY_NAME} binary prepared for ${platform}`);
36
+ } else {
37
+ console.error(`❌ Binary not found for ${platform}`);
38
+ process.exit(1);
39
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "gitdocai-cli",
3
+ "version": "1.1.0",
4
+ "description": "GitDocAI CLI tool",
5
+ "bin": {
6
+ "gitdocai-cli": "./gitdocai-cli"
7
+ },
8
+ "files": [
9
+ "install.js",
10
+ "dist/",
11
+ "gitdocai-cli",
12
+ "gitdocai-cli.exe"
13
+ ],
14
+ "scripts": {
15
+ "postinstall": "node install.js",
16
+ "preuninstall": "node uninstall.js"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/YHVCorp/gitdocai-cli.git"
21
+ },
22
+ "keywords": ["cli", "gitdocai"],
23
+ "author": "Yorjander Hernandez",
24
+ "license": "Apache-2.0",
25
+ "preferGlobal": true
26
+ }