@akash-chowdhury-24/deployhub 1.0.15 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akash-chowdhury-24/deployhub",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Zero-configuration deployment and artifact manager",
5
5
  "type": "module",
6
6
  "main": "./src/cli/index.js",
@@ -1,7 +1,6 @@
1
1
  import path from 'path';
2
2
  import fs from 'fs-extra';
3
3
  import archiver from 'archiver';
4
- import axios from 'axios';
5
4
  import { createLogger } from '../../../logger/index.js';
6
5
  import {
7
6
  runCli,
@@ -49,11 +48,18 @@ async function createRootZip(sourceDir, zipPath) {
49
48
  * @param {string} uploadUrl
50
49
  */
51
50
  async function uploadZipToAmplify(zipPath, uploadUrl) {
52
- await axios.put(uploadUrl, fs.createReadStream(zipPath), {
53
- headers: { 'Content-Type': 'application/zip' },
54
- maxBodyLength: Infinity,
55
- maxContentLength: Infinity,
51
+ const body = await fs.readFile(zipPath);
52
+ const response = await fetch(uploadUrl, {
53
+ method: 'PUT',
54
+ body,
56
55
  });
56
+
57
+ if (!response.ok) {
58
+ const detail = await response.text().catch(() => '');
59
+ throw new Error(
60
+ `Amplify zip upload failed: HTTP ${response.status}${detail ? ` — ${detail}` : ''}`
61
+ );
62
+ }
57
63
  }
58
64
 
59
65
  /**