@tryghost/limit-service 1.0.0 → 1.0.1

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.
@@ -21,7 +21,7 @@ class LimitService {
21
21
  * @param {Object} [options.subscription] - hash containing subscription configuration with interval and startDate properties
22
22
  * @param {String} options.helpLink - URL pointing to help resources for when limit is reached
23
23
  * @param {Object} options.db - knex db connection instance or other data source for the limit checks
24
- * @param {Object} options.errors - instance of errors compatible with Ghost-Ignition's errors (https://github.com/TryGhost/Ignition#errors)
24
+ * @param {Object} options.errors - instance of errors compatible with GhostError errors (@tryghost/errors)
25
25
  */
26
26
  loadLimits({limits = {}, subscription, helpLink, db, errors}) {
27
27
  if (!errors) {
package/lib/limit.js CHANGED
@@ -12,7 +12,7 @@ class Limit {
12
12
  * @param {String} options.error - error message to use when limit is reached
13
13
  * @param {String} options.helpLink - URL to the resource explaining how the limit works
14
14
  * @param {Object} [options.db] - instance of knex db connection that currentCountQuery can use to run state check through
15
- * @param {Object} options.errors - instance of errors compatible with Ghost-Ignition's errors (https://github.com/TryGhost/Ignition#errors)
15
+ * @param {Object} options.errors - instance of errors compatible with GhostError errors (@tryghost/errors)
16
16
  */
17
17
  constructor({name, error, helpLink, db, errors}) {
18
18
  this.name = name;
@@ -49,7 +49,7 @@ class MaxLimit extends Limit {
49
49
  * @param {String} [options.config.error] - error message to use when limit is reached
50
50
  * @param {String} [options.helpLink] - URL to the resource explaining how the limit works
51
51
  * @param {Object} [options.db] - instance of knex db connection that currentCountQuery can use to run state check through
52
- * @param {Object} options.errors - instance of errors compatible with Ghost-Ignition's errors (https://github.com/TryGhost/Ignition#errors)
52
+ * @param {Object} options.errors - instance of errors compatible with GhostError errors (@tryghost/errors)
53
53
  */
54
54
  constructor({name, config, helpLink, db, errors}) {
55
55
  super({name, error: config.error || '', helpLink, db, errors});
@@ -146,7 +146,7 @@ class MaxPeriodicLimit extends Limit {
146
146
  * @param {String} options.config.startDate - start date in ISO 8601 format (https://en.wikipedia.org/wiki/ISO_8601), used to calculate period intervals
147
147
  * @param {String} options.helpLink - URL to the resource explaining how the limit works
148
148
  * @param {Object} [options.db] - instance of knex db connection that currentCountQuery can use to run state check through
149
- * @param {Object} options.errors - instance of errors compatible with Ghost-Ignition's errors (https://github.com/TryGhost/Ignition#errors)
149
+ * @param {Object} options.errors - instance of errors compatible with GhostError errors (@tryghost/errors)
150
150
  */
151
151
  constructor({name, config, helpLink, db, errors}) {
152
152
  super({name, error: config.error || '', helpLink, db, errors});
@@ -248,7 +248,7 @@ class FlagLimit extends Limit {
248
248
  * @param {String} options.config.error - error message to use when limit is reached
249
249
  * @param {String} options.helpLink - URL to the resource explaining how the limit works
250
250
  * @param {Object} [options.db] - instance of knex db connection that currentCountQuery can use to run state check through
251
- * @param {Object} options.errors - instance of errors compatible with Ghost-Ignition's errors (https://github.com/TryGhost/Ignition#errors)
251
+ * @param {Object} options.errors - instance of errors compatible with GhostError errors (@tryghost/errors)
252
252
  */
253
253
  constructor({name, config, helpLink, db, errors}) {
254
254
  super({name, error: config.error || '', helpLink, db, errors});
@@ -296,7 +296,7 @@ class AllowlistLimit extends Limit {
296
296
  * @param {[String]} options.config.allowlist - allowlist values that would be compared against
297
297
  * @param {String} options.config.error - error message to use when limit is reached
298
298
  * @param {String} options.helpLink - URL to the resource explaining how the limit works
299
- * @param {Object} options.errors - instance of errors compatible with Ghost-Ignition's errors (https://github.com/TryGhost/Ignition#errors)
299
+ * @param {Object} options.errors - instance of errors compatible with GhostError errors (@tryghost/errors)
300
300
  */
301
301
  constructor({name, config, helpLink, errors}) {
302
302
  super({name, error: config.error || '', helpLink, errors});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/limit-service",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "repository": "https://github.com/TryGhost/Utils/tree/main/packages/limit-service",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -26,9 +26,9 @@
26
26
  "sinon": "11.1.2"
27
27
  },
28
28
  "dependencies": {
29
- "@tryghost/errors": "^0.2.17",
29
+ "@tryghost/errors": "^1.0.0",
30
30
  "lodash": "^4.17.21",
31
31
  "luxon": "^1.26.0"
32
32
  },
33
- "gitHead": "ba37890be49efc59381b17b9c78e0c9e2ed92eaf"
33
+ "gitHead": "9cce0db03f9229f7829ad2d0119b4916ca44fc78"
34
34
  }