pinia-plugin-subscription 0.1.7 → 0.1.8
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/dist/{plugins/pluginSubscriber.d.ts → core/PluginSubscriber.d.ts} +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/lib/main.d.ts +2 -2
- package/dist/pinia-plugin-subscription.js +2 -2
- package/dist/types/plugin.d.ts +1 -0
- package/package.json +1 -1
- /package/dist/{plugins/pluginSubscription.d.ts → core/PluginSubscription.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.8]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Added `onError` parameter to `storeOnActionSubscription` method
|
|
12
|
+
- Added `onError` property to `StoreOnActionCallbackParameters` interface
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Changing the directory structure
|
|
16
|
+
|
|
8
17
|
## [0.1.7]
|
|
9
18
|
|
|
10
19
|
### Changed
|
package/README.md
CHANGED
|
@@ -245,7 +245,7 @@ An object with at least an `invoke(context: PiniaPluginContext, debug?: boolean)
|
|
|
245
245
|
|
|
246
246
|
## The `PluginSubscriber` Abstract Class
|
|
247
247
|
|
|
248
|
-
The project provides an abstract `PluginSubscriber` implementation (see [src/
|
|
248
|
+
The project provides an abstract `PluginSubscriber` implementation (see [src/core/PluginSubscriber.ts](src/core/PluginSubscriber.ts)) to simplify creating reusable subscribers.
|
|
249
249
|
|
|
250
250
|
**Typical usage:**
|
|
251
251
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Store from "
|
|
1
|
+
import Store from "./Store";
|
|
2
2
|
import type { PiniaPluginContext, Store as PiniaStore } from "pinia";
|
|
3
3
|
import type { AnyObject } from "../types";
|
|
4
4
|
import type { PluginExecutionOptions, PluginHydrationScheduler, PluginSubscriber as PluginSubscriberInterface, PluginSubscriptions, StoreMutationSubscription, StoreOnActionSubscription } from "../types/plugin";
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as PluginSubscriber } from '../
|
|
1
|
+
export { default as PluginSubscriber } from '../core/PluginSubscriber';
|
|
2
2
|
export { default as Store } from '../core/Store';
|
|
3
3
|
export { CustomConsole } from '../system/log';
|
|
4
4
|
export { isEmpty } from '../utils/validation';
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PluginSubscriber from '../
|
|
2
|
-
import PluginSubscription from '../
|
|
1
|
+
import PluginSubscriber from '../core/PluginSubscriber';
|
|
2
|
+
import PluginSubscription from '../core/PluginSubscription';
|
|
3
3
|
import Store from '../core/Store';
|
|
4
4
|
export { createPlugin } from "../plugins/createPlugin";
|
|
5
5
|
export { createHydrationPlugin } from "../plugins/createHydrationPlugin";
|
|
@@ -193,8 +193,8 @@ class p extends g {
|
|
|
193
193
|
}
|
|
194
194
|
storeOnActionSubscription(e) {
|
|
195
195
|
const { store: i, callback: t } = e();
|
|
196
|
-
i.$onAction(({ after: s, args: n, name: d }) => {
|
|
197
|
-
this.debugLog(`storeOnActionSubscription ${i.$id}`, { after: s, args: n, name: d, store: i }), t({ after: s, args: n, name: d });
|
|
196
|
+
i.$onAction(({ after: s, args: n, name: d, onError: u }) => {
|
|
197
|
+
this.debugLog(`storeOnActionSubscription ${i.$id}`, { after: s, args: n, name: d, store: i }), t({ after: s, args: n, name: d, onError: u });
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
storeMutationSubscription(e) {
|
package/dist/types/plugin.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinia-plugin-subscription",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Pinia plugin for Vue.js that helps building Pinia plugins by centralizing subscriber registration and providing a Store base class for store helpers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
File without changes
|