@pinia-orm/axios-edge 1.8.1-28576026.b5c5752 → 1.8.1-28576089.fc105f0
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 +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const piniaOrm = require('pinia-orm');
|
4
|
+
const pinia = require('pinia');
|
4
5
|
|
5
6
|
var __defProp$2 = Object.defineProperty;
|
6
7
|
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
@@ -271,8 +272,9 @@ function useAxiosApi(repository) {
|
|
271
272
|
}
|
272
273
|
|
273
274
|
function useAxiosRepo(model) {
|
275
|
+
const pinia$1 = pinia.getActivePinia();
|
274
276
|
AxiosRepository.useModel = model;
|
275
|
-
return piniaOrm.useRepo(AxiosRepository);
|
277
|
+
return piniaOrm.useRepo(AxiosRepository, pinia$1);
|
276
278
|
}
|
277
279
|
|
278
280
|
function createPiniaOrmAxios(axiosConfig) {
|
package/dist/index.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Repository, config, useRepo, definePiniaOrmPlugin } from 'pinia-orm';
|
2
|
+
import { getActivePinia } from 'pinia';
|
2
3
|
|
3
4
|
var __defProp$2 = Object.defineProperty;
|
4
5
|
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
@@ -269,8 +270,9 @@ function useAxiosApi(repository) {
|
|
269
270
|
}
|
270
271
|
|
271
272
|
function useAxiosRepo(model) {
|
273
|
+
const pinia = getActivePinia();
|
272
274
|
AxiosRepository.useModel = model;
|
273
|
-
return useRepo(AxiosRepository);
|
275
|
+
return useRepo(AxiosRepository, pinia);
|
274
276
|
}
|
275
277
|
|
276
278
|
function createPiniaOrmAxios(axiosConfig) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pinia-orm/axios-edge",
|
3
|
-
"version": "1.8.1-
|
3
|
+
"version": "1.8.1-28576089.fc105f0",
|
4
4
|
"description": "Axios plugin for pinia-orm",
|
5
5
|
"bugs": {
|
6
6
|
"url": "https://github.com/CodeDredd/pinia-orm/issues"
|
@@ -43,7 +43,8 @@
|
|
43
43
|
"license": "MIT",
|
44
44
|
"peerDependencies": {
|
45
45
|
"axios": ">=1.6.8",
|
46
|
-
"pinia-orm": "npm:pinia-orm-edge@1.8.1-
|
46
|
+
"pinia-orm": "npm:pinia-orm-edge@1.8.1-28576089.fc105f0",
|
47
|
+
"pinia": ">=2.0.0"
|
47
48
|
},
|
48
49
|
"devDependencies": {
|
49
50
|
"@nuxt/eslint-config": "^0.3.10",
|
@@ -54,7 +55,7 @@
|
|
54
55
|
"axios-mock-adapter": "^1.22.0",
|
55
56
|
"eslint": "^9.1.1",
|
56
57
|
"pinia": "^2.1.7",
|
57
|
-
"pinia-orm": "npm:pinia-orm-edge@1.8.1-
|
58
|
+
"pinia-orm": "npm:pinia-orm-edge@1.8.1-28576089.fc105f0",
|
58
59
|
"size-limit": "^11.1.2",
|
59
60
|
"typescript": "^5.4.5",
|
60
61
|
"unbuild": "^2.0.0",
|