@aegis-framework/artemis 0.3.28 → 0.3.29

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@aegis-framework/artemis",
3
- "version": "0.3.28",
3
+ "version": "0.3.29",
4
4
  "description": "Aegis Framework Javascript Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/artemis.js",
@@ -61,13 +61,13 @@
61
61
  "build:main": "parcel build --target main --no-cache --public-url .",
62
62
  "build:module": "parcel build --target module --no-cache --public-url .",
63
63
  "build:legacy": "parcel build --target legacy --no-cache --public-url .",
64
- "watch": "parcel watch ./index.js --no-cache --public-url ."
64
+ "watch": "parcel watch --target legacy --no-cache --public-url ."
65
65
  },
66
66
  "devDependencies": {
67
- "eslint": "^8.5.0",
67
+ "eslint": "^8.6.0",
68
68
  "jsdoc": "^3.6.5",
69
69
  "jsdoc-to-markdown": "^7.1.0",
70
- "parcel": "^2.0.1"
70
+ "parcel": "^2.1.1"
71
71
  },
72
72
  "files": [
73
73
  "index.js",
@@ -76,9 +76,11 @@ export class RemoteStorage {
76
76
  */
77
77
  set (key, value) {
78
78
  return this.open ().then (() => {
79
- return this.storage.post (this.endpoint + key, value, this.props).then ((response) => {
80
- return Promise.resolve ({ key, response: response.json () });
81
- });
79
+ return this.storage.post (this.endpoint + key, value, this.props)
80
+ .then ((response) => response.json ())
81
+ .then ((value) => {
82
+ return Promise.resolve ({ key, value });
83
+ });
82
84
  });
83
85
  }
84
86
 
@@ -93,9 +95,11 @@ export class RemoteStorage {
93
95
  */
94
96
  update (key, value) {
95
97
  return this.get (key).then ((currentValue) => {
96
- return this.storage.put (this.endpoint + key, Object.assign ({}, currentValue, value), this.props).then ((response) => {
97
- return Promise.resolve ({ key, response: response.json () });
98
- });
98
+ return this.storage.put (this.endpoint + key, Object.assign ({}, currentValue, value), this.props)
99
+ .then ((response) => response.json ())
100
+ .then ((value) => {
101
+ return Promise.resolve ({ key, value });
102
+ });
99
103
  });
100
104
  }
101
105
 
@@ -198,9 +202,11 @@ export class RemoteStorage {
198
202
  */
199
203
  remove (key) {
200
204
  return this.open ().then (() => {
201
- return this.storage.delete (this.endpoint + key, {}, this.props).then ((response) => {
202
- return Promise.resolve (key, response.json ());
203
- });
205
+ return this.storage.delete (this.endpoint + key, {}, this.props)
206
+ .then ((response) => response.json ())
207
+ .then ((value) => {
208
+ return Promise.resolve (key,value);
209
+ });
204
210
  });
205
211
  }
206
212