@pinia-orm/axios-edge 1.10.2-28906422.4717410 → 1.10.2-28925154.29b2b0d
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.cjs +33 -51
- package/dist/index.mjs +33 -51
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
@@ -3,37 +3,31 @@
|
|
3
3
|
const piniaOrm = require('pinia-orm');
|
4
4
|
const pinia = require('pinia');
|
5
5
|
|
6
|
-
var __defProp$2 = Object.defineProperty;
|
7
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
-
var __publicField$2 = (obj, key, value) => {
|
9
|
-
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
10
|
-
return value;
|
11
|
-
};
|
12
6
|
class Response {
|
7
|
+
/**
|
8
|
+
* The repository that called the request.
|
9
|
+
*/
|
10
|
+
repository;
|
11
|
+
/**
|
12
|
+
* The request configuration.
|
13
|
+
*/
|
14
|
+
config;
|
15
|
+
/**
|
16
|
+
* The axios response instance.
|
17
|
+
*/
|
18
|
+
response;
|
19
|
+
/**
|
20
|
+
* Entities created by Pinia ORM.
|
21
|
+
*/
|
22
|
+
entities = null;
|
23
|
+
/**
|
24
|
+
* Whether if response data is saved to the store or not.
|
25
|
+
*/
|
26
|
+
isSaved = false;
|
13
27
|
/**
|
14
28
|
* Create a new response instance.
|
15
29
|
*/
|
16
30
|
constructor(repository, config, response) {
|
17
|
-
/**
|
18
|
-
* The repository that called the request.
|
19
|
-
*/
|
20
|
-
__publicField$2(this, "repository");
|
21
|
-
/**
|
22
|
-
* The request configuration.
|
23
|
-
*/
|
24
|
-
__publicField$2(this, "config");
|
25
|
-
/**
|
26
|
-
* The axios response instance.
|
27
|
-
*/
|
28
|
-
__publicField$2(this, "response");
|
29
|
-
/**
|
30
|
-
* Entities created by Pinia ORM.
|
31
|
-
*/
|
32
|
-
__publicField$2(this, "entities", null);
|
33
|
-
/**
|
34
|
-
* Whether if response data is saved to the store or not.
|
35
|
-
*/
|
36
|
-
__publicField$2(this, "isSaved", false);
|
37
31
|
this.repository = repository;
|
38
32
|
this.config = config;
|
39
33
|
this.response = response;
|
@@ -118,27 +112,21 @@ class Response {
|
|
118
112
|
}
|
119
113
|
}
|
120
114
|
|
121
|
-
var __defProp$1 = Object.defineProperty;
|
122
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
123
|
-
var __publicField$1 = (obj, key, value) => {
|
124
|
-
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
125
|
-
return value;
|
126
|
-
};
|
127
115
|
class Request {
|
116
|
+
/**
|
117
|
+
* The repository class.
|
118
|
+
*/
|
119
|
+
repository;
|
120
|
+
/**
|
121
|
+
* The default config.
|
122
|
+
*/
|
123
|
+
config = {
|
124
|
+
save: true
|
125
|
+
};
|
128
126
|
/**
|
129
127
|
* Create a new api instance.
|
130
128
|
*/
|
131
129
|
constructor(repository) {
|
132
|
-
/**
|
133
|
-
* The repository class.
|
134
|
-
*/
|
135
|
-
__publicField$1(this, "repository");
|
136
|
-
/**
|
137
|
-
* The default config.
|
138
|
-
*/
|
139
|
-
__publicField$1(this, "config", {
|
140
|
-
save: true
|
141
|
-
});
|
142
130
|
this.repository = repository;
|
143
131
|
this.registerActions();
|
144
132
|
}
|
@@ -246,18 +234,12 @@ class Request {
|
|
246
234
|
}
|
247
235
|
}
|
248
236
|
|
249
|
-
var __defProp = Object.defineProperty;
|
250
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
251
|
-
var __publicField = (obj, key, value) => {
|
252
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
253
|
-
return value;
|
254
|
-
};
|
255
237
|
class AxiosRepository extends piniaOrm.Repository {
|
238
|
+
axios;
|
239
|
+
globalApiConfig;
|
240
|
+
apiConfig;
|
256
241
|
constructor(database, pinia) {
|
257
242
|
super(database, pinia);
|
258
|
-
__publicField(this, "axios");
|
259
|
-
__publicField(this, "globalApiConfig");
|
260
|
-
__publicField(this, "apiConfig");
|
261
243
|
this.axios = piniaOrm.config?.axiosApi?.axios || null;
|
262
244
|
this.globalApiConfig = piniaOrm.config?.axiosApi || {};
|
263
245
|
this.apiConfig = {};
|
package/dist/index.mjs
CHANGED
@@ -1,37 +1,31 @@
|
|
1
1
|
import { Repository, config, useRepo, definePiniaOrmPlugin } from 'pinia-orm';
|
2
2
|
import { getActivePinia } from 'pinia';
|
3
3
|
|
4
|
-
var __defProp$2 = Object.defineProperty;
|
5
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6
|
-
var __publicField$2 = (obj, key, value) => {
|
7
|
-
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
8
|
-
return value;
|
9
|
-
};
|
10
4
|
class Response {
|
5
|
+
/**
|
6
|
+
* The repository that called the request.
|
7
|
+
*/
|
8
|
+
repository;
|
9
|
+
/**
|
10
|
+
* The request configuration.
|
11
|
+
*/
|
12
|
+
config;
|
13
|
+
/**
|
14
|
+
* The axios response instance.
|
15
|
+
*/
|
16
|
+
response;
|
17
|
+
/**
|
18
|
+
* Entities created by Pinia ORM.
|
19
|
+
*/
|
20
|
+
entities = null;
|
21
|
+
/**
|
22
|
+
* Whether if response data is saved to the store or not.
|
23
|
+
*/
|
24
|
+
isSaved = false;
|
11
25
|
/**
|
12
26
|
* Create a new response instance.
|
13
27
|
*/
|
14
28
|
constructor(repository, config, response) {
|
15
|
-
/**
|
16
|
-
* The repository that called the request.
|
17
|
-
*/
|
18
|
-
__publicField$2(this, "repository");
|
19
|
-
/**
|
20
|
-
* The request configuration.
|
21
|
-
*/
|
22
|
-
__publicField$2(this, "config");
|
23
|
-
/**
|
24
|
-
* The axios response instance.
|
25
|
-
*/
|
26
|
-
__publicField$2(this, "response");
|
27
|
-
/**
|
28
|
-
* Entities created by Pinia ORM.
|
29
|
-
*/
|
30
|
-
__publicField$2(this, "entities", null);
|
31
|
-
/**
|
32
|
-
* Whether if response data is saved to the store or not.
|
33
|
-
*/
|
34
|
-
__publicField$2(this, "isSaved", false);
|
35
29
|
this.repository = repository;
|
36
30
|
this.config = config;
|
37
31
|
this.response = response;
|
@@ -116,27 +110,21 @@ class Response {
|
|
116
110
|
}
|
117
111
|
}
|
118
112
|
|
119
|
-
var __defProp$1 = Object.defineProperty;
|
120
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
121
|
-
var __publicField$1 = (obj, key, value) => {
|
122
|
-
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
123
|
-
return value;
|
124
|
-
};
|
125
113
|
class Request {
|
114
|
+
/**
|
115
|
+
* The repository class.
|
116
|
+
*/
|
117
|
+
repository;
|
118
|
+
/**
|
119
|
+
* The default config.
|
120
|
+
*/
|
121
|
+
config = {
|
122
|
+
save: true
|
123
|
+
};
|
126
124
|
/**
|
127
125
|
* Create a new api instance.
|
128
126
|
*/
|
129
127
|
constructor(repository) {
|
130
|
-
/**
|
131
|
-
* The repository class.
|
132
|
-
*/
|
133
|
-
__publicField$1(this, "repository");
|
134
|
-
/**
|
135
|
-
* The default config.
|
136
|
-
*/
|
137
|
-
__publicField$1(this, "config", {
|
138
|
-
save: true
|
139
|
-
});
|
140
128
|
this.repository = repository;
|
141
129
|
this.registerActions();
|
142
130
|
}
|
@@ -244,18 +232,12 @@ class Request {
|
|
244
232
|
}
|
245
233
|
}
|
246
234
|
|
247
|
-
var __defProp = Object.defineProperty;
|
248
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
249
|
-
var __publicField = (obj, key, value) => {
|
250
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
251
|
-
return value;
|
252
|
-
};
|
253
235
|
class AxiosRepository extends Repository {
|
236
|
+
axios;
|
237
|
+
globalApiConfig;
|
238
|
+
apiConfig;
|
254
239
|
constructor(database, pinia) {
|
255
240
|
super(database, pinia);
|
256
|
-
__publicField(this, "axios");
|
257
|
-
__publicField(this, "globalApiConfig");
|
258
|
-
__publicField(this, "apiConfig");
|
259
241
|
this.axios = config?.axiosApi?.axios || null;
|
260
242
|
this.globalApiConfig = config?.axiosApi || {};
|
261
243
|
this.apiConfig = {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pinia-orm/axios-edge",
|
3
|
-
"version": "1.10.2-
|
3
|
+
"version": "1.10.2-28925154.29b2b0d",
|
4
4
|
"description": "Axios plugin for pinia-orm",
|
5
5
|
"bugs": {
|
6
6
|
"url": "https://github.com/CodeDredd/pinia-orm/issues"
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"license": "MIT",
|
44
44
|
"peerDependencies": {
|
45
45
|
"axios": ">=1.7.7",
|
46
|
-
"pinia-orm": "npm:pinia-orm-edge@1.10.2-
|
46
|
+
"pinia-orm": "npm:pinia-orm-edge@1.10.2-28925154.29b2b0d",
|
47
47
|
"pinia": ">=2.1.7"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
@@ -55,10 +55,10 @@
|
|
55
55
|
"axios-mock-adapter": "^2.0.0",
|
56
56
|
"eslint": "^9.6.0",
|
57
57
|
"pinia": "^2.1.7",
|
58
|
-
"pinia-orm": "npm:pinia-orm-edge@1.10.2-
|
58
|
+
"pinia-orm": "npm:pinia-orm-edge@1.10.2-28925154.29b2b0d",
|
59
59
|
"size-limit": "^11.1.4",
|
60
60
|
"typescript": "^5.5.3",
|
61
|
-
"unbuild": "^
|
61
|
+
"unbuild": "^3.1.0",
|
62
62
|
"vitest": "^2.0.4",
|
63
63
|
"vue-demi": "^0.14.8"
|
64
64
|
},
|