@pinia-orm/axios-edge 1.8.1-28576022.11ee966 → 1.8.1-28576061.becc438

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 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-28576022.11ee966",
3
+ "version": "1.8.1-28576061.becc438",
4
4
  "description": "Axios plugin for pinia-orm",
5
5
  "bugs": {
6
6
  "url": "https://github.com/CodeDredd/pinia-orm/issues"
@@ -42,24 +42,24 @@
42
42
  },
43
43
  "license": "MIT",
44
44
  "peerDependencies": {
45
- "axios": ">=1.6.0",
46
- "pinia-orm": "npm:pinia-orm-edge@1.8.1-28576022.11ee966"
45
+ "axios": ">=1.6.8",
46
+ "pinia-orm": "npm:pinia-orm-edge@1.8.1-28576061.becc438"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@nuxt/eslint-config": "^0.3.10",
50
50
  "@nuxtjs/eslint-config-typescript": "^12.1.0",
51
- "@size-limit/preset-small-lib": "^11.0.0",
52
- "@vitest/coverage-v8": "^1.0.0",
53
- "axios": "^1.5.0",
51
+ "@size-limit/preset-small-lib": "^11.1.2",
52
+ "@vitest/coverage-v8": "^1.5.3",
53
+ "axios": "^1.6.8",
54
54
  "axios-mock-adapter": "^1.22.0",
55
55
  "eslint": "^9.1.1",
56
- "pinia": "^2.1.6",
57
- "pinia-orm": "npm:pinia-orm-edge@1.8.1-28576022.11ee966",
58
- "size-limit": "^11.0.0",
59
- "typescript": "^5.2.2",
56
+ "pinia": "^2.1.7",
57
+ "pinia-orm": "npm:pinia-orm-edge@1.8.1-28576061.becc438",
58
+ "size-limit": "^11.1.2",
59
+ "typescript": "^5.4.5",
60
60
  "unbuild": "^2.0.0",
61
- "vitest": "^1.0.0",
62
- "vue-demi": "^0.14.6"
61
+ "vitest": "^1.5.3",
62
+ "vue-demi": "^0.14.7"
63
63
  },
64
64
  "size-limit": [
65
65
  {