alurkerja-cli 1.0.16 → 1.0.18
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 +7 -5
- package/index.js.backup +7 -5
- package/package.json +1 -1
- package/package.json.backup +1 -1
package/index.js
CHANGED
|
@@ -56,11 +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
|
|
60
|
-
const
|
|
61
|
-
const downloadUrl = `${GITLAB_BASE}/-/raw/master/dist/${binaryName}?private_token=${GITLAB_TOKEN}&inline=false`;
|
|
59
|
+
// Use GitLab raw file download with correct parameters
|
|
60
|
+
const downloadUrl = `${GITLAB_BASE}/-/raw/master/dist/${binaryName}?ref_type=heads&inline=false`;
|
|
62
61
|
|
|
63
|
-
console.log(`📥 Downloading Alurkerja CLI For ${platform.os}-${platform.arch} ${version}...`);
|
|
62
|
+
console.log(`📥 Downloading Alurkerja CLI For ${platform.os}-${platform.arch} ${downloadUrl} ${binaryName} ${version}...`);
|
|
64
63
|
|
|
65
64
|
// Ensure install directory exists
|
|
66
65
|
fs.mkdirSync(INSTALL_DIR, { recursive: true });
|
|
@@ -76,7 +75,10 @@ async function downloadBinary(version, platform) {
|
|
|
76
75
|
const url = new URL(targetUrl);
|
|
77
76
|
const options = {
|
|
78
77
|
hostname: url.hostname,
|
|
79
|
-
path: url.pathname + url.search
|
|
78
|
+
path: url.pathname + url.search,
|
|
79
|
+
headers: {
|
|
80
|
+
'PRIVATE-TOKEN': GITLAB_TOKEN
|
|
81
|
+
}
|
|
80
82
|
};
|
|
81
83
|
|
|
82
84
|
const req = https.get(options, (res) => {
|
package/index.js.backup
CHANGED
|
@@ -56,11 +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
|
|
60
|
-
const
|
|
61
|
-
const downloadUrl = `${GITLAB_BASE}/-/raw/master/dist/${binaryName}?private_token=${GITLAB_TOKEN}&inline=false`;
|
|
59
|
+
// Use GitLab raw file download with correct parameters
|
|
60
|
+
const downloadUrl = `${GITLAB_BASE}/-/raw/master/dist/${binaryName}?ref_type=heads&inline=false`;
|
|
62
61
|
|
|
63
|
-
console.log(`📥 Downloading Alurkerja CLI For ${platform.os}-${platform.arch} ${version}...`);
|
|
62
|
+
console.log(`📥 Downloading Alurkerja CLI For ${platform.os}-${platform.arch} ${downloadUrl} ${binaryName} ${version}...`);
|
|
64
63
|
|
|
65
64
|
// Ensure install directory exists
|
|
66
65
|
fs.mkdirSync(INSTALL_DIR, { recursive: true });
|
|
@@ -76,7 +75,10 @@ async function downloadBinary(version, platform) {
|
|
|
76
75
|
const url = new URL(targetUrl);
|
|
77
76
|
const options = {
|
|
78
77
|
hostname: url.hostname,
|
|
79
|
-
path: url.pathname + url.search
|
|
78
|
+
path: url.pathname + url.search,
|
|
79
|
+
headers: {
|
|
80
|
+
'PRIVATE-TOKEN': GITLAB_TOKEN
|
|
81
|
+
}
|
|
80
82
|
};
|
|
81
83
|
|
|
82
84
|
const req = https.get(options, (res) => {
|
package/package.json
CHANGED