lemmy-js-client 1.0.0-rename-timestamp-to-at.0 → 1.0.0-rename-timestamp-to-at.3

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/http.js CHANGED
@@ -981,7 +981,12 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
981
981
  throw new Error(response.statusText);
982
982
  }
983
983
  if (!response.ok) {
984
- throw new Error(json["error"] ?? response.statusText);
984
+ let err = {
985
+ name: json.error ?? response.statusText,
986
+ // Leave an empty error message if undefined
987
+ message: json.message ?? "",
988
+ };
989
+ throw err;
985
990
  }
986
991
  else {
987
992
  return json;
package/dist/index.d.ts CHANGED
@@ -309,7 +309,6 @@ export { ResendVerificationEmail } from "./types/ResendVerificationEmail";
309
309
  export { ResolveCommentReport } from "./types/ResolveCommentReport";
310
310
  export { ResolveCommunityReport } from "./types/ResolveCommunityReport";
311
311
  export { ResolveObject } from "./types/ResolveObject";
312
- export { ResolveObjectResponse } from "./types/ResolveObjectResponse";
313
312
  export { ResolvePostReport } from "./types/ResolvePostReport";
314
313
  export { ResolvePrivateMessageReport } from "./types/ResolvePrivateMessageReport";
315
314
  export { SaveComment } from "./types/SaveComment";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "1.0.0-rename-timestamp-to-at.0",
4
+ "version": "1.0.0-rename-timestamp-to-at.3",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "typescript": "^5.5.4",
44
44
  "typescript-eslint": "^8.7.0"
45
45
  },
46
- "packageManager": "pnpm@10.11.1",
46
+ "packageManager": "pnpm@10.12.1",
47
47
  "types": "./dist/index.d.ts",
48
48
  "lint-staged": {
49
49
  "*.{ts,tsx,js}": [
@@ -1,13 +0,0 @@
1
- import type { CommentView } from "./CommentView";
2
- import type { CommunityView } from "./CommunityView";
3
- import type { PersonView } from "./PersonView";
4
- import type { PostView } from "./PostView";
5
- /**
6
- * The response of an apub object fetch.
7
- */
8
- export type ResolveObjectResponse = {
9
- comment?: CommentView;
10
- post?: PostView;
11
- community?: CommunityView;
12
- person?: PersonView;
13
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });