alurkerja-cli 1.0.14 → 1.0.16

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