alurkerja-cli 1.0.9 → 1.0.11
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/index.js +13 -35
- package/index.js.backup +13 -35
- package/package.json +1 -1
- package/package.json.backup +1 -1
package/index.js
CHANGED
|
@@ -17,8 +17,7 @@ const GITLAB_BASE = 'https://gitlab.javan.co.id/alurkerja/on-premises/toolkits/a
|
|
|
17
17
|
const GITLAB_TOKEN = 'javan-_P_JrtswtvrZekJDk1Lt'; // GitLab private token
|
|
18
18
|
const VERSION = 'v1.0.0'; // Will be replaced during build
|
|
19
19
|
const INSTALL_DIR = path.join(os.homedir(), '.alurkerja', 'bin');
|
|
20
|
-
const
|
|
21
|
-
const BINARY_PATH = path.join(INSTALL_DIR, BINARY_NAME);
|
|
20
|
+
const BINARY_PATH = path.join(INSTALL_DIR, 'alurkerja');
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Detect current platform
|
|
@@ -201,40 +200,19 @@ function getInstalledVersion() {
|
|
|
201
200
|
* Execute the Go binary with provided arguments
|
|
202
201
|
*/
|
|
203
202
|
function executeBinary(args) {
|
|
204
|
-
const
|
|
203
|
+
const child = spawn(BINARY_PATH, args, {
|
|
204
|
+
stdio: 'inherit',
|
|
205
|
+
shell: false
|
|
206
|
+
});
|
|
205
207
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
child.on('error', (err) => {
|
|
215
|
-
console.error(`❌ Failed to execute binary: ${err.message}`);
|
|
216
|
-
process.exit(1);
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
child.on('exit', (code) => {
|
|
220
|
-
process.exit(code || 0);
|
|
221
|
-
});
|
|
222
|
-
} else {
|
|
223
|
-
// Unix systems don't need quoting
|
|
224
|
-
const child = spawn(BINARY_PATH, args, {
|
|
225
|
-
stdio: 'inherit',
|
|
226
|
-
shell: false
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
child.on('error', (err) => {
|
|
230
|
-
console.error(`❌ Failed to execute binary: ${err.message}`);
|
|
231
|
-
process.exit(1);
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
child.on('exit', (code) => {
|
|
235
|
-
process.exit(code || 0);
|
|
236
|
-
});
|
|
237
|
-
}
|
|
208
|
+
child.on('error', (err) => {
|
|
209
|
+
console.error(`❌ Failed to execute binary: ${err.message}`);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
child.on('exit', (code) => {
|
|
214
|
+
process.exit(code || 0);
|
|
215
|
+
});
|
|
238
216
|
}
|
|
239
217
|
|
|
240
218
|
/**
|
package/index.js.backup
CHANGED
|
@@ -17,8 +17,7 @@ const GITLAB_BASE = 'https://gitlab.javan.co.id/alurkerja/on-premises/toolkits/a
|
|
|
17
17
|
const GITLAB_TOKEN = 'javan-_P_JrtswtvrZekJDk1Lt'; // GitLab private token
|
|
18
18
|
const VERSION = 'v1.0.0'; // Will be replaced during build
|
|
19
19
|
const INSTALL_DIR = path.join(os.homedir(), '.alurkerja', 'bin');
|
|
20
|
-
const
|
|
21
|
-
const BINARY_PATH = path.join(INSTALL_DIR, BINARY_NAME);
|
|
20
|
+
const BINARY_PATH = path.join(INSTALL_DIR, 'alurkerja');
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Detect current platform
|
|
@@ -201,40 +200,19 @@ function getInstalledVersion() {
|
|
|
201
200
|
* Execute the Go binary with provided arguments
|
|
202
201
|
*/
|
|
203
202
|
function executeBinary(args) {
|
|
204
|
-
const
|
|
203
|
+
const child = spawn(BINARY_PATH, args, {
|
|
204
|
+
stdio: 'inherit',
|
|
205
|
+
shell: false
|
|
206
|
+
});
|
|
205
207
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
child.on('error', (err) => {
|
|
215
|
-
console.error(`❌ Failed to execute binary: ${err.message}`);
|
|
216
|
-
process.exit(1);
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
child.on('exit', (code) => {
|
|
220
|
-
process.exit(code || 0);
|
|
221
|
-
});
|
|
222
|
-
} else {
|
|
223
|
-
// Unix systems don't need quoting
|
|
224
|
-
const child = spawn(BINARY_PATH, args, {
|
|
225
|
-
stdio: 'inherit',
|
|
226
|
-
shell: false
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
child.on('error', (err) => {
|
|
230
|
-
console.error(`❌ Failed to execute binary: ${err.message}`);
|
|
231
|
-
process.exit(1);
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
child.on('exit', (code) => {
|
|
235
|
-
process.exit(code || 0);
|
|
236
|
-
});
|
|
237
|
-
}
|
|
208
|
+
child.on('error', (err) => {
|
|
209
|
+
console.error(`❌ Failed to execute binary: ${err.message}`);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
child.on('exit', (code) => {
|
|
214
|
+
process.exit(code || 0);
|
|
215
|
+
});
|
|
238
216
|
}
|
|
239
217
|
|
|
240
218
|
/**
|
package/package.json
CHANGED