buildfree 1.0.2 → 1.0.4

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,11 +1,11 @@
1
1
  {
2
2
  "name": "buildfree",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Official JavaScript SDK for buildfree",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
- "start":"node src/index.js",
8
- "dev":"nodemon src/index.js"
7
+ "start": "node src/index.js",
8
+ "dev": "nodemon src/index.js"
9
9
  },
10
10
  "keywords": [],
11
11
  "author": "BuildFree",
package/src/forms.js CHANGED
@@ -152,76 +152,6 @@ class Forms {
152
152
 
153
153
 
154
154
  // ========================================================
155
- // ADD FILES
156
- // ========================================================
157
-
158
- // for (const file of files) {
159
-
160
- // if (!file) {
161
- // continue;
162
- // }
163
-
164
-
165
- // // ------------------------------------------------------
166
- // // BUFFER
167
- // // ------------------------------------------------------
168
-
169
- // // if (file.buffer && Buffer.isBuffer(file.buffer)) {
170
-
171
- // // formData.append(
172
-
173
- // // file.fieldname,
174
-
175
- // // file.buffer,
176
-
177
- // // {
178
- // // filename:
179
- // // file.filename ||
180
- // // file.originalname ||
181
- // // "upload",
182
-
183
- // // contentType:
184
- // // file.contentType ||
185
- // // file.mimetype
186
- // // }
187
-
188
- // // );
189
-
190
- // // continue;
191
-
192
- // // }
193
-
194
-
195
- // // // ------------------------------------------------------
196
- // // // FILE PATH
197
- // // // ------------------------------------------------------
198
-
199
- // // if (file.path) {
200
-
201
- // // if (!fs.existsSync(file.path)) {
202
- // // throw new Error(`File not found: ${file.path}`);
203
- // // }
204
-
205
- // // formData.append(
206
- // // file.fieldname,
207
- // // fs.createReadStream(file.path),
208
- // // {
209
- // // filename:
210
- // // file.filename ||
211
- // // file.originalname ||
212
- // // file.path.split(/[\\/]/).pop()
213
- // // }
214
- // // );
215
-
216
- // // continue;
217
- // // }
218
-
219
-
220
- // throw new Error(
221
- // `Invalid file for field: ${file.fieldname}`
222
- // );
223
-
224
- // }
225
155
 
226
156
  for (const item of files) {
227
157
 
package/src/index.js CHANGED
@@ -5,7 +5,7 @@ class BuildFree {
5
5
 
6
6
  constructor({
7
7
  apiKey,
8
- baseURL = "https://cms-backend-9nkz.onrender.com/api/v1"
8
+ baseURL = "https://api.buildfree.dev/api/v1"
9
9
  } = {}) {
10
10
 
11
11
  // ==========================================