@tstdl/base 0.90.4 → 0.90.5

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.
@@ -1,7 +1,8 @@
1
- import { SecretRequirementsError } from '../authentication/index.js';
2
- import { HttpError, HttpErrorReason } from '../http/http.error.js';
1
+ import type { SecretRequirementsError } from '../authentication/index.js';
2
+ import type { HttpError } from '../http/http.error.js';
3
+ import { HttpErrorReason } from '../http/http.error.js';
3
4
  import type { Localization, LocalizeItem } from '../text/localization.service.js';
4
- import { Enumeration } from '../types.js';
5
+ import type { Enumeration } from '../types.js';
5
6
  import type { ApiError } from './api.error.js';
6
7
  import type { BadRequestError } from './bad-request.error.js';
7
8
  import type { CustomError, CustomErrorStatic } from './custom.error.js';
@@ -8,7 +8,7 @@ export const germanTstdlErrorsLocalization = {
8
8
  errors: {
9
9
  ApiError: {
10
10
  header: 'API Fehler',
11
- message: getErrorMessage
11
+ message: 'Bitte versuchen Sie es später noch einmal.'
12
12
  },
13
13
  BadRequestError: {
14
14
  header: 'Ungültige Anfrage',
@@ -20,11 +20,11 @@ export const germanTstdlErrorsLocalization = {
20
20
  },
21
21
  InvalidCredentialsError: {
22
22
  header: 'Ungültige Zugangsdaten',
23
- message: getErrorMessage
23
+ message: 'Überprüfen Sie Ihre Eingaben'
24
24
  },
25
25
  InvalidTokenError: {
26
26
  header: 'Anmeldung abgelaufen oder ungültig',
27
- message: getErrorMessage
27
+ message: 'Bitte melden Sie sich erneut an'
28
28
  },
29
29
  MaxBytesExceededError: {
30
30
  header: 'Daten größer als erlaubt',
@@ -84,7 +84,7 @@ export const englishTstdlErrorsLocalization = {
84
84
  errors: {
85
85
  ApiError: {
86
86
  header: 'API error',
87
- message: getErrorMessage
87
+ message: 'Please try again later'
88
88
  },
89
89
  BadRequestError: {
90
90
  header: 'Bad Request',
@@ -96,11 +96,11 @@ export const englishTstdlErrorsLocalization = {
96
96
  },
97
97
  InvalidCredentialsError: {
98
98
  header: 'Invalid credentials',
99
- message: getErrorMessage
99
+ message: 'Check your inputs'
100
100
  },
101
101
  InvalidTokenError: {
102
102
  header: 'Login expired or invalid',
103
- message: getErrorMessage
103
+ message: 'Please log in again'
104
104
  },
105
105
  MaxBytesExceededError: {
106
106
  header: 'Data larger than allowed',
@@ -155,5 +155,5 @@ export const englishTstdlErrorsLocalization = {
155
155
  ]
156
156
  };
157
157
  function getErrorMessage(error) {
158
- return `${error.message}`;
158
+ return error.message.replace(/\.$/u, '');
159
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.90.4",
3
+ "version": "0.90.5",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -149,7 +149,7 @@
149
149
  "playwright": "^1.38",
150
150
  "preact": "^10.18",
151
151
  "preact-render-to-string": "^6.2",
152
- "undici": "^5.25",
152
+ "undici": "^5.26",
153
153
  "urlpattern-polyfill": "^9.0"
154
154
  },
155
155
  "peerDependenciesMeta": {
@@ -1,5 +1,6 @@
1
1
  import type { PromiseRejectFunction, PromiseResolveFunction } from './types.js';
2
2
  export declare class CustomPromise<T> extends Promise<T> {
3
+ static readonly [Symbol.species]: PromiseConstructor;
3
4
  protected readonly resolve: PromiseResolveFunction<T>;
4
5
  protected readonly reject: PromiseRejectFunction;
5
6
  constructor();
@@ -1,4 +1,5 @@
1
1
  export class CustomPromise extends Promise {
2
+ static [Symbol.species] = Promise;
2
3
  resolve;
3
4
  reject;
4
5
  constructor() {