@wise-old-man/utils 3.3.13 → 3.3.15
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/cjs/index.cjs +5 -2
- package/dist/es/index.js +5 -2
- package/dist/es/index.mjs +5 -2
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -69,7 +69,7 @@ function handleError(status, path, data) {
|
|
|
69
69
|
throw new BadRequestError(path, data.message, data.data);
|
|
70
70
|
}
|
|
71
71
|
if (status === 403) {
|
|
72
|
-
throw new ForbiddenError(path, data.message);
|
|
72
|
+
throw new ForbiddenError(path, data.message, data.data);
|
|
73
73
|
}
|
|
74
74
|
if (status === 404) {
|
|
75
75
|
throw new NotFoundError(path, data.message);
|
|
@@ -91,11 +91,12 @@ class BadRequestError extends Error {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
class ForbiddenError extends Error {
|
|
94
|
-
constructor(resource, message) {
|
|
94
|
+
constructor(resource, message, data) {
|
|
95
95
|
super(message);
|
|
96
96
|
this.name = 'ForbiddenError';
|
|
97
97
|
this.resource = resource;
|
|
98
98
|
this.statusCode = 403;
|
|
99
|
+
this.data = data;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
class NotFoundError extends Error {
|
|
@@ -572,6 +573,7 @@ const Boss = {
|
|
|
572
573
|
DAGANNOTH_REX: 'dagannoth_rex',
|
|
573
574
|
DAGANNOTH_SUPREME: 'dagannoth_supreme',
|
|
574
575
|
DERANGED_ARCHAEOLOGIST: 'deranged_archaeologist',
|
|
576
|
+
DOOM_OF_MOKHAIOTL: 'doom_of_mokhaiotl',
|
|
575
577
|
DUKE_SUCELLUS: 'duke_sucellus',
|
|
576
578
|
GENERAL_GRAARDOR: 'general_graardor',
|
|
577
579
|
GIANT_MOLE: 'giant_mole',
|
|
@@ -1927,6 +1929,7 @@ const BossProps = mapValues({
|
|
|
1927
1929
|
[Boss.DAGANNOTH_REX]: { name: 'Dagannoth Rex' },
|
|
1928
1930
|
[Boss.DAGANNOTH_SUPREME]: { name: 'Dagannoth Supreme' },
|
|
1929
1931
|
[Boss.DERANGED_ARCHAEOLOGIST]: { name: 'Deranged Archaeologist' },
|
|
1932
|
+
[Boss.DOOM_OF_MOKHAIOTL]: { name: 'Doom of Mokhaiotl' },
|
|
1930
1933
|
[Boss.DUKE_SUCELLUS]: { name: 'Duke Sucellus' },
|
|
1931
1934
|
[Boss.GENERAL_GRAARDOR]: { name: 'General Graardor' },
|
|
1932
1935
|
[Boss.GIANT_MOLE]: { name: 'Giant Mole' },
|
package/dist/es/index.js
CHANGED
|
@@ -67,7 +67,7 @@ function handleError(status, path, data) {
|
|
|
67
67
|
throw new BadRequestError(path, data.message, data.data);
|
|
68
68
|
}
|
|
69
69
|
if (status === 403) {
|
|
70
|
-
throw new ForbiddenError(path, data.message);
|
|
70
|
+
throw new ForbiddenError(path, data.message, data.data);
|
|
71
71
|
}
|
|
72
72
|
if (status === 404) {
|
|
73
73
|
throw new NotFoundError(path, data.message);
|
|
@@ -89,11 +89,12 @@ class BadRequestError extends Error {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
class ForbiddenError extends Error {
|
|
92
|
-
constructor(resource, message) {
|
|
92
|
+
constructor(resource, message, data) {
|
|
93
93
|
super(message);
|
|
94
94
|
this.name = 'ForbiddenError';
|
|
95
95
|
this.resource = resource;
|
|
96
96
|
this.statusCode = 403;
|
|
97
|
+
this.data = data;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
class NotFoundError extends Error {
|
|
@@ -570,6 +571,7 @@ const Boss = {
|
|
|
570
571
|
DAGANNOTH_REX: 'dagannoth_rex',
|
|
571
572
|
DAGANNOTH_SUPREME: 'dagannoth_supreme',
|
|
572
573
|
DERANGED_ARCHAEOLOGIST: 'deranged_archaeologist',
|
|
574
|
+
DOOM_OF_MOKHAIOTL: 'doom_of_mokhaiotl',
|
|
573
575
|
DUKE_SUCELLUS: 'duke_sucellus',
|
|
574
576
|
GENERAL_GRAARDOR: 'general_graardor',
|
|
575
577
|
GIANT_MOLE: 'giant_mole',
|
|
@@ -1925,6 +1927,7 @@ const BossProps = mapValues({
|
|
|
1925
1927
|
[Boss.DAGANNOTH_REX]: { name: 'Dagannoth Rex' },
|
|
1926
1928
|
[Boss.DAGANNOTH_SUPREME]: { name: 'Dagannoth Supreme' },
|
|
1927
1929
|
[Boss.DERANGED_ARCHAEOLOGIST]: { name: 'Deranged Archaeologist' },
|
|
1930
|
+
[Boss.DOOM_OF_MOKHAIOTL]: { name: 'Doom of Mokhaiotl' },
|
|
1928
1931
|
[Boss.DUKE_SUCELLUS]: { name: 'Duke Sucellus' },
|
|
1929
1932
|
[Boss.GENERAL_GRAARDOR]: { name: 'General Graardor' },
|
|
1930
1933
|
[Boss.GIANT_MOLE]: { name: 'Giant Mole' },
|
package/dist/es/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ function handleError(status, path, data) {
|
|
|
67
67
|
throw new BadRequestError(path, data.message, data.data);
|
|
68
68
|
}
|
|
69
69
|
if (status === 403) {
|
|
70
|
-
throw new ForbiddenError(path, data.message);
|
|
70
|
+
throw new ForbiddenError(path, data.message, data.data);
|
|
71
71
|
}
|
|
72
72
|
if (status === 404) {
|
|
73
73
|
throw new NotFoundError(path, data.message);
|
|
@@ -89,11 +89,12 @@ class BadRequestError extends Error {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
class ForbiddenError extends Error {
|
|
92
|
-
constructor(resource, message) {
|
|
92
|
+
constructor(resource, message, data) {
|
|
93
93
|
super(message);
|
|
94
94
|
this.name = 'ForbiddenError';
|
|
95
95
|
this.resource = resource;
|
|
96
96
|
this.statusCode = 403;
|
|
97
|
+
this.data = data;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
class NotFoundError extends Error {
|
|
@@ -570,6 +571,7 @@ const Boss = {
|
|
|
570
571
|
DAGANNOTH_REX: 'dagannoth_rex',
|
|
571
572
|
DAGANNOTH_SUPREME: 'dagannoth_supreme',
|
|
572
573
|
DERANGED_ARCHAEOLOGIST: 'deranged_archaeologist',
|
|
574
|
+
DOOM_OF_MOKHAIOTL: 'doom_of_mokhaiotl',
|
|
573
575
|
DUKE_SUCELLUS: 'duke_sucellus',
|
|
574
576
|
GENERAL_GRAARDOR: 'general_graardor',
|
|
575
577
|
GIANT_MOLE: 'giant_mole',
|
|
@@ -1925,6 +1927,7 @@ const BossProps = mapValues({
|
|
|
1925
1927
|
[Boss.DAGANNOTH_REX]: { name: 'Dagannoth Rex' },
|
|
1926
1928
|
[Boss.DAGANNOTH_SUPREME]: { name: 'Dagannoth Supreme' },
|
|
1927
1929
|
[Boss.DERANGED_ARCHAEOLOGIST]: { name: 'Deranged Archaeologist' },
|
|
1930
|
+
[Boss.DOOM_OF_MOKHAIOTL]: { name: 'Doom of Mokhaiotl' },
|
|
1928
1931
|
[Boss.DUKE_SUCELLUS]: { name: 'Duke Sucellus' },
|
|
1929
1932
|
[Boss.GENERAL_GRAARDOR]: { name: 'General Graardor' },
|
|
1930
1933
|
[Boss.GIANT_MOLE]: { name: 'Giant Mole' },
|
package/dist/index.d.ts
CHANGED
|
@@ -455,6 +455,7 @@ declare const Boss: {
|
|
|
455
455
|
readonly DAGANNOTH_REX: "dagannoth_rex";
|
|
456
456
|
readonly DAGANNOTH_SUPREME: "dagannoth_supreme";
|
|
457
457
|
readonly DERANGED_ARCHAEOLOGIST: "deranged_archaeologist";
|
|
458
|
+
readonly DOOM_OF_MOKHAIOTL: "doom_of_mokhaiotl";
|
|
458
459
|
readonly DUKE_SUCELLUS: "duke_sucellus";
|
|
459
460
|
readonly GENERAL_GRAARDOR: "general_graardor";
|
|
460
461
|
readonly GIANT_MOLE: "giant_mole";
|
|
@@ -531,6 +532,7 @@ declare const Metric: {
|
|
|
531
532
|
readonly DAGANNOTH_REX: "dagannoth_rex";
|
|
532
533
|
readonly DAGANNOTH_SUPREME: "dagannoth_supreme";
|
|
533
534
|
readonly DERANGED_ARCHAEOLOGIST: "deranged_archaeologist";
|
|
535
|
+
readonly DOOM_OF_MOKHAIOTL: "doom_of_mokhaiotl";
|
|
534
536
|
readonly DUKE_SUCELLUS: "duke_sucellus";
|
|
535
537
|
readonly GENERAL_GRAARDOR: "general_graardor";
|
|
536
538
|
readonly GIANT_MOLE: "giant_mole";
|
|
@@ -1692,6 +1694,7 @@ declare const MetricProps: {
|
|
|
1692
1694
|
readonly dagannoth_rex: BossProperties;
|
|
1693
1695
|
readonly dagannoth_supreme: BossProperties;
|
|
1694
1696
|
readonly deranged_archaeologist: BossProperties;
|
|
1697
|
+
readonly doom_of_mokhaiotl: BossProperties;
|
|
1695
1698
|
readonly duke_sucellus: BossProperties;
|
|
1696
1699
|
readonly general_graardor: BossProperties;
|
|
1697
1700
|
readonly giant_mole: BossProperties;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise-old-man/utils",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.15",
|
|
4
4
|
"description": "A JavaScript/TypeScript client that interfaces and consumes the Wise Old Man API, an API that tracks and measures players' progress in Old School Runescape.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wiseoldman",
|