@edgestore/shared 0.1.5-alpha.17 → 0.1.5-alpha.19

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 CHANGED
@@ -2,9 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _define_property = require('@swc/helpers/_/_define_property');
6
5
  var zod = require('zod');
7
6
 
7
+ function _define_property$1(obj, key, value) {
8
+ if (key in obj) {
9
+ Object.defineProperty(obj, key, {
10
+ value: value,
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true
14
+ });
15
+ } else {
16
+ obj[key] = value;
17
+ }
18
+ return obj;
19
+ }
8
20
  /* eslint-disable @typescript-eslint/no-non-null-assertion */ const EDGE_STORE_ERROR_CODES = {
9
21
  BAD_REQUEST: 400,
10
22
  FILE_TOO_LARGE: 400,
@@ -28,10 +40,10 @@ class EdgeStoreError extends Error {
28
40
  }
29
41
  constructor(opts){
30
42
  super(opts.message);
31
- _define_property._(this, "cause", void 0);
32
- _define_property._(this, "code", void 0);
33
- _define_property._(this, "level", void 0);
34
- _define_property._(this, "details", void 0);
43
+ _define_property$1(this, "cause", void 0);
44
+ _define_property$1(this, "code", void 0);
45
+ _define_property$1(this, "level", void 0);
46
+ _define_property$1(this, "details", void 0);
35
47
  this.name = 'EdgeStoreError';
36
48
  this.code = opts.code;
37
49
  this.cause = opts.cause;
@@ -40,10 +52,23 @@ class EdgeStoreError extends Error {
40
52
  }
41
53
  }
42
54
 
55
+ function _define_property(obj, key, value) {
56
+ if (key in obj) {
57
+ Object.defineProperty(obj, key, {
58
+ value: value,
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true
62
+ });
63
+ } else {
64
+ obj[key] = value;
65
+ }
66
+ return obj;
67
+ }
43
68
  class EdgeStoreApiClientError extends Error {
44
69
  constructor(opts){
45
70
  super(opts.response.message);
46
- _define_property._(this, "data", void 0);
71
+ _define_property(this, "data", void 0);
47
72
  this.name = 'EdgeStoreApiClientError';
48
73
  this.data = opts.response;
49
74
  }
package/dist/index.mjs CHANGED
@@ -1,6 +1,18 @@
1
- import { _ } from '@swc/helpers/_/_define_property';
2
1
  import { z } from 'zod';
3
2
 
3
+ function _define_property$1(obj, key, value) {
4
+ if (key in obj) {
5
+ Object.defineProperty(obj, key, {
6
+ value: value,
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true
10
+ });
11
+ } else {
12
+ obj[key] = value;
13
+ }
14
+ return obj;
15
+ }
4
16
  /* eslint-disable @typescript-eslint/no-non-null-assertion */ const EDGE_STORE_ERROR_CODES = {
5
17
  BAD_REQUEST: 400,
6
18
  FILE_TOO_LARGE: 400,
@@ -24,10 +36,10 @@ class EdgeStoreError extends Error {
24
36
  }
25
37
  constructor(opts){
26
38
  super(opts.message);
27
- _(this, "cause", void 0);
28
- _(this, "code", void 0);
29
- _(this, "level", void 0);
30
- _(this, "details", void 0);
39
+ _define_property$1(this, "cause", void 0);
40
+ _define_property$1(this, "code", void 0);
41
+ _define_property$1(this, "level", void 0);
42
+ _define_property$1(this, "details", void 0);
31
43
  this.name = 'EdgeStoreError';
32
44
  this.code = opts.code;
33
45
  this.cause = opts.cause;
@@ -36,10 +48,23 @@ class EdgeStoreError extends Error {
36
48
  }
37
49
  }
38
50
 
51
+ function _define_property(obj, key, value) {
52
+ if (key in obj) {
53
+ Object.defineProperty(obj, key, {
54
+ value: value,
55
+ enumerable: true,
56
+ configurable: true,
57
+ writable: true
58
+ });
59
+ } else {
60
+ obj[key] = value;
61
+ }
62
+ return obj;
63
+ }
39
64
  class EdgeStoreApiClientError extends Error {
40
65
  constructor(opts){
41
66
  super(opts.response.message);
42
- _(this, "data", void 0);
67
+ _define_property(this, "data", void 0);
43
68
  this.name = 'EdgeStoreApiClientError';
44
69
  this.data = opts.response;
45
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgestore/shared",
3
- "version": "0.1.5-alpha.17",
3
+ "version": "0.1.5-alpha.19",
4
4
  "description": "Upload files with ease from React/Next.js",
5
5
  "homepage": "https://edgestore.dev",
6
6
  "repository": "https://github.com/edgestorejs/edgestore.git",
@@ -62,5 +62,5 @@
62
62
  "typescript": "^5.1.6",
63
63
  "zod": "3.21.4"
64
64
  },
65
- "gitHead": "66bb835a1e4c211b7c464e29b2c375efd53d07e6"
65
+ "gitHead": "c26eeb3eb8ae427eaf76cc782fa50f6b293d5651"
66
66
  }