@swell/cli 0.1.0 → 0.1.1

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  import 'fs';
4
4
  import 'path';
5
- import { F as FormData, a as File } from './swell-b7920988.js';
5
+ import { F as FormData, a as File } from './swell-2acb6c0f.js';
6
6
  import 'assert';
7
7
  import 'child_process';
8
8
  import 'async_hooks';
@@ -15312,7 +15312,7 @@ class Body {
15312
15312
  return formData;
15313
15313
  }
15314
15314
 
15315
- const {toFormData} = await import('./multipart-parser-2c48c5f2.js');
15315
+ const {toFormData} = await import('./multipart-parser-fb5a5deb.js');
15316
15316
  return toFormData(this.body, ct);
15317
15317
  }
15318
15318
 
@@ -22957,7 +22957,13 @@ async function api(storeId, pathOpts, options) {
22957
22957
 
22958
22958
  if (!resp.ok) throw new Error(await resp.text());
22959
22959
 
22960
- return resp.json();
22960
+ // Avoid 0-length responses from the Backend API triggering JSON parsing errors
22961
+ try {
22962
+ const json = await resp.json();
22963
+ return json;
22964
+ } catch {
22965
+ return null;
22966
+ }
22961
22967
  }
22962
22968
 
22963
22969
  var src = {exports: {}};
@@ -28592,7 +28598,7 @@ const args$d = {
28592
28598
  };
28593
28599
 
28594
28600
  async function version() {
28595
- console.log("0.1.0");
28601
+ console.log("0.1.1");
28596
28602
  }
28597
28603
 
28598
28604
  // Latin-1 Supplement
@@ -28981,6 +28987,8 @@ async function pushModel(args) {
28981
28987
  }
28982
28988
  );
28983
28989
  } else {
28990
+ delete model.id; // let the backend do its thing
28991
+
28984
28992
  await api(
28985
28993
  storeId,
28986
28994
  { path: `:${modelType}`, adminPath: `data/:${modelType}` },
package/dist/bin/swell.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- export { c as commands, b as commandsArgs, s as default } from './swell-b7920988.js';
3
+ export { c as commands, b as commandsArgs, s as default } from './swell-2acb6c0f.js';
4
4
  import 'assert';
5
5
  import 'child_process';
6
6
  import 'async_hooks';
package/dist/man/swell.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH "SWELL" "1" "December 2022" "0.1.0"
1
+ .TH "SWELL" "1" "December 2022" "0.1.1"
2
2
  .SH "NAME"
3
3
  \fBswell\fR \- CLI to the Swell platform
4
4
  .TS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swell/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Swell's command line interface/utility",
5
5
  "keywords": [
6
6
  "swell",