@dldc/pubsub
Advanced tools
Comparing version 5.2.2 to 5.2.3
@@ -1,2 +0,2 @@ | ||
import * as _dldc_erreur from '@dldc/erreur'; | ||
import { IKey, Erreur } from '@dldc/erreur'; | ||
@@ -78,13 +78,32 @@ type Unsubscribe = () => void; | ||
declare const SuubErreur: { | ||
SubscriptionDestroyed: _dldc_erreur.IErreurType<undefined, false, []>; | ||
MaxSubscriptionCountReached: _dldc_erreur.IErreurType<undefined, false, []>; | ||
MaxRecursiveEmitReached: _dldc_erreur.IErreurType<{ | ||
limit: number; | ||
}, false, [limit: number]>; | ||
MaxUnsubscribeAllLoopReached: _dldc_erreur.IErreurType<{ | ||
limit: number; | ||
}, false, [limit: number]>; | ||
InvalidCallback: _dldc_erreur.IErreurType<undefined, false, []>; | ||
SubscriptionDestroyed: { | ||
Key: IKey<undefined, false, []>; | ||
create(): Erreur; | ||
}; | ||
MaxSubscriptionCountReached: { | ||
Key: IKey<undefined, false, []>; | ||
create(): Erreur; | ||
}; | ||
MaxRecursiveEmitReached: { | ||
Key: IKey<{ | ||
limit: number; | ||
}, false, [{ | ||
limit: number; | ||
}]>; | ||
create(limit: number): Erreur; | ||
}; | ||
MaxUnsubscribeAllLoopReached: { | ||
Key: IKey<{ | ||
limit: number; | ||
}, false, [{ | ||
limit: number; | ||
}]>; | ||
create(limit: number): Erreur; | ||
}; | ||
InvalidCallback: { | ||
Key: IKey<undefined, false, []>; | ||
create(): Erreur; | ||
}; | ||
}; | ||
export { ChannelMethod, DeferredMethod, IMultiSubscription, ISubscription, ISubscriptionOptions, IVoidSubscription, IsSubscribedByIdMethod, IsSubscribedMethod, MultiCreateChannelMethod, MultiCreateVoidChannelMethod, OnUnsubscribed, SubscribeByIdMethod, SubscribeMethod, SubscriptionCallback, Suub, SuubErreur, Unsubscribe, UnsubscribeAllMethod, UnsubscribeByIdMethod, UnsubscribeMethod, VoidChannelMethod, VoidIsSubscribedByIdMethod, VoidIsSubscribedMethod, VoidSubscribeByIdMethod, VoidSubscribeMethod, VoidSubscriptionCallback, VoidUnsubscribeByIdMethod, VoidUnsubscribeMethod }; |
@@ -271,33 +271,47 @@ "use strict"; | ||
})(); | ||
var SuubErreur = { | ||
SubscriptionDestroyed: import_erreur.ErreurType.defineEmpty("SubscriptionDestroyed", (err, provider) => { | ||
return err.with(provider).withMessage(`The subscription has been destroyed`); | ||
}), | ||
MaxSubscriptionCountReached: import_erreur.ErreurType.defineEmpty("MaxSubscriptionCountReached", (err, provider) => { | ||
return err.with(provider).withMessage( | ||
`The maxSubscriptionCount has been reached. If this is expected you can use the maxSubscriptionCount option to raise the limit` | ||
); | ||
}), | ||
MaxRecursiveEmitReached: import_erreur.ErreurType.defineWithTransform( | ||
"MaxRecursiveEmitReached", | ||
(limit) => ({ limit }), | ||
(err, provider, { limit }) => { | ||
return err.with(provider).withMessage( | ||
`The maxRecursiveEmit limit (${limit}) has been reached, did you emit() in a callback ? If this is expected you can use the maxRecursiveEmit option to raise the limit` | ||
); | ||
var SuubErreur = (() => { | ||
const SubscriptionDestroyedKey = import_erreur.Key.createEmpty("SubscriptionDestroyed"); | ||
const MaxSubscriptionCountReachedKey = import_erreur.Key.createEmpty("MaxSubscriptionCountReached"); | ||
const MaxRecursiveEmitReachedKey = import_erreur.Key.create("MaxRecursiveEmitReached"); | ||
const MaxUnsubscribeAllLoopReachedKey = import_erreur.Key.create("MaxUnsubscribeAllLoopReached"); | ||
const InvalidCallbackKey = import_erreur.Key.createEmpty("InvalidCallback"); | ||
return { | ||
SubscriptionDestroyed: { | ||
Key: SubscriptionDestroyedKey, | ||
create() { | ||
return import_erreur.Erreur.createWith(SubscriptionDestroyedKey).withMessage(`The subscription has been destroyed`); | ||
} | ||
}, | ||
MaxSubscriptionCountReached: { | ||
Key: MaxSubscriptionCountReachedKey, | ||
create() { | ||
return import_erreur.Erreur.createWith(MaxSubscriptionCountReachedKey).withMessage( | ||
`The maxSubscriptionCount has been reached. If this is expected you can use the maxSubscriptionCount option to raise the limit` | ||
); | ||
} | ||
}, | ||
MaxRecursiveEmitReached: { | ||
Key: MaxRecursiveEmitReachedKey, | ||
create(limit) { | ||
return import_erreur.Erreur.createWith(MaxRecursiveEmitReachedKey, { limit }).withMessage( | ||
`The maxRecursiveEmit limit (${limit}) has been reached, did you emit() in a callback ? If this is expected you can use the maxRecursiveEmit option to raise the limit` | ||
); | ||
} | ||
}, | ||
MaxUnsubscribeAllLoopReached: { | ||
Key: MaxUnsubscribeAllLoopReachedKey, | ||
create(limit) { | ||
return import_erreur.Erreur.createWith(MaxUnsubscribeAllLoopReachedKey, { limit }).withMessage( | ||
`The maxUnsubscribeAllLoop limit (${limit}) has been reached, did you call subscribe() in the onUnsubscribe callback then called unsubscribeAll ? If this is expected you can use the maxUnsubscribeAllLoop option to raise the limit` | ||
); | ||
} | ||
}, | ||
InvalidCallback: { | ||
Key: InvalidCallbackKey, | ||
create() { | ||
return import_erreur.Erreur.createWith(InvalidCallbackKey).withMessage(`The callback is not a function`); | ||
} | ||
} | ||
), | ||
MaxUnsubscribeAllLoopReached: import_erreur.ErreurType.defineWithTransform( | ||
"MaxUnsubscribeAllLoopReached", | ||
(limit) => ({ limit }), | ||
(err, provider, { limit }) => { | ||
return err.with(provider).withMessage( | ||
`The maxUnsubscribeAllLoop limit (${limit}) has been reached, did you call subscribe() in the onUnsubscribe callback then called unsubscribeAll ? If this is expected you can use the maxUnsubscribeAllLoop option to raise the limit` | ||
); | ||
} | ||
), | ||
InvalidCallback: import_erreur.ErreurType.defineEmpty("InvalidCallback", (err, provider) => { | ||
return err.with(provider).withMessage(`The callback is not a function`); | ||
}) | ||
}; | ||
}; | ||
})(); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -304,0 +318,0 @@ 0 && (module.exports = { |
{ | ||
"name": "@dldc/pubsub", | ||
"version": "5.2.2", | ||
"version": "5.2.3", | ||
"description": "A simple pub/sub written in Typescript", | ||
@@ -37,2 +37,3 @@ "keywords": [ | ||
"build": "rimraf dist && tsup --format cjs,esm src/mod.ts --dts src/mod.ts", | ||
"build:watch": "tsup --watch --format cjs,esm src/mod.ts --dts src/mod.ts", | ||
"changelog": "auto-changelog --stdout --hide-credit true --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs", | ||
@@ -49,18 +50,18 @@ "lint": "prettier . --check && eslint . && tsc --noEmit", | ||
"dependencies": { | ||
"@dldc/erreur": "^3.0.7" | ||
"@dldc/erreur": "^4.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.4.2", | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"@vitest/coverage-v8": "^0.33.0", | ||
"@types/node": "^20.6.3", | ||
"@typescript-eslint/eslint-plugin": "^6.7.2", | ||
"@typescript-eslint/parser": "^6.7.2", | ||
"@vitest/coverage-v8": "^0.34.5", | ||
"auto-changelog": "^2.4.0", | ||
"eslint": "^8.45.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"prettier": "^3.0.0", | ||
"release-it": "^16.1.0", | ||
"eslint": "^8.50.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"prettier": "^3.0.3", | ||
"release-it": "^16.1.5", | ||
"rimraf": "^5.0.1", | ||
"tsup": "^7.1.0", | ||
"typescript": "^5.1.6", | ||
"vitest": "^0.33.0" | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.2.2", | ||
"vitest": "^0.34.5" | ||
}, | ||
@@ -67,0 +68,0 @@ "packageManager": "pnpm@8.6.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42021
721
+ Added@dldc/erreur@4.1.1(transitive)
+ Added@dldc/stack@4.1.7(transitive)
- Removed@dldc/erreur@3.1.0(transitive)
- Removed@dldc/stack@3.1.4(transitive)
Updated@dldc/erreur@^4.0.1