ship-em 0.2.2 → 0.2.3
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/dist/index.js +9 -4
- package/dist/lib.js +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1599,8 +1599,7 @@ var CloudflarePages = class {
|
|
|
1599
1599
|
this.client = axios.create({
|
|
1600
1600
|
baseURL: CF_API_BASE,
|
|
1601
1601
|
headers: {
|
|
1602
|
-
Authorization: `Bearer ${apiToken}
|
|
1603
|
-
"Content-Type": "application/json"
|
|
1602
|
+
Authorization: `Bearer ${apiToken}`
|
|
1604
1603
|
},
|
|
1605
1604
|
timeout: CF_REQUEST_TIMEOUT_MS
|
|
1606
1605
|
});
|
|
@@ -1701,9 +1700,12 @@ var CloudflarePages = class {
|
|
|
1701
1700
|
let requiredFiles;
|
|
1702
1701
|
let deployment;
|
|
1703
1702
|
try {
|
|
1703
|
+
const deployFormData = new FormData();
|
|
1704
|
+
deployFormData.append("manifest", JSON.stringify(manifest));
|
|
1705
|
+
deployFormData.append("branch", "main");
|
|
1704
1706
|
const res = await this.client.post(
|
|
1705
1707
|
`/accounts/${this.accountId}/pages/projects/${projectName}/deployments`,
|
|
1706
|
-
|
|
1708
|
+
deployFormData,
|
|
1707
1709
|
{ timeout: CF_REQUEST_TIMEOUT_MS }
|
|
1708
1710
|
);
|
|
1709
1711
|
if (!res.data.success) {
|
|
@@ -1777,9 +1779,12 @@ var CloudflarePages = class {
|
|
|
1777
1779
|
let requiredFiles;
|
|
1778
1780
|
let deployment;
|
|
1779
1781
|
try {
|
|
1782
|
+
const deployFormData = new FormData();
|
|
1783
|
+
deployFormData.append("manifest", JSON.stringify(manifest));
|
|
1784
|
+
deployFormData.append("branch", branch);
|
|
1780
1785
|
const res = await this.client.post(
|
|
1781
1786
|
`/accounts/${this.accountId}/pages/projects/${projectName}/deployments`,
|
|
1782
|
-
|
|
1787
|
+
deployFormData,
|
|
1783
1788
|
{ timeout: CF_REQUEST_TIMEOUT_MS }
|
|
1784
1789
|
);
|
|
1785
1790
|
if (!res.data.success) {
|
package/dist/lib.js
CHANGED
|
@@ -1139,8 +1139,7 @@ var CloudflarePages = class {
|
|
|
1139
1139
|
this.client = axios.create({
|
|
1140
1140
|
baseURL: CF_API_BASE,
|
|
1141
1141
|
headers: {
|
|
1142
|
-
Authorization: `Bearer ${apiToken}
|
|
1143
|
-
"Content-Type": "application/json"
|
|
1142
|
+
Authorization: `Bearer ${apiToken}`
|
|
1144
1143
|
},
|
|
1145
1144
|
timeout: CF_REQUEST_TIMEOUT_MS
|
|
1146
1145
|
});
|
|
@@ -1241,9 +1240,12 @@ var CloudflarePages = class {
|
|
|
1241
1240
|
let requiredFiles;
|
|
1242
1241
|
let deployment;
|
|
1243
1242
|
try {
|
|
1243
|
+
const deployFormData = new FormData();
|
|
1244
|
+
deployFormData.append("manifest", JSON.stringify(manifest));
|
|
1245
|
+
deployFormData.append("branch", "main");
|
|
1244
1246
|
const res = await this.client.post(
|
|
1245
1247
|
`/accounts/${this.accountId}/pages/projects/${projectName}/deployments`,
|
|
1246
|
-
|
|
1248
|
+
deployFormData,
|
|
1247
1249
|
{ timeout: CF_REQUEST_TIMEOUT_MS }
|
|
1248
1250
|
);
|
|
1249
1251
|
if (!res.data.success) {
|
|
@@ -1317,9 +1319,12 @@ var CloudflarePages = class {
|
|
|
1317
1319
|
let requiredFiles;
|
|
1318
1320
|
let deployment;
|
|
1319
1321
|
try {
|
|
1322
|
+
const deployFormData = new FormData();
|
|
1323
|
+
deployFormData.append("manifest", JSON.stringify(manifest));
|
|
1324
|
+
deployFormData.append("branch", branch);
|
|
1320
1325
|
const res = await this.client.post(
|
|
1321
1326
|
`/accounts/${this.accountId}/pages/projects/${projectName}/deployments`,
|
|
1322
|
-
|
|
1327
|
+
deployFormData,
|
|
1323
1328
|
{ timeout: CF_REQUEST_TIMEOUT_MS }
|
|
1324
1329
|
);
|
|
1325
1330
|
if (!res.data.success) {
|