alurkerja-cli 1.0.4 → 1.0.5
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 +4 -2
- package/index.js.backup +4 -2
- package/package.json +1 -1
- package/package.json.backup +1 -1
package/index.js
CHANGED
|
@@ -56,8 +56,10 @@ function getVersion() {
|
|
|
56
56
|
*/
|
|
57
57
|
async function downloadBinary(version, platform) {
|
|
58
58
|
const binaryName = `alurkerja-${platform.os}-${platform.arch}${platform.os === 'windows' ? '.exe' : ''}`;
|
|
59
|
-
// Use GitLab raw file download
|
|
60
|
-
const
|
|
59
|
+
// Use GitLab API v4 for raw file download to get actual binary
|
|
60
|
+
const encodedPath = encodeURIComponent(`dist/${binaryName}`);
|
|
61
|
+
const encodedProject = encodeURIComponent('alurkerja/on-premises/toolkits/alurkerja-cli');
|
|
62
|
+
const downloadUrl = `https://gitlab.javan.co.id/api/v4/projects/${encodedProject}/repository/files/${encodedPath}/raw?ref=master`;
|
|
61
63
|
|
|
62
64
|
console.log(`📥 Downloading Alurkerja CLI ${version}...`);
|
|
63
65
|
|
package/index.js.backup
CHANGED
|
@@ -56,8 +56,10 @@ function getVersion() {
|
|
|
56
56
|
*/
|
|
57
57
|
async function downloadBinary(version, platform) {
|
|
58
58
|
const binaryName = `alurkerja-${platform.os}-${platform.arch}${platform.os === 'windows' ? '.exe' : ''}`;
|
|
59
|
-
// Use GitLab raw file download
|
|
60
|
-
const
|
|
59
|
+
// Use GitLab API v4 for raw file download to get actual binary
|
|
60
|
+
const encodedPath = encodeURIComponent(`dist/${binaryName}`);
|
|
61
|
+
const encodedProject = encodeURIComponent('alurkerja/on-premises/toolkits/alurkerja-cli');
|
|
62
|
+
const downloadUrl = `https://gitlab.javan.co.id/api/v4/projects/${encodedProject}/repository/files/${encodedPath}/raw?ref=master`;
|
|
61
63
|
|
|
62
64
|
console.log(`📥 Downloading Alurkerja CLI ${version}...`);
|
|
63
65
|
|
package/package.json
CHANGED