@moonbase.sh/storefront-api 0.2.31 → 0.2.32
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 +6 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -235,18 +235,21 @@ var NotAuthorizedError = class extends Error {
|
|
|
235
235
|
constructor() {
|
|
236
236
|
super();
|
|
237
237
|
this.name = "NotAuthorizedError";
|
|
238
|
+
this.message = "Not allowed";
|
|
238
239
|
}
|
|
239
240
|
};
|
|
240
241
|
var NotAuthenticatedError = class extends Error {
|
|
241
242
|
constructor() {
|
|
242
243
|
super();
|
|
243
244
|
this.name = "NotAuthenticatedError";
|
|
245
|
+
this.message = "Not authenticated";
|
|
244
246
|
}
|
|
245
247
|
};
|
|
246
248
|
var NotFoundError = class extends Error {
|
|
247
|
-
constructor() {
|
|
249
|
+
constructor(message) {
|
|
248
250
|
super();
|
|
249
251
|
this.name = "NotFoundError";
|
|
252
|
+
this.message = message != null ? message : "Not found";
|
|
250
253
|
}
|
|
251
254
|
};
|
|
252
255
|
var MoonbaseError = class extends Error {
|
|
@@ -358,6 +361,8 @@ var IdentityEndpoints = class {
|
|
|
358
361
|
},
|
|
359
362
|
body: password
|
|
360
363
|
});
|
|
364
|
+
if (response.status === 404)
|
|
365
|
+
throw new NotFoundError("User not found");
|
|
361
366
|
if (response.status >= 400)
|
|
362
367
|
await handleResponseProblem(response);
|
|
363
368
|
const data = await response.json();
|
package/dist/index.d.cts
CHANGED
|
@@ -10720,7 +10720,7 @@ declare class NotAuthenticatedError extends Error {
|
|
|
10720
10720
|
constructor();
|
|
10721
10721
|
}
|
|
10722
10722
|
declare class NotFoundError extends Error {
|
|
10723
|
-
constructor();
|
|
10723
|
+
constructor(message?: string);
|
|
10724
10724
|
}
|
|
10725
10725
|
declare class MoonbaseError extends Error {
|
|
10726
10726
|
readonly title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -10720,7 +10720,7 @@ declare class NotAuthenticatedError extends Error {
|
|
|
10720
10720
|
constructor();
|
|
10721
10721
|
}
|
|
10722
10722
|
declare class NotFoundError extends Error {
|
|
10723
|
-
constructor();
|
|
10723
|
+
constructor(message?: string);
|
|
10724
10724
|
}
|
|
10725
10725
|
declare class MoonbaseError extends Error {
|
|
10726
10726
|
readonly title: string;
|
package/dist/index.js
CHANGED
|
@@ -193,18 +193,21 @@ var NotAuthorizedError = class extends Error {
|
|
|
193
193
|
constructor() {
|
|
194
194
|
super();
|
|
195
195
|
this.name = "NotAuthorizedError";
|
|
196
|
+
this.message = "Not allowed";
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
199
|
var NotAuthenticatedError = class extends Error {
|
|
199
200
|
constructor() {
|
|
200
201
|
super();
|
|
201
202
|
this.name = "NotAuthenticatedError";
|
|
203
|
+
this.message = "Not authenticated";
|
|
202
204
|
}
|
|
203
205
|
};
|
|
204
206
|
var NotFoundError = class extends Error {
|
|
205
|
-
constructor() {
|
|
207
|
+
constructor(message) {
|
|
206
208
|
super();
|
|
207
209
|
this.name = "NotFoundError";
|
|
210
|
+
this.message = message != null ? message : "Not found";
|
|
208
211
|
}
|
|
209
212
|
};
|
|
210
213
|
var MoonbaseError = class extends Error {
|
|
@@ -316,6 +319,8 @@ var IdentityEndpoints = class {
|
|
|
316
319
|
},
|
|
317
320
|
body: password
|
|
318
321
|
});
|
|
322
|
+
if (response.status === 404)
|
|
323
|
+
throw new NotFoundError("User not found");
|
|
319
324
|
if (response.status >= 400)
|
|
320
325
|
await handleResponseProblem(response);
|
|
321
326
|
const data = await response.json();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.32",
|
|
5
5
|
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|