@sleekcms/cli 1.1.0 → 1.2.0
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 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -40,6 +40,8 @@ const VIEWS_DIR = AUTH_TOKEN.split('-')[0] + "-views/";
|
|
|
40
40
|
const apiClient = axios.create({
|
|
41
41
|
baseURL: API_BASE_URL,
|
|
42
42
|
headers: { Authorization: `Bearer ${AUTH_TOKEN}` },
|
|
43
|
+
maxContentLength: Infinity,
|
|
44
|
+
maxBodyLength: Infinity,
|
|
43
45
|
});
|
|
44
46
|
|
|
45
47
|
|
|
@@ -94,9 +96,8 @@ function scheduleUpdate(filePath) {
|
|
|
94
96
|
pendingUpdates[fileId] = setTimeout(async () => {
|
|
95
97
|
try {
|
|
96
98
|
const code = await fs.readFile(filePath, "utf-8");
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
console.log("✅ Updated template for:", relativePath);
|
|
99
|
+
let template = await apiClient.patch(`/${fileId}`, { code: code || "foo bar" });
|
|
100
|
+
console.log("✅ Updated template for: ", relativePath, `In: ${code.length}, Out: ${template.data.code.length}`);
|
|
100
101
|
|
|
101
102
|
delete pendingUpdates[fileId]; // Cleanup
|
|
102
103
|
} catch (error) {
|